Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the 9237 data sampling rate when installed in an FPGA cRIO?

Hi everyone.

 

I have a query about how to precisely set the data sampling rate on a NI 9237 when controlled via the FPGA in a cRIO-9118.

 

Initially I have experimented with this module in a USB cDAQ-9171 to get a feel for how the 9237 works and now understand the data rate is limited and coerced to set values defined by the formulae:

 

fs = (fM / 256) / n,  (where fM = 12.8MHz and 1 ≤ n ≤ 31).

 

This process uses the internal clock of the module to define the rates.  Optionally if one had a second 9237 in a multiple chassis this second 9237 can be controlled by the clock of the first.  The inference here is that the second 9237 is clocked externally.

 

When using the FPGA in a 9118 we have to use the ‘Invoke Method’ to define a sample rate in the Host vi to set the rate in the Target vi.  Is this rate coerced to meet the above formulae or is it controlled by logic in the FPGA?

 

My worry with the coercion is that having defined a sample rate in the Host vi, this rate is not what the 9237 acquires data at in the Target vi, unless that is the rate defined in the Host exactly matches with the coerced value in the target.

 

An additional query here is, can we use the external clock facility of the 9237 to define a sampling data rate?

 

My end task with the target is to acquire a few seconds worth of pressure data using the 9237.  So I need to ensure the FIFO that's used to transfer data never fills up by making sure the Host empties the FIFO quickly enough.

 

Any feedback would be greatly appreciated.

 

Regards

 

Steve

0 Kudos
Message 1 of 4
(3,524 Views)

Hey Steve,

 

My gut feeling on this is that the sample rate is still coerced even though on the FPGA as I think its set in hardware not software. The way to confirm this would be to read the sample rate back through an FPGA I/O property node.

The link below shows all the property nodes available to you there.

http://zone.ni.com/reference/en-XX/help/370984T-01/criodevicehelp/crio-9237/

 

In regards to you second question, I think this should help explain what your after.

 

Configuring the Master Timebase Source for the NI 9237 (FPGA Interface)

http://zone.ni.com/reference/en-XX/help/370984T-01/criodevicehelp/9237_configuring_the_clock_source/

 

Hope this helps

Matt

Matthew Trott
Applications Engineer
National Instruments UK
www.ni.com/ask
0 Kudos
Message 2 of 4
(3,518 Views)

Hi Matt

 

Thanks for the feedback.  I tried to review your suggestion on reading back the sample rate through an FPGA I/O property node, however I could not find the ability to do this in the FPGA target.  (I have achieved reading actual sampling rate in the test LabView code I ran when trialing the 9237 in the USB adapter module - used DAQmx Timing in a Property Node & selected Sample Clock - Rate).

 

This made me rethink what is going on in the FPGA target. So trying to think laterally here, I am thinking the 9237 will always acquire data at the fastest possible rate when run in the FPGA target.  For the 9237 this is 50kHz or 20uS per acquisition.  However the sample rate we define in the FPGA target is the rate at which the FPGA target cycles round at, so we could get data at this maximum rate.  So naturally we should not set a FPGA rate greater than 20uS but can set it at whatever rate we need providing it is lower.

 

So if we chose to run the target at say 1Hz, i.e.. very slowly in this example, then the 9237 acquires a sample in 20uS but we then have the remaining time to extract the data.  Now this kind of makes sense, since you would not want to slow down the time the 9237 takes to get a sample.  The FPGA target rate is now the rate at which you get data.

 

Can you, or anyone else, kind of confirm this.

 

Many thanks

 

Steve

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

 

Hey Steve

 

are you sure you cant read the data rate the bottom table of the first link seems to indicate you can if you set the property node to read.

 

Module Properties

Use the FPGA I/O Property Node to access the following module properties for this device.

PropertyDescription
Data Rate Sets the rate at which the NI 9237 acquires data.
Excitation Voltage Sets the excitation voltage level. All channels share the same excitation voltage.
Module ID Returns the module ID.
Serial Number Returns the unique serial number of the module.
Vendor ID Returns the National Instruments vendor ID, 0x1093.

Matthew Trott
Applications Engineer
National Instruments UK
www.ni.com/ask
0 Kudos
Message 4 of 4
(3,492 Views)