From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Doubts about module NI 9208

Hi all,

 

I have some doubts abount the module NI 9208. In an existing project I have a cRIO 9035 with two Ethercat NI 9145. In the ETH1 I have installed 8 NI 9208 module which read analog measures from several pressure and temperature sensors.

 

In the cRIO I have a timed loop that is set for sampling at 50Hz (20ms). In particular that cycle read all 16 channel from the NI 9208 on slot 2.

 

From the datasheet the NI 9208 has a frequency sample of 500Hz aggregated that means 31,25Hz per channel. This means that I can't acquire from a single channel at 50Hz?

 

In the timed loop at 50Hz I don't have delay and the cycle end always in time. The data that I read from the NI 9208 are correct or I read a buffered value because I am sampling at a frequency higher than that allowed?

 

I hope someone can clarify me this points because probably I am missing something.

 

Penzium

 

 

0 Kudos
Message 1 of 9
(2,240 Views)

Hi Penzium,

 

when you have questions on your specific implementation (aka VI) then you should attach that VI!

 


@Penzium wrote:

From the datasheet the NI 9208 has a frequency sample of 500Hz aggregated that means 31,25Hz per channel. This means that I can't acquire from a single channel at 50Hz?


You can read a single channel at 50Hz. You can read a single channel even at 500Hz.

But reading 16 channels will only allow upto ~31Hz…

 


@Penzium wrote:

In the timed loop at 50Hz I don't have delay and the cycle end always in time. The data that I read from the NI 9208 are correct or I read a buffered value because I am sampling at a frequency higher than that allowed?


This depends on how you read the data from your NI9208.

How do you do that? Mind to attach your VI (or even the full project)?

Best regards,
GerdW


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

Hi GerdW,

 

thanks for the reply. I have attached to this post the VI where I read the module.

 

This VI is enclosed in a timed loop and cycle at 20ms (50Hz). As you can see I use the Scanned Variable Read Function, this function is inside a for loop and I pass it the path to the scanned variable (ex. ni.var.io://NI-cRIO-9035-01BA3405/EtherCAT Master/ETH1/Mod2/AI4) I collect all data in an array that is sent after to HMI.

 

Tell me if you need other info.

 

Penzium

0 Kudos
Message 3 of 9
(2,203 Views)

Hi Penzium,

 

using the ScanEngine will limit your sample rate: how did you configure the ScanEngine?

(Do you really want to read 16 channels from your NI9208 by reading each channel separately using the ScanEngine?)

 

The ScanEngine will also act as a buffer for your measurement data, when you try to read faster then the device can deliver new data you will read buffered data…

Best regards,
GerdW


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

Hi GerdW,

 

the Scan Engine is configured with a "Scan Period" of 10ms and a "Network Publishing Period" of 100ms. The cycle when I acquire the data is a timed loop synchronized to the Scan Engine with a period of 2 scans.

 

Regard to your question if I want to read 16 channels with the Scan Engine...It is a project that I have inherited,if there are alternatives I will evaluate it...you mean it is better using the FPGA for acquiring?

 

Thanks.

 

Penzium

0 Kudos
Message 5 of 9
(2,194 Views)

Hi Penzium,

 


@Penzium wrote:

Regard to your question if I want to read 16 channels with the Scan Engine...It is a project that I have inherited,if there are alternatives I will evaluate it...you mean it is better using the FPGA for acquiring?


I don't think you can employ the FPGA to read data from modules in a connected Ethernet chassis. You are forced to use the ScanEngine instead…

 


@Penzium wrote:

the Scan Engine is configured with a "Scan Period" of 10ms and a "Network Publishing Period" of 100ms. The cycle when I acquire the data is a timed loop synchronized to the Scan Engine with a period of 2 scans.


It's been years since I used the ScanEngine. And back in those times I used a scan period of 100ms. It's also several years ago when I was using a 9145 (or 9144) Ethernet chassis, so my knowledge about those devices is limited nowadays…

 

I'm not sure the ScanEngine will be able to read from the Ethernet chassis at 10ms rate.

And surely your NI9208 modules are limited to ~31Hz (or ~30ms) sample rate when you read all channels - so reading at 100Hz doesn't make a lot of sense…

Best regards,
GerdW


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

make sure you set your properties of the 9208 to high speed in the scan engine setting, not high resolution, then you can achieve 31Hz of all 16 channels.  I just did that in my own project recently.

0 Kudos
Message 7 of 9
(2,161 Views)

Hi GerdW,

 

thank you for you considerations. Apparently I am able to use the Scan Engine at 10ms on Ethercat chassis, the problems occur below 10ms where I have verified Ethercat errors in the past but is not my case.

 

Penzium 

0 Kudos
Message 8 of 9
(2,141 Views)

Thanks Mike, currently I checked and I am using High resolution, I will change to High speed as soon as possible.

0 Kudos
Message 9 of 9
(2,139 Views)