From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling relay board via printer cable

Well, the question is a bit vague so I will have to provide a general answer. There's a number of ways to do this depending on what you're doing inside the loop that you want to run for a certain length of time. One simple way to do it is to use the Elapsed Time VI. The attached example shows how to blink one LED at one rate for 3 seconds, and then a second LED at a different rate for 3 seconds.
Message 11 of 18
(919 Views)
Do you think that you could save that as a LabVIEW 7.1, please?
thanks for the reply!
LabVIEW 7.1 unfortunately
0 Kudos
Message 12 of 18
(917 Views)
Here you go...
0 Kudos
Message 13 of 18
(909 Views)
My program is progressing extremely well, and I'm learning a lot, but I've got stuck again:
If I have 3 different tasks each inside its own While Loop (as per the example kindly provided above), I'd like to run one and then the second and then third, but sometimes I'd like to miss out the second. I tried to make a control using two Boolean Ands in the style that your stairs lights are connected, but whatever I do it sends a signal out (true or false) which triggers both loops.
I want it to send on the signal received to one of the loops, and do nothing to the other.
This sounds awfully complicated to describe!
Can anybody help? I'd imagine that this is quite a quick fix if you have the knowledge...
thanks!
Gwilym
LabVIEW 7.1 unfortunately
0 Kudos
Message 14 of 18
(884 Views)
You may be getting to the point where you would want to use a state machine. It sounds like your logic is a little messed up. Please post your code if possible or at the very least a screenshot (in PNG format, not BMP).
Message 15 of 18
(878 Views)

It sounds like you need a State Machine architecture.

Do a search on "State Machine".  There are plenty of examples within this forum.

R

Message 16 of 18
(876 Views)

Code as requested. The selector.vi doesn't do what I want- all I need is like the example below, I think!

I would have each of the instances as separate subVIs, but since there are switches inside the loops LabVIEW says making them into subVIs will alter the functionality.

I'll look at State Machines now, thanks for the tipoff!

 

 

What I'd really like

Message Edited by gwilbob on 08-13-2008 06:17 AM
LabVIEW 7.1 unfortunately
Download All
0 Kudos
Message 17 of 18
(865 Views)
Ummm... Your code is a mess. Really. Each of your loops appears to be identical. This means subVI. Since you want to have the loop stop from the front panel control you can pass a reference of the "Stop" button to the subVI so it can read its value. And I couldn't follow your Boolean logic at all.
0 Kudos
Message 18 of 18
(845 Views)