John Lokanis Posted March 6, 2006 Report Share Posted March 6, 2006 Hi, This VI is the result of a problem I ran into and solved with some help from the Info-LabVIEW list. The problem: How to get a VI with a standard event structure to fire a continuous stream of the same event while a button was held down, but then stop as soon as the button was released. The solution: With a combination of a case statement, an event structure and some 'switch until released' buttons, all within a single while loop, I got the desired result. It was suggested that I post it here to share with others. Some issues with my solution: While the code is processing the 'held down' event, no other events can occur. Not sure if they will be queued up or not. I didn't test for that. Some benefits of this solution over others: There is only one loop. So, there is no need to deal with killing two asyncronous loops when the exit event it fired. I hope this code is of some use to you one some project someday. I know I get a great deal of help from all of you and just want to give some back. -John Download File:post-2411-1141673638.vi Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.