09-10-2020 04:24 AM
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
Solved! Go to Solution.
09-10-2020 04:32 AM - edited 09-10-2020 04:33 AM
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!
09-10-2020 04:58 AM
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 ?
09-10-2020 06:18 AM - edited 09-10-2020 06:19 AM
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…