ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Rate in reading strain channels

When adding a strain gauge channel to a task with some voltage channels using AIChannels.CreateStrainGaugeChannel, the rate of data reading is not controlled by the rate sep up in the internal clock. I use the example "ContAcqVoltageSamples_IntClk" in DAQmx. The read rate is very high after adding a strain gauge channel.

 

I noticed that a timer is used in the example of AcqStrainSamples to control the reading frequency, although an interal clock and rate are used. Does anyone has the same problem?

 

Message 1 of 4
(3,628 Views)

Hi jiaohui,

 

If you are using Sample Clock timing, then you are using hardware timing.  With hardware timing, a digital signal from the clock on your device controls the rate of acquisition.  What specific device are you using?  How are you seeing that the rate changes?  What are the values of the sample rate that you configure and the sample rate that you are actually experiencing?

Regards,

Sara Lewandroski
Applications Engineer | National Instruments
0 Kudos
Message 2 of 4
(3,573 Views)

Hi Sara,

 

I am using a NI9237 and NI9205 to a cDAQ9174. From the sample "ContAcqVoltageSamples_IntClk", I can change the sampling rate for the internal clock and the data table updates the acquired data with the required frequency, say 1 sample at 5 Hz. However, after one strain gauge channel is added to the task, the sampling rate is not controlled by the specified rate, i.e, 1 sample at 5 Hz, seems being updated at more than 1000Hz, unless more samples are acquired, say, 10000 samples, then the rate will be reduced.

 

Thanks.

 

Hui

0 Kudos
Message 3 of 4
(3,561 Views)

Hi Hui,

 

You can synchronize the analog input channel (9205) and your strain input channel (9237) by creating a single task that uses a common sample clock.  

 

To do a synchronized continuous acquisition from both your analog input and strain input, you want to go through the following steps:

 

  1. Set up your channels:  configure an analog input channel and then a strain channel.  
  2. Configure your sample clock for continuous mode at a defined rate.  
  3. Start your task.
  4. In a loop, use a DAQmx Read N channels N samples.
  5. Clear the task outside of the loop.

 

Regards,

Sara Lewandroski
Applications Engineer | National Instruments
0 Kudos
Message 4 of 4
(3,544 Views)