Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I make my 6070E board acquire waveform data at 10 Hz

I use the PXI chassis system with a 6602 timing board and a multifunction 6070E board for data acquisition.   My application involves using the 6602 as a trigger generator to send pulses to laboratory instruments at 10 Hz.  I want to use the 6070E to capture a waveform which is generated each experimental cylce.  I have no problem with the 6602 timing and am able to program and control the trigger timing.  I am having difficulty with the 6070E.  I use the basic analog input vi (AI-Voltage) to create a channel on the 6070E board.  I then call the DAQmx sample clock vi and set the sample clock source as the 20 MHz clock of the 6602.  I then use the DAQmx Strat trigger vi to define the trigger source and then start the application using DAQmx start task.  To capture the waveform, I use the DAQmx Read vi (Analog 1D double; 1 Channel, N sample) which is in a while loop.  I consistently get an error (usually after the second or third program cycle) from the DAQmx Read vi.  The error code is 200019.  Any ideas? 
 
-Darrin
 
0 Kudos
Message 1 of 8
(3,609 Views)
Are you sharing the clock between the two DAQ devices??
0 Kudos
Message 2 of 8
(3,598 Views)
Yes.  I use the DAQmx connect terminals vi to map the 20 MHz clock of the 6602 onto the backplane.  I then use that line as the clock source in the DAQmx timing vi.  I should indicate that I can get this application to work (ie. have the 6070E aquire waveforms and update at 10 Hz using the 6602 clock) if I I use the DAQmx Stop Task vi (in the while loop) to halt the data acquistion.  However, starting and stopping DAQmx Read each loop cycle is bad programming (uses too much CPU resources). 
0 Kudos
Message 3 of 8
(3,584 Views)

could you post the vi that you have built??

probably we can take a look and suggest better

0 Kudos
Message 4 of 8
(3,581 Views)

Hi Darrin1,

 

Thank you for posting to the NI forums.  What do you set the sampling rate of your 6070E to be?  The buffer size of your device is related to its sampling speed.  Error -200019 often occurs when the external clock samples data faster than the buffer can handle.  This is described in the following Knowledge Base entry.

 

What Causes Error -200019 When Increasing the Sampling Rate of an Analog Input Task with an External...

 

After going through the article, post back if you still have problems.

 

Best regards,

 

Ed W.

Applications Engineer
National Instruments

0 Kudos
Message 5 of 8
(3,571 Views)
I have attached my vi at your request.  Although the vi "works" (I'm able to acquire waveform data on AI-0 of the 6070E which updates at 10Hz), I have to stop and strart the acquisition each experimental cycle.  Any recommendations are most appreciated.  Thanks!
-Darrin
 
0 Kudos
Message 6 of 8
(3,554 Views)
Darrin,

If I understand your application correctly it looks like you are trying to use the 20 Mhz timebase as your sample clock for the analog input of the 6070E.  20Mhz is well above the maximum sampling rate of the 6070E.  The rate you specify on the timing VI is used only to allocate a buffer when using an external clock.  The clock source specified on the timing VI is used as the actual sampling clock and is not divided down.  This is why you get error -200019.  In addition you use the connect singles VI but you never disconnect these signals.  If you call this VI again it will throw an error.  In general using this VI is not necessary.  You can just specify the source directly instead of explicitly defining the routing.  DAQmx will take care of the routing for you over the star trigger if the board you are using is in another slot.

Why are you trying to use the 20 Mhz timebase as the sample clock?  Are you wanting to sync the analog input to the counters?

Regards,
Neil S.
0 Kudos
Message 7 of 8
(3,549 Views)
Thank you for the fast response.  Yes, I am trying to sync the analog input to the counters.  My application involves useing the counters as trigger sources in my 10 Hz experiment.  One trigger (or counter output) will cause a laser to fire and I want the analog input of the 6070E to capture the event caused by my laser.  Therefore, I do need to sync the 6070E and the 6602 boards.  (or is it possible to simply trigger the 6070E board at a specific time to capture the waveform, much like an oscilloscope?). 

I chose the 20 MHz timebase as the sample clock for the analog input of the 6070E because it was the slowest timebase from the pull down menu.  If this is too fast, how do I define a slower clock speed and still keep the two devices in sync?  Additionally, you indicated that I was well above the maximum sampling rate of the 6070E at 20MHz; what is the maximum sampling rate and can I use it in my application? 
-Darrin

0 Kudos
Message 8 of 8
(3,542 Views)