LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Low-Speed DAQmx Data Acquisition with Triggered High-Speed Acquisition

Hi everyone,

Labview newbie here.  I am working on a LabView project with the following requirements, and I was wondering if I could get some advice on how to best approach this problem.  I've searched the forums and haven't found any existing solutions to this.

 

Project Requirements

  • Low-speed data measurements (roughly one per second) must be acquired over a longer time frame (roughly an hour)
  • A digital reference trigger will trigger a short period (10 seconds) of pretriggered high-speed data measurements using the same sensors, at a rate of at least 100 Hz.
  • Both the low-speed and high-speed data must be written to text files.  It's ok if they are written to separate files.

As of now, I've implemented the low-speed data acquisition and the trigger.  However, I'm unsure how to proceed with the high-speed data acquisition without running into a 50103 error ("The specified resource is reserved. The operation could not be completed as specified.").  I am already using the DAQmx modules for low-speed acquisition, so how can I also create a buffer and use them for high-speed acquisition?  Thanks so much for all your advice!

0 Kudos
Message 1 of 4
(934 Views)

The easiest way is to use two sets of physical channels, one for the low-speed acquisition and another one for the triggered high-speed acquisition.

If you don't have extra channels, you can acquire the data at high speed and capture the trigger signal as a digital input signal at the same time. Then do some data post-processing on the data:

1. For low-speed data, do down-sampling from 100Hz to 1Hz.

2. Check for the trigger signal as the flag for high-speed data. Log the data at 100Hz when the trigger flag is found.

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 2 of 4
(906 Views)

Couple things: first, if you can, use two channels, one of which uses hardware timing (your high-speed, triggered one) and one of which that uses software timing (i..e, you just call the Read function and get the current value once per second or so).

 

You can't have two things access the same hardware pin at the same time, so you'll need two tasks to do this. Here's some more info on tasks: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019KWYSA2&l=en-US

 

 

(Basically yes, ZYOng is right. I just wanted to add the article about timing engines.)

Message 3 of 4
(881 Views)

I would sample all channels at 'high' speed all the time. Continously read blocks of ~200-1000ms(?). Store the last 20s in a queue, Downsample (decimate with or without a filter) for the slow logfile. in a second task capture the digital input with a timestamp and store the needed data in the second file.

Did something like that for 6 channels @ 10kSPS .. no problem even for 10a old hardware 🙂

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


Message 4 of 4
(836 Views)