Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling a subvi more than once with different values for each call

Hi, im busy with a project where im using a PWM subvi to control a servo-motor. I basically need to call this subVI with different Duty Cycle values. I have attached the VI's that im using for this. When i run the program i get the following error.

 

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.

 

I am not sure what this error means or how to solve it. If there is anyone who knows of maybe a better way of passing different values on a subvi, your help will be appreciated.

 

Im using LabView 2011 on Windows XP and the DAQ card im using is NI myDAQ

 

Kind Regards
Luda101

Download All
0 Kudos
Message 1 of 2
(2,738 Views)

Hello Luda0121,

I think that the problem may be in using the Configure Input Buffer VI after the while loop. I would suggest setting the buffer size using the samples per channel property in the Timing VI.

Give that a try and let us know how it works.

Jacob R. | Applications Engineer | National Instruments

0 Kudos
Message 2 of 2
(2,723 Views)