01-23-2015 01:28 PM
Please see the attached VI. It is attempting to test for a valid connection to a serial device. It allows the user 10 attempts before it will turn off. There is a stop button so you don't have to sit through 10 attempts. I want an error condition to be reported and then the user can try again on a different port.
I would like a string "Starting..." fed to an indicator. As the user attempts to connect, the indicator counts off the errors. When it connects successfully, the indicator should show the response from the device. The OR gate on the right receives a TRUE at the start, but waits for the other input before firing, which beats me since the OR condition has already been met. Net result is not as anticipated.
Ideally, I would like the LED to be grey for initial state, then red or green for fail or pass. Is there a 3-state object I am just not finding?
Any comments would be highly appreciated -- thanks!
01-23-2015 01:38 PM
@Thys wrote:
Is there a 3-state object I am just not finding?
Any comments would be highly appreciated -- thanks!
A color box indicator would do
01-23-2015 02:54 PM
Thank you Jeff. ...and Kudos to Altenbach for a detailed post on how to use the colour box.
01-23-2015 03:23 PM
Ok wired in the colour trick. Can't get my head around how to grab an indicator early (before or on first DO WHILE loop) and again at the end. In text language I would say
var1 = start_condition
var2 = start_condition
DO WHILE
...
...
var1 = new_condition
var2 = new_condition
...
END WHILE
var1 = final_condition
var2 = final condition
Except I can't put the same obect in graphically 3 times, hence my pile of conditional constructs. Laugh at me but please point me in the right LabView direction 😄
01-23-2015 04:23 PM
In LabVIEW that's called a queued state machine. Init case output color begin update terminal iterate to case begin, update, iterate to case wait for begun (over and over so interruptions may be handled sanely) update....
Right now I'm mobile with limits. Click on my alias and look in my tag cloud for Grandma. I have a nice post tagged from a very brilliant LabVIEW Champion 😄
01-26-2015 07:54 AM
Jeff did you ever get that cookie? Grandma is a wise old lady and knows you will get there when you've taken care of the event-ualities. (sorry hehe) I however, am still trying to get that kid into the car!
QSM gives me new search material -- thanks for that. My state is que-relous and, like the machine, I'll be baaaack!