LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronize analog input task with analog output and counter input

Hi,

 

I have a PCI-6259 and am trying to synchronize an analog input task with both an analog output task and a counter input task. I have the analog output and counter input wired to use the ai/SampleClock timing source, but my VI seems to hang whenever I run it. It seems that the analog output task never completes.

 

The program that I am trying to implement involves a motor-driven carriage. The analog output sends a 2D array of voltages to the motor controller to set the speed of the carriage in the x- and y-directions. Simultaneously, I would like to read data on two analog input channels from another instrument and also read the x-position of the carriage using a linear encoder wired up to a counter. If I run just the analog input and counter input tasks alone, the VI completes successfully. It won't run whenever the analog output task is included.

 

The subVI that handles this part of my code is attached (LabVIEW 2009 format). I've tried to model it after this example and have just added the analog output to it. It accepts a 2D array of voltages that define the motor speeds and a sampling rate from the main VI. The output is the readout from the analog input channels and the linear encoder.

 

Can anyone see what I've done wrong?

 

Thanks,

Dan Asselin

0 Kudos
Message 1 of 1
(2,199 Views)