VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Sequence Code for Multi-Task to occur at specified cycle count(s)

I have a test where I need to break out of a task into another task at a predefined number of cycles.  I using a Stimulus Profile Sequence to control the tasks.  I need to break out from the task every 150 cycles and am using a For Loop for this.  In addition, I need to break out every 500 cycles for different task.  Then come back into my original Task.

 

I can't quite figure how to wrap a For Loop inside another For Loop for this event.  I have created a cycle counter and have tried a If Else where I specify the cycle count where to break out for the task, but I would think there is a better way to handle this for a high cycle count test.  Should I create a Variable that becomes true when the Cycle Count is a multiple of 500?  How would I go about this? 

 

Thank you.

0 Kudos
Message 1 of 4
(5,907 Views)

What exactly do you mean by break out of a task into another task? Do you want to suspend one operation and start another at regular intervals?

Jarrod S.
National Instruments
0 Kudos
Message 2 of 4
(5,894 Views)

Jarrod,

That is correct. 

 

Thank you.

0 Kudos
Message 3 of 4
(5,882 Views)

A very helpful reference is the tutorial Getting Started with Stimulus Profiles in NI VeriStand.  Specifically, it seems that the functionality you are looking for could be achieved with more conditional statements, so check out Example 2 in the Tutorial.

 

Best,

Ryan C.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(5,848 Views)