From: JoeLabView on
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
From: Dennis Knutson on
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.
From: Shun on
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?
From: JoeLabView on
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
From: Shun on
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!