Components

cancel
Showing results for 
Search instead for 
Did you mean: 

Real-Time Event-Based Sequencer

Please provide feedback, comments, and questions on the Real-Time Event-Based Sequencer Reference Example in this thread.
0 Kudos
Message 1 of 4
(8,885 Views)

This ref design fits my requirements pretty well, thanks.

 

I would like to use Timed Loops in my application only because I want some of my execution step VIs to 1) have priority over other loops in the system,and 2) be repeatable, timing-wise. I don't really need determinism.

 

Some of my step VIs will contain a state machine loop.

 

Question about the Execution VI. 

Why are you using VI server? Couldn't you just put all the Step VIs on the diagram inside the case where you have the Run VI method?

 

Questions about nested loops.

I see the Execution VI has a For loop inside the Timed Loop, and the step VIs contain For and While Loops. Is that ok to mix all those loop types on RT?

 

I heard that you should go with all While or all Timed loops, and also it is not good touse nested Timed Loops.

 

If the Execution.vi just had a Timed Loop indexed by Steps to Run (not the For loop) to sequence the step VIs, and the step VIs were on the Execution.vi diagram as described above, then I would have a situation of nested Timed Loops. The Excution.vi sequencer loop and the loops inside the step VIs. If I used VI Server to call the step VIs, could I consider the step loops no longer nested inside the Execution.vi loop? << hope this makes sense, Thanks.

 

Chris C.

 

0 Kudos
Message 2 of 4
(8,745 Views)

Why are you using VI server? Couldn't you just put all the Step VIs on the diagram inside the case where you have the Run VI method?

 You could, but that makes it more static.   Typically you would build the Steps into a LLB that includes all the dependencies.

 

 I see the Execution VI has a For loop inside the Timed Loop, and the step VIs contain For and While Loops. Is that ok to mix all those loop types on RT?

 It is ok to do that.  What you need to be concerned about on RT is the method that you use to set priorities. You should either use VI priority or set Timed Loop priority.  You do not want to mix and match those.  You are also correct about not using timed loops inside of timed loops (get difficult to determine the correct priority.

 

If I used VI Server to call the step VIs, could I consider the step loops no longer nested inside the Execution.vi loop? 

To be honest I am not sure.  I think the question is if you call a VI inside a timed loop using VI server, does the VI inherit the priority set by the timed loop.  I don't know the answer to that one. Of course if you don't care about determinism, then you should just set everything to the default priority and you will be ok.

 

If you liked this article and example code then you might also like another higher level article Multi-process Engine.

Brian K.
0 Kudos
Message 3 of 4
(8,726 Views)

Thanks for your answers. MPE Multi-process Engine looks good, I'll definitely check it out in detail.

 

cc

0 Kudos
Message 4 of 4
(8,723 Views)