Jump to content

How to fire multiple events from one action


Recommended Posts

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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.