NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to send a sinewave asynchronously in TestStand

Hi everyone-I have a sinewave that I want to send to a DUT while I write a command to and read a response from the DUT. How do I do this? I included a picture of the steps I have so far...I have an asynchronous step in there right now for a sinewave VI but I'm not sure I have all the settings in there correctly because I'm getting the same response from the "Thor ECG write/read" steps as when I do when I apply no wave in there, so I think I'm missing something. I want to run both sinewave steps for channels AO0&AO1 for about 45 seconds. Please feel free to ask any questions if it is not clear to you what I want to do.

0 Kudos
Message 1 of 6
(2,287 Views)

I want to run 2 sinewave VIs (going to 2 different channels) in the background while I run a couple other steps. How do I do this?

0 Kudos
Message 2 of 6
(2,282 Views)

1. How long do your sine waves run for?

2. You will have to combine the two outputs into a single task.  I am pretty sure you are getting an error from your DAQ due to a resource conflict.  Yes, you can have multiple channels in a single task.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 6
(2,258 Views)

I need to run each sinewave for about 30 seconds, both from channels ao0&ao1 at the same time.

How do I combine the two outputs into one? 

0 Kudos
Message 4 of 6
(2,241 Views)

You can launch your VIs (after merging if you decide to do so) in a subsequence that launches in a new thread or a new execution and use the wait step or any of the other synchronization steps to wait until that thread returns. Alternatively you can let it run its course without waiting for it to return.

 

See this document that explains this in more detail - https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000kG1RSAU&l=en-US

0 Kudos
Message 5 of 6
(2,233 Views)

When you create your task, you have to call the DAQmx Create Virtual Channel for each channel you want to add.  You will then have to calculate your sine waves together and supply those signals to the DAQmx Write configured to write to multiple channels.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 6
(2,223 Views)