LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timed Sequence

Solved!
Go to solution

Hello,

 

I am trying to create a Timed Sequence where each frame is activated after a certain amount of time is passed after the activation of the previous frame but my VI never goes past the first frame.

Any help is appreciated 🙂

 

Jimmy

0 Kudos
Message 1 of 4
(2,659 Views)
Solution
Accepted by topic author JimmySFU

It can only go to the next frame once all code it the current frame has completed. This happens in the first frame when the stop button wired to the loop termination is pressed. The second frame will never finish, because the loop termination will never be true, thus the loop can never complete. The remaining frames can never be reached and their content is thus irrelevant.

Message 2 of 4
(2,648 Views)

Thank you! I have updated this VI with a flat sequence and a tab for timing. This is what i was looking for but also wonder if there is a neat way to do it better than I did.

0 Kudos
Message 3 of 4
(2,612 Views)

Instead of focusing in irrelevant features (tabs on the front panel), try to focus on the code.

 

  • the "high resolution relative seconds" is useless to display in indicators, because it is meaningless. Same for the ms timer value.
  • why do you think you need to do the multiplication with 1000 with every loop iteration. Wouldn't once before the loop be sufficient (the compiller will fix it, bit still....).
  • Why do you do the same multiplication with the same inputs twice in parallel? (in each loop!)
  • Use tick count to mix with the tick count output of the wait function. Keep it blue.
  • You have four instances of basically identical code. re-use. All you need is a single loop and no sequence (and a little bit more logic).
  • Timing code is extremely convoluted and makes no sense.
  • ...

 

I really recommend to continue with a few basic tutorials first.

  • Fill your controlw with typical default values. Zeroes are not typical here. 
Message 4 of 4
(2,602 Views)