LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Add timing to QMH example for intermittent sampling

Solved!
Go to solution

I have been using lab view for sometime but have never used any of the more complicated architectures.

My project at the moment is a slightly adapted version of the 'Continuous data acquisition and logging (daqmx)'  example that ships with labview.

 

i have a PCI 6115 that I am using to sample acoustic emission signals at 10MS/s the problem I am facing is that I need to run tests for an hour or more, obviously I can't be sampling for an hour at that sampling rate. 

 

All i I need to do is to sample for say 10ms every 20 seconds. I know this is an easy problem but I get errors with the aquisition when I try and use the wait function and I am worried that it is not an eloquent enough solution.

0 Kudos
Message 1 of 5
(3,555 Views)

Here is a quickly done example. You must set the Physical Channel (in "6115 Timing.vi") to match your system.

 

steve

----------------------------------------------------------------------------------------------------------------
Founding (and only) member of AUITA - the Anti UI Thread Association.
----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 2 of 5
(3,512 Views)
Solution
Accepted by topic author Jmakin

Suppose the QMH can respond to a Take Samples message that takes 10ms of samples and "does something" with it.  In the process of "doing something", it may generate other Messages for the Message Handler.  You would need another loop, possibly, that simply generates a Take Samples message every 20 seconds, and that should handle the situation you describe.  The only catch is controlling the loop with the 20 second wait, but I'm sure you can figure out ways to handle that (perhaps it could be run from the TimeOut case of an Event loop, for example ...)

 

Bob Schor

Message 3 of 5
(3,482 Views)

You don't need any wait function; just ask for samples in groups of 10M and you will naturally run once a second.

0 Kudos
Message 4 of 5
(3,461 Views)

Bob, thank you for your help.

 

I managed to solve the problem usinf the DAQ commit VI and then when the data was aquired I sent a 'Wait' message to the Queue which started another case which simply had a wait function in and then sent the 'Aquire' message back to teh queue.

 

Thanks,

 

James

0 Kudos
Message 5 of 5
(3,380 Views)