LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI 9212 Sampling rate too high FPGA

Solved!
Go to solution

Hello,

I'm using a cRio 9074 equipped with NI 9212 (Mod 1, thermocouple), NI 9219 (Mod 5, some minor sensors) and NI 9472 (Mod 6, control of the setup). A picture of the FPGA vi is attached. The aim is to aquire the thermocouples and control parameters at the same instant of time. That's why I put the control bits (called Array in the picture) back in the FIFO.

According to the datasheet the NI9212 sould have a sampling rate of 95 S/s in high speed mode. Actually my FPGA Loop runs at 9,75 ms resulting in a sampling rate of 102,5 S/s. The same happens in a minimal example with only the Ni 9212 installed.

 

Can somebody explain what is wrong?

0 Kudos
Message 1 of 4
(2,438 Views)
Solution
Accepted by topic author Mino529

Hi Mino,

 

I would use use separate loops for each module and put a wait function in each loop to have it run at its iteration speed…

 

The aim is to aquire the thermocouples and control parameters at the same instant of time.

Right now there is no synchronization between the modules (and I think you cannot get any synch), so they already don't acquire "at the same instant of time"…

Is it important to read 8 thermocouples at the very same microsecond as those Mod5 channels? Even when the thermocouples only read new values every 10ms?

 

Btw. you try to read as fast as possible, but your VI stays within 10% of the specified sample rate: I wouldn't call this "too high"…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,428 Views)

Okay, you are right. Maybe I have to put "at the same instant of time" into perspective. Lets say, ist is tolerable as long as the delay is lower than the acqusition time. Therefore nothing special concerning synchronization. 

As far as i know, common approches to syncronize (e.g. one device as master clock, ...) don't work with the both devices. 

 

I was just wondering why the sampling rate differs. I thought the sampling rate is given by hardware for the sigma delta device and only this dedicated rates can be used. I'm fine with 95 as well as with 102,5 S/s if I can trust them.

0 Kudos
Message 3 of 4
(2,408 Views)

Hi Mino,

 

I was just wondering why the sampling rate differs. I thought the sampling rate is given by hardware for the sigma delta device and only this dedicated rates can be used.

The sampling rate in the datasheet is assured by NI as "minimal value to expect", but not given as "you will get exactly this sampling rate". To avoid problems with hardware deviations, noise in the timing engine etc. I would also specify (and assure) a value in the datasheet lower than the actual value…

Using a different module of the same type may result in slightly different sampling rates when you still try to read as fast as possible!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(2,404 Views)