NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

maintain analog output after step finishes

I am trying to test some hardware using LabVIEW, TestStand, and a PXI chassis. The PXI chassis has an analog out card that supplies a signal to a device, that I then read in via USB.  I have a develope a TestStand sequence that has three steps. 1) set up an AO task, and run it. 2) read the device to see if it interprets the signal properly. 3) Close the task from step 1.  I created a run continuously task in Max. The problem is, when step one finishes, the analog output generation stops. I tried to sustitue the DAQ assistance, and the same thing happens unless I keep the DAQ assistant in a loop, which isn't going to work, obviously, because then step one will never finish.

 

Is there a way I can tell my AO PXI card to generate a signal until I tell it to stop, without looping inside a called VI?  Or do I just really not understand how TestStand sequences are supposed to work?

0 Kudos
Message 1 of 4
(4,116 Views)

Hey Jo-Jo,

 

I think it should be possible to do what you're asking. Could we see a simple version of the code you're trying to use that isn't working properly? We might be able to notice what's causing the incorrect behavior you're seeing.

 

You could also post on the Multifunction DAQ board about this--calling multiple VIs in TestStand is just like calling multiple subVIs from a larger LabVIEW VI, so they would have good insight as well (and more experience with hardware than some of us on the TestStand board).

0 Kudos
Message 2 of 4
(4,079 Views)

 

maybe you're right about this being more of a DAQ question.  I posted the question on the DAQ board.

 

As far as the code, it is just the DAQ analog write VI.  Or the DAQ assistant express VI.

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

Most likely, the issue is that the DAQmx task is being cleared when your first VI finishes execution. In DAQmx, if you call one of the read or write VIs by itself, if the task has not been started, it will implicitly start the task, complete the I/O operation, and then implicitly stop and clear the task. However, we also provide DAQmx Start Task and DAQmx Stop Task VIs, which allow you to perform these operations explicitly.

 

You could have one VI that performs your channel configuration operations and starts the task, then pass that task handle out of the VI and through TestStand. You could have another VI to start the analog output. This VI would need to take the DAQmx task you previously created as an input parameters, and would pass the task back out into TestStand. Finally, you would have a cleanup VI that accepts the DAQmx task as an input parameter and performs the stop and clear task operations.

 

I believe DAQmx installs several examples into LabVIEW which demonstrate the use of these task VIs, but if you have any further questions about it, let us know!

0 Kudos
Message 4 of 4
(4,047 Views)