12-14-2023 04:17 AM
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.
12-14-2023 04:21 AM - edited 12-14-2023 04:24 AM
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…
12-14-2023 06:38 AM
@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.
12-14-2023 08:16 AM
12-14-2023 10:46 AM
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?
12-15-2023 03:16 AM
If you press Pause it should highlight where you are.
12-15-2023 05:17 AM
@Yamaeda wrote:
If you press Pause it should highlight where you are.
Sadly, no. That would have been nice.
12-15-2023 07:18 AM
wiebe@CARYA wrote:
@Yamaeda wrote:
If you press Pause it should highlight where you are.
Sadly, no. That would have been nice.
When i did it in his flat sequence the frame flashed. 🙂
12-15-2023 07:43 AM
@Yamaeda wrote:
wiebe@CARYA wrote:
@Yamaeda wrote:
If you press Pause it should highlight where you are.
Sadly, no. That would have been nice.
When i did it in his flat sequence the frame flashed. 🙂
Work for me too.
12-17-2023 06:25 PM
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.