LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

processing signals every 10 ms during 500kHz aquisition?

Hello,
 
I have a question. I have a PXI-8106 Controller and a PXI-6123. For my project I need to sample (after a trigger signal) 8 analog input channels with 500kHz. Up to now I have created a DAQmx task for this, with which I read all channels until the number of specified samples is reached. Afterwards I log the data. But now I simultaneously want to take one Sample of data (all 8 channels) every 10 ms for processing these signals. Is this possible without effecting/disturbing the RealTime Performance? I've already tried this with a)shared variables and b) two timed loops where I read one sample each iteration, but I'm not sure if this is the right way.
 
Thanks a lot
 
Griza
0 Kudos
Message 1 of 7
(2,555 Views)
Hello Griza,

I don't know your Real Time architecture but I if you won't disturbing the Real Time Performance you need two loops.
The High Priority Loop for the Data Aquisition and the Low Priority Loop for data logging because data logging is not deterministic.
Now is the questions what will you do with the samples you get every 10 ms?
Do you need this values in the Normal Priority Loop or in the High Priority Loop?

Regards,

WolfgangZ
0 Kudos
Message 2 of 7
(2,525 Views)

Hi,

what I want to do every 10 ms is a "density profile calculation" which is supposed to be shown as a video signal during the time the data is beeing aquired (10 s). The calculated profile ist not used for control only for presentation. The data logging shall take place after all data is aquired. Are there more questions, I'm not sure if the explanation is sufficient!?

Thanks,

 Griza

0 Kudos
Message 3 of 7
(2,521 Views)
And what is the loop rate of your High Priority Loop with the date aquisition?

Regards,

WolfgangZ
0 Kudos
Message 4 of 7
(2,516 Views)
Hi,
 
that's exactly what my problem is about! I don't know how implement this without losing data or affecting performance. As a whole the program shall wait for a hardware trigger, then prepare the filename under which the data is stored later, wait for a second trigger, then start the aquisition and aquire data for 10s + calculation of the profile in parallel, after end of aquisition store the data and upload to a webserver. Then everything again from the beginning until the user stops the program. The problem left is how to implement aquisition and profile calculation.
-a DAQmx task which reads only 1 Sample in loop?
-a DAQmx task which reads 5000 Samples in a timed loop (10ms loop period)?
-a DaQmx task which reads all Samples  (is there a possibility to get a piece of the data in between or only after all samples beeing aquired)?
-an alternative to a DAQmx task?
 
I've started working with LabView only 4 months ago, sorry if this is to solve very easily!
 
Thanks
 
Griza
0 Kudos
Message 5 of 7
(2,509 Views)

It doesn't sound like there is any real time critical work being done here.  It sounds like you want to acquire the data into a large buffer and pull a duplicate sample every 10 ms (or 5000 samples).  I would just read the DAQ buffer 5000 samples at a time and move it to your file transfer buffer.  At the same time, take the last point of the 5000 points and put it in your monitoring buffer.  Repeat until finished.  If it matters, put this part in a high priority loop to make sure it happens on time.

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 6 of 7
(2,490 Views)

Hi,

then I'll try this way. Thanks a lot,

Griza

0 Kudos
Message 7 of 7
(2,479 Views)