NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing DAQmx Task Names from Main & Subsequences

Hello I was curious as to whether there is a way to transfer the DAQmx task name that is used within a subVI I call. I want to run a subseqnece that calls a subvi with a DAQmx task and then proceed to reuse that DAQmx task in another subsequence. How would I go about doing this? I am relatively new to TestStand.

0 Kudos
Message 1 of 4
(3,230 Views)

Make a parameter in your subsequence:

 

Capture.PNG

 

Then from the Sequence Call step in your MainSequence, you can pass the task into the subsequence from another variable:

Capture2.PNG

 

Of course you'll have to pass the task in and out of your code modules as well. Don't forget to clear your task in the Cleanup step group.

 

If you're new to TestStand you should look through the shipping examples here:

C:\Users\Public\Documents\National Instruments\TestStand 2014 (32-bit)\Examples

 

Hope this helps!

Trent

 

 

 

 

https://www.linkedin.com/in/trentweaver
0 Kudos
Message 2 of 4
(3,208 Views)

The issue that I am having with this technique is that my subvi's DAQmx doesn't appear to be generating the task name when I run the program. It generates when I run the VI when called in another main VI, but not standalone and only works when highlight execution is on. Do I need delays between writes for DAQmx? I also appear to be getting a -200088 error code each time as well

0 Kudos
Message 3 of 4
(3,198 Views)

Does that error message have any additional information with it?  

 

It can either mean that the task is invalid/doesn't exist or that it is still executing while trying to do something else (essentially not following the 'Is Task Done' VI)?

Matt | NI Systems Engineering
0 Kudos
Message 4 of 4
(3,170 Views)