LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to show active frame in flat sequence?

Hi,

How do you show which frame in a flat sequence is active? Highlight execution slows the program and as I scroll through the frames the highlight is sometimes wiped by the display. I tried putting a boolean LED on the front panel but it goes on and stays on because I am running in a while loop. 

0 Kudos
Message 1 of 12
(734 Views)

Hi Ed,

 


@EdHarris wrote:

How do you show which frame in a flat sequence is active?


Such tasks become much easier when you convert your flat sequence into a state machine!

Now it's much simpler to see the active state…

 

On your VI:

You also need to switch off the other LED indicators in the  next frame.

Again: much simpler to use an enum to control your state machine and to show the current value of that enum on the frontpanel…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 12
(731 Views)

@GerdW wrote:

Such tasks become much easier when you convert your flat sequence into a state machine!

Now it's much simpler to see the active state…


You can start by using a Natt Sequence.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 12
(687 Views)

As others have said, your "code architecture" is flawed and not scalable.

 

(I assume this is just an demo example and your real application makes slightly more sense. A greedy loop with fully constant folded content that can never change is just plain silly!)

 

Yes, a state machine is a better architecture, but maybe start with explaining what you are trying to do in your real code. You must have a more realistic application in mind. What problem are you trying to solve?

Message 5 of 12
(646 Views)

If you press Pause it should highlight where you are.

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

Qestit Systems
Certified-LabVIEW-Developer
Message 6 of 12
(606 Views)

@Yamaeda wrote:

If you press Pause it should highlight where you are.


Sadly, no. That would have been nice.

wiebeCARYA_0-1702639018753.png

 

0 Kudos
Message 7 of 12
(588 Views)

wiebe@CARYA wrote:

@Yamaeda wrote:

If you press Pause it should highlight where you are.


Sadly, no. That would have been nice.

wiebeCARYA_0-1702639018753.png

 


When i did it in his flat sequence the frame flashed. 🙂

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

Qestit Systems
Certified-LabVIEW-Developer
Message 8 of 12
(574 Views)

@Yamaeda wrote:

wiebe@CARYA wrote:

@Yamaeda wrote:

If you press Pause it should highlight where you are.


Sadly, no. That would have been nice.

wiebeCARYA_0-1702639018753.png

 


When i did it in his flat sequence the frame flashed. 🙂


Work for me too.

0 Kudos
Message 9 of 12
(563 Views)

Hi GerdW,  Altenbach and Yamaeda,

The pause button doesnt always highlight the whole frame unfortunately, and in this case I prefer to look at the front panel, I used variables to turn on and off some LEDs as seen in multiple youtube but  its not elegant or very scalable I admit. This allows me to monitor the progress and interaction of the sequence along with a second similar one running on another machine. If I had time I would try to build a state machine but its working now and as it is meant to run again and again for months I am not sure a state machine is any better, thanks you helped me through. Incidentally, Altenbach the program includes a modified version of your NTP parse which allows me to access all send and receive timestamps. Thanks again. 

Download All
0 Kudos
Message 10 of 12
(473 Views)