From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Basic Newbie Question

Solved!
Go to solution
Hi, I am trying to add a light display to indicate when a certain portion of my code is running. Basically, I need to know how to turn on and off a single boolean indicator within a flat sequence structure. Any help would be appreciated. Thankszzz.JPG
0 Kudos
Message 1 of 5
(3,336 Views)
Solution
Accepted by topic author DoomPirate

Hi DoomPirate,

place your indicator in the first frame and a local variable or an property node of it in the last.

It's also possible with only the indicator if you use a statemachine architecture.

 

Mike

Message 2 of 5
(3,325 Views)
Thanks mike, It worked. I went with the property node route. I wasted 5 hours trying to get it to work last week. I had a major headache.
0 Kudos
Message 3 of 5
(3,310 Views)

One thing you can try now, which is quite beutiful code:

 

Make a while loop

Create a led indicator

Connect the indicator to the while loop and make it a shift register

blink.JPG

 

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 5
(3,286 Views)

As a basic newbiew, you make the mistake of sequence overuse. They are very rarely needed. You should always think in terms of a state machine.

 

 

Here is a very simple linear two-state machine that duplicates your code quite accurately. As you can see, no sequence structures, local variables or property nodes are needed.

 

 


DoomPirate wrote:
Thanks mike, It worked. I went with the property node route. I wasted 5 hours trying to get it to work last week. I had a major headache.

Here's another big beginner mistake. In simple cases like this, you should always pick a local variable over a value property node. Property nodes are literally orders of magnitude more expensive. Property nodes should only be used if really needed (e.g. access an element inside a cluster or in another VI). 

Message Edited by altenbach on 06-29-2009 09:08 AM
0 Kudos
Message 5 of 5
(3,271 Views)