Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ-mx Analog Input and Output error

Hello,
 
I am programming a piezo stage to raster scan using the 2 analog output ports on my BNC 2110 connector block.  My DAQ card model PCI-6052E.  I am using buffered waveform generation to control the scan and at the same time reading the displacement of the stage using 2 analog input ports.  For 2 days, my program was working properly and I was able to simultaneously raster scan my stage and read the displacement.  However, for some reason, my program no longer works and I have been searching fruitlessly for a solution.
 
Here is an outline of my application:
1)  Generate 2 waveforms
2)  Create a multichannel Analog In task
3)  Create a multichannel Analog Out task
4)  Configure the timing for both task using a waveform from (1)
5)  Write the 2 Waveforms using DAQmx_write vi
6)  Start the Analog Out task
7)  Start the Analog In task
😎  Run DAQmx_read vi
 
I have learned the following:
I can run DAQmx_write.vi alone
I can run DAQmx_read.vi alone
I cannot run DAQmx_write and DAQmx_read together
     As soon as I wire in a DAQmx_write into my block diagram, the DAQmx_read malfunctions.  Normally DAQmx_read will spend some
     time to read from the buffer, but when I wire in a DAQmx_write, the read vi spontaneously collects all the data.  Even though the read vi
     should take over a minute to collect all the sample points, I get a set of garbage instantly.
I tried to reinstall the DAQmx 7.2 drivers, but it did not solve my problem
I ran the "Multi-Function-Synch AI-AO.vi" example and have the same problem (and an additional error -- attempted to read samples that are
     no longer available)
 
I have attached a copy of my vi and the subvi's necessary to run the application.
 
Thankyou,
Long
0 Kudos
Message 1 of 3
(3,355 Views)
I was able to run the VI with a few modifications.  I wired the errors on the Start Tasks so they would run in a particular sequence.  I also changed the scan rate just so I could see what was happening faster.  Where you trying to acquire/output at 1 Hz?
Alex A.
Applications Engineer
0 Kudos
Message 2 of 3
(3,324 Views)

Alex,

I could not open your code since I have an older version of labview.  However, I was able to resolve my problem.  It turns out that my code was operational, there was something wrong with the hardware.  I moved the DAQ card to another PCI slot and it works fine. 

Thanks,

Long

0 Kudos
Message 3 of 3
(3,267 Views)