LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is There A Relay Control of Boolean?

Hello,

Is there an existing Relay Control I can use in LabView? I simply need the path "to be connected" when somewhere I receive a TRUE and "to be disconnected" when "FALSE" is received. Thanks!

Allen
0 Kudos
Message 1 of 16
(4,052 Views)
Would a case structure work? or maybe a simple select, which would be found under comparison.
- there is always an easy way, but it is always the hardest to find
0 Kudos
Message 2 of 16
(4,050 Views)
What "path" are you referring to? Are you talking about a wire? You can't connect/disconnect a wire that way. What are you trying to do?
0 Kudos
Message 3 of 16
(4,043 Views)

Sounds like you are trying to control a relay from labview.

If so, the answer is no.. there's nothing existing like that, but you can create your own solution.

For instance, we controlled a set of 3 small relays by using the parallel port.  Simply writing a high or low value on the appropriate line would open or close the relay.  However, you have to look at the specs of the relay and make sure it does not overload your port.

RayR

0 Kudos
Message 4 of 16
(4,025 Views)
Case Structure has alreay worked in my application. Thanks!
I have tried creating a simple relay control by using the case structure, but have no luck yet. (Many things tried. When I tried to connect an input from a Select Control to a tunnel of the Case frame, LV prompt me to change the tunnel from output (default?) to input, and I don't know how.)(The Case Structure does not allow to link one side to the other in a blank Case frame without any purpose. If it does the desired relay control can be easily done.)
I need the control to "pass a desired value" (or simply "connected") if TRUE and to "have nothing to do (or have no connection) with the input" if FALSE.
 
 
0 Kudos
Message 5 of 16
(3,989 Views)

OK... oops... I was thinking of an actual relay.

Do a search on "Functional Global Variables".  It should allow you to accomplish what you are trying to do.

You are trying to retain the last value and use it again.  If so, and if you already have a loop, then the Shift Register is the way to go.

Or.... am  I completely misunderstanding everything??

 

I'm basing it on this comment: (The Case Structure does not allow to link one side to the other in a blank Case frame without any purpose. If it does the desired relay control can be easily done.)



Message Edited by JoeLabView on 05-07-2008 10:39 AM
0 Kudos
Message 6 of 16
(3,982 Views)

I'm a bit confused too. You can't have a wire connected at some point and disconnected at another. With of a case statement, you have to pass something out of each case. It can be the last value as Joe mentions with a shift register or it can be some constant. There is the express Relay that either passes a signal or an empty one. Whatever you have processing the signal, can be setup to detect and act on the data. Another option - whatever you have processing the signal, you could place that inside the case statement.

Post your code so someone can see exactly what it is you are trying to do.

0 Kudos
Message 7 of 16
(3,978 Views)
Joe did not misunderstand my expression this time. I got Dennis point as well. I shall study the shift register and give it another try later.
 
I actually connect the output of STOP button to the selector terminal of Case Structure. I put a lot of property nodes (Value-Write) in its TRUE case. (For example, I use one of the property node to switch back the default setting (OFF) of my Start/Power button. <This also helps send "0" through digital output and turn off the power.>) I don't like that I am using the property nodes to default the settings when the STOP is pressed. But I have not figured out a way to do it when I click the "Run" icon. Do you have a way for me to initialize my controls or variables with the their defaults when the Run icon is clicked? If no, what usually do you use?
0 Kudos
Message 8 of 16
(3,954 Views)

OK..  I think you need to understand LabVIEW architecture.  People always overcomplicate something that can be done much more simply. You may not even need a single property node.  If you have a large while loop that encloses your code, then you can put one (or many) shift register on it.  Store the latest value in that wire.  A shift register is placed by right-click on the right or left edge of a loop and selecting Shift Register.

Can you describe in the simplest terms what you are trying to do?  Have you worked with state machines before?  ie done a diagram..

If you have a User Interface and would like to change states based on pressing a particular button, then an Event Structure is the way to go.   You can have a case foto handle each of the individual buttons and any other state change that affects the function of your software.

RayR

0 Kudos
Message 9 of 16
(3,932 Views)

Joe,

what is case foto? Could you please make a short example of using it to handle different event triggers? How can a case foto know which event/control sent over a TRUE?

Thanks!

0 Kudos
Message 10 of 16
(3,920 Views)