Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx buffer error in TestStand but not in LabVIEW

Hello super users,

 

I am trying to use the cDAQ9174/NI 9475 to generate continuous pulses.  My code works fine in LabVIEW.  However, I run into buffer error when using the same code in TestStand (full error description below).  I attached 3 VIs which belong to a packed library which is used as code module in TestStand

1) cDAQ Pulse Gen.vi: generate the pulse.  It has a loop that can be exited by reading from a FGV.

2) cDAQ Pulse Stop.vi: Send a True to the FGV, in turn, read by the VI in (1) then exit the loop and clear the DAQmx task.

3) Pulse Gen FGV.vi: the Functional Global Variable

 

In TestStand, I spin a new thread to keep the pulse going (I have to do this to run other TestStand steps while the DAQmx generation are iterating in the cDAQ Pulse Gen.vi loop), and stop the loop in a Cleanup step.

Questions:

1) Why do I get the error while running with TestStand, but not LabVIEW?

2) Is there a better way to do this? I want to turn the pulse on in a TestStand step, read the pulses with the Unit Under Test, then stop the pulses.

 

Thank you,

 

-------

Error description

Possible reason(s):

DAQmx Write failed, because a previous DAQmx Write automatically configured the output buffer size. The buffer size is equal to the original number of samples written per channel, so no more data can be written prior to starting the task.

Start the generation before the second DAQmx Write, or set Auto Start to true in all occurences of DAQmx Write. To incrementally write into the buffer prior to starting the task, call DAQmx Configure Output Buffer before the first DAQmx Write.

Task Name: _unnamedTask<32>

0 Kudos
Message 1 of 1
(929 Views)