08-04-2010 06:05 AM
Hello all, I hope you can help!
I've got a LabVIEW vi working to communicate with some hardware, so we can set true/false commands using boolean buttons, but now we need to automate it to be left overnight.
How can I simulate button presses? I've tried using a local variable and although it shows the buttons being pressed on the front panel, this isn't actually changing the output from LabVIEW onto the databus, so the hardware isn't actually being commanded.
We need to set it so it basically runs:
Set TRUE for x amount of time
Set FALSE for y amount of time.
How can I do this? A simple example vi would really really help! (If it helps we're running LaBVIEW 2009)
Cheers, Matt
08-04-2010 06:30 AM
Value signaling property node will trigger the event if you have an event based architecture.
Better is to plan for this in the first place, make the event of pressing the button trigger the application to invoke a vi or if you are using a state machine go to the action state. When in automated overnight mode a timing/scheduling mechanism will trigger a transition to the action state or invoke the action vi. (I like queued state machine architectures for the flexability of retrofitting the code with new operations such as a scheduled action).
08-04-2010 06:35 AM
This is absolutely not (i think) the best way to do this since I don't have more than 2 months of experience with Labview. Have just been using text-based programming methods. Anyways I made a small vi with a flat sequence structure that does the job, but I'm sorry to tell you I can't say its a good or bad solution.
08-04-2010 06:39 AM
Paul ofered advise similar to what I had in mind.
Kuodes for the planning comment!
if you have trouble implementing Paul's suggestions post your code (all) or images of same so we can tailor our suggestions to your situation.
Ben