LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

[Scan mode] Failed to reach an acquisition period less than 40 ms (cRIO-9024 + NI-9207)

Solved!
Go to solution

Hello,

I have trying to acquire analog data with a NI-9207 module (analog inputs) mounted on a cRIO-9024.

The signal (waveform at 1 Hz frequency) is generated by a PXI.

To achieve that, I have adapted the exemple 'Analog Input - Getting Started - Scan Mode' provided by NI (see attached VI + picture).

In the project window, I have configured :

- the NI-9207 in 'high speed' mode (should be able to acquire data up to 2 ms)

- the period of the scan mode of cRIO-9024 at 10 ms

- the period of the VI acquisition loop at 20 ms

 

With these settings, I was expecting the data acquired by the cRIO to change every 20 ms (acquisition loop frequency).

This is not what I notice during the test (see picture in attached) : the data only change every 40 ms.

Do you have any idea where I am wrong ? Thank you in advance

 

Here is my configuration :

- LABVIEW 2018

 

Download All
0 Kudos
Message 1 of 4
(1,598 Views)

Hi guirec,

 

in general I don't recommend to use ScanEngine, NetworkSharedVariables and loops of different priorities all mixed together while still expected strict realtime behaviour…

 

Why do you have two wait functions in the "low priority" loop, the timeout of the NSV and that additional 20ms wait?

Why do you need two loops at all?

Why is there an UI for this cRIO9024 at all? It's a headless device!

Best regards,
GerdW


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

Thank you for your quick answer. I think the two waits were in the initial example; I have modified the low priority loop as follows (see attached), but the result is the same.

Do you have an idea what I should do to reach the acquisition period I'm looking for ? (1 ms).

Should I configure the FPGA of the cRIO-9024 ?

0 Kudos
Message 3 of 4
(1,581 Views)
Solution
Accepted by topic author dina.irofti

Hi guirec,

 


@dina.irofti wrote:

Thank you for your quick answer. I think the two waits were in the initial example; I have modified the low priority loop as follows (see attached), but the result is the same.


Why do you still need two loops?

 


@dina.irofti wrote:

Do you have an idea what I should do to reach the acquisition period I'm looking for ? (1 ms).

Should I configure the FPGA of the cRIO-9024 ?


NI claims the ScanEngine will be able to handle a samplerate of 1kS/s for a (very)  small amount of channels.

But as I prefer to use the FPGA I can recommend to use it instead: the FPGA will guarantee those sample rates (as long as the used module allows) and you can transfer that amount of samples using FIFOs between FPGA and RT…

Best regards,
GerdW


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