LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

indicator control

Championsssssssss Smiley Wink
 
I have 2 indicators. If any one of the indicator got a value other than zero, the vi should stop running Smiley Wink . I tried to achieve but in vain. Smiley Sad please give me a sample structure.
 
Mathan
0 Kudos
Message 1 of 52
(4,278 Views)
Just one question out of curiosity:
Why the hack do you have to rely on indicators?? It's simpler to just rely on wire-values......

Norbert
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 2 of 52
(4,268 Views)
Hi mathan,
try this.
Hope it helps.
Mike
Message 3 of 52
(4,254 Views)

Or you can use local variables, if the wires are far... (they are not always bad.)

Iit depends of your program's style.

Message 4 of 52
(4,233 Views)

Using Local Variables "if the wires are far" is not always a good suggestion, since Local's are prone to race conditions.

As for programming styles, people should adopt what NI proposes.  And using the wires (direct wiring) is always the better approach.

The code should be structured in such a way that it is never far between objects wired together.

RayR

 



Message Edited by JoeLabView on 05-13-2008 08:19 AM
Message 5 of 52
(4,234 Views)
I tried this one and it works fine.
 
 
Mathan


Message Edited by mathan on 05-13-2008 07:42 AM
0 Kudos
Message 6 of 52
(4,206 Views)
Just attache those wires directly to the not equal and get rid of those ugly locals...you CAN have the wire attached to the indicator AND the not equal....
________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
Message 7 of 52
(4,195 Views)
Hi mathan,

what do we see in your picture?
Where are those locals are coming from?
Why do your indicators don't have labels?
Why don't you use wires if the indicator is just near the local (only applicable if the locals belongs to those indicators)?

For me this is just an example of bad programming style...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 8 of 52
(4,193 Views)

I would have given Gerd 20 stars if I could.  Listyen to his advice, it is good.

Why are you using Local Variables?  Don't tell me that they are the same as the indicators coming out of the two sub-vi's!!

 

Message 9 of 52
(4,156 Views)

Mathan,

I have to agree with Ray and Gerd about the use of local variables. In this code

"...Result" and "....Result 2" will probably be read BEFORE the results of Doctor and Patient complete. Wires are always prefered over locals etc.

I play a game while developing where I win if I don't use any locals. Try it, your code will benefit.

Trying to help,

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 10 of 52
(4,135 Views)