Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

set initial state of a string

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!

0 Kudos
Message 1 of 6
(4,353 Views)

@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


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 6
(4,351 Views)

Thank you Jeff.  ...and Kudos to Altenbach for a detailed post on how to use the colour box. 

 

http://forums.ni.com/t5/LabVIEW/How-to-Control-color-of-each-element-in-a-cluster/m-p/236274?view=by...

 

 

0 Kudos
Message 3 of 6
(4,344 Views)

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 😄

 

 

0 Kudos
Message 4 of 6
(4,342 Views)

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 😄 


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 6
(4,336 Views)

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!

 

Message 6 of 6
(4,301 Views)