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: 

windows embedded standard, 1 Mhz timed loop

Hi, I am trying to build a data acquisition code in LabVIEW 2017 for a project I am working on. I would like to read data into a queue from a DAQ at 10K Hz, 500K samples, and do an average and graphing after data has been gathered. I looked at running the code in a timed loop, but I only am given the option of a 1 KHz loop. The project will be built into an .exe and deployed onto a Windows Embedded Standard system, the final system will be purchased when the system load is determined. The code will be developed on a separate laptop running Windows 10 home for debug. Is there something I am missing to get the timed loop set up for 1 MHz? Attached is a picture of the timed loop configuration I am seeing.

0 Kudos
Message 1 of 4
(2,194 Views)

If you click on the help button on the config page it will have information about items on the page.  Look under internal timing sources in the help file.  I linked to a 2013 version I found on the NI site, so it could be different for the actual version you are using.

 

http://zone.ni.com/reference/en-XX/help/371361K-01/lvconcepts/con_select_timed_struct_timing/

 

1 MHz Clock—Supported targets can use the 1 MHz clock timing source to control a timed structure. Using the 1 MHz clock, you can schedule a timed structure with microsecond resolution. If the target does not support microsecond resolution due to processor or operating system limitations, the 1 MHz clock is not available.

0 Kudos
Message 2 of 4
(2,183 Views)

The timed loop function won't work for Windows.  Windows does not support deterministic execution, you'd need an appropriate NI Real Time environment.

 

If you are using an NI DAQ, set up a producer consumer architecture (white paper) and use the hardware to do the exact timing.  The producer loop will read the DAQ buffer and use a queue to transfer the samples to the consumer loop where you can average and graph the data without slowing down the DAQ.

 

 Here is an example, DAQmx Generate Acquired Data with Queues, where data is read then 'played back' with a delay.  However, you could remove the playback function and replace it with functions to analyze and graph the data.

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

Windows (even WES) is not suitable for such high frequencies, however you may still get 500 kHz samples at 1 kHz loop frequency, simply reading 500 samples at once. Of course you should setup DAQ for buffered acquisition.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 4 of 4
(2,165 Views)