06-13-2011 07:17 AM
I want to develop my application in such a way that once I start generating an analog pulse train it should not be turned off for 5 minutes and similarly when it is turned off once it shouldnot be turned on for 5 minutes. How can I do that? I am generating an analog pulse train of 7 Volt amplitude by PCI 6289 because that is what the requirement is by the instrument on the other side.
Can somebody suggest me what do i need to use for on off timing problem that i stated?
Thanks,
Tigs
08-17-2011 08:59 AM
Hi,
I have written a VI to do have the functionality you want. It makes use of property nodes for the buttons, Elapsed Time express VI and Wait VI.
Explanation of Code:
Once the start button is hit, the stop button gets disabled so the user cannot press it.
Once generating the wave, 5 seconds will pass before the button is enabled again and therefore letting the user stop generation.
Once the stop button is pressed, the start button is disabled for 5 seconds and then re-enabled.
Hope this Helps!
08-18-2011 12:39 AM
Hey Lewis,
I am using LabVIEW 8.2.1 version. Can you just save it as a lower version and attach the file again?
I would like to restate my problem even more clearly:
We have a machine that needs to be prevented from frequently turning on and off. So we have fixed a delay (say 5 seconds). The machine once turned on should not turn off for 5 seconds. If the command given is “turn off” within that duration then it should maintain the previous value till the remaining period of time. At the same time after 5 seconds if the command is given “ turn off” it should turn off immediately as the fixed time has already elapsed.
Similarly the logic with turning on. Once turned off it should not turn on for 5 seconds. Within 5 second period if command given is “turn on”, it should wait for the remaining time to elapse, and within that time it should maintain the previous value. After the time has elapsed it should “turn on” immediately.
Thanks,
Tigs
08-22-2011 05:33 AM
Hi Tigs,
I have written a program which does what you ask. It uses a state machine to move between different states. If you are unsure about what a state machine is and how to use them, check this tutorial out.
I have attached the code from my last post for you to look even though it doesn't do what you ask.
I have commented the code for delay generation (LV 8.0).vi. Post back if you have any questions.
Kind Regards
08-24-2011 01:21 AM
Hey Lewis,
Thanks for your inputs. I will explore the state machine and look forward to the code development.
I guess this will help . I will still get back to you if I have any problems.
Thanks,
Tigs