12-26-2016 11:56 PM
Is it possible to on a switch for 5 seconds and then off? The switch is controlled from myRIO on Ni data dashboard.
12-27-2016 01:26 AM
Hi JiaLuo,
Is it possible to on a switch for 5 seconds and then off?
Yes.
What exactly is your problem? Where are you stuck? How does your VI look like? (And please attach code (aka VIs or snippets) instead of pure images…)
12-27-2016 01:36 AM
Hi GerdW! Here's the program.
12-27-2016 01:38 AM - edited 12-27-2016 01:38 AM
Hi JiaLuo,
no, there is no "program"! All I see is the LabVIEW project file, which is "just" a description of the VIs contained in your project! (Hint: open the lvproj file using a text editor…)
To repeat: Please attach code aka VIs or snippets!
12-27-2016 04:12 AM
Hi JiaLuo,
This is what i saw. Cannot open vi
12-27-2016 04:17 AM
Hi! Here's the program. Thanks alot.
12-27-2016 04:35 AM
Hi JiaLuo,
I'm sorry, but that's a huge mess with a lot of boolean indicators. And even more local variables in a huge BD without any (recognzable) program structure…
How should we help you when we don't know what you are talking about?
Which switch should be switched?
Clean up your BD.
Replace locals by wires.
Use some meaningful program structure.
Use descriptive labels for controls/indicators!
Then ask again…
12-27-2016 09:46 AM
Hi, sorry about vague info given. I've attached an example, I'm trying to control the switch such that, it was in the initial state (off). When i switch it to on, the LED will on only for 5 seconds and then turns off automatically, and when it changes state again the same process will occur again; on LED for 5 seconds and turns off.
12-27-2016 11:17 AM
Hi JiaLuo,
When i switch it to on, the LED will on only for 5 seconds and then turns off automatically, and when it changes state again the same process will occur again; on LED for 5 seconds and turns off.
When you have problems to implement such a basic wait statement:
I really advise you to take those FREE online training resources to learn LabVIEW!
Still I would recommend to use some better programming schemes in favor of the sequence inside the case structure. Use statemachines or maybe queue-driven message handlers…
12-27-2016 09:17 PM
Hi GerdW, could u save it as 2014 or earlier versions? because i'm using the LV2014 version n can't open it. Thanks!