12-11-2014 01:04 PM - last edited on 03-14-2024 03:40 PM by Content Cleaner
Hi all,
I have LabView set up to output a signal from my USB-6501. The output signal triggers a relay and turns a solenoid valve on/off.
Currently I have a Boolean set up as a button where I click to turn the signal on, and click to turn it off. In turn the valve opens, and then closes.
I'm extremely inexperienced with Labview and was able to search enough to set this up, but it is difficult for me to convert what others with similar, but different set ups, have done from searching the forum.
What I'm having trouble with now is modifying this code in order to have clicking on the Boolean button output the signal for a set amount of time (say 500ms) and then automatically turn off (without having to reclick). Basically a pulse. I feel like it would involve loop of some sort set with a timer, but am unsure how to start setting this up.
I've attached my LabView code for you to see. I would greatly appreciate any help. Thanks in advance.
Solved! Go to Solution.
12-11-2014 02:50 PM
I recommend using an Event Structure. On the boolean value change, you set or reset the output. Using a shift register, you can also set the timeout for the event structure. Then in the timeout, use a Value (Signaling) property of the boolean to force a value change on the boolean to false. This will cause that boolean value change event to trigger and therefore cause your output to turn off.
12-11-2014 02:55 PM
crossrulz thank you for your reply, I really appreciate the quick response.
Your modification to my code works great. I'm going to pick it apart to learn more about what you did as well. Thanks!