LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Send analog trigger every time data is acquired and saved

I am currently writing a program that acquires and calibrates data from 32 channels of force plates.  Once the data is acquired and calibrated it is saved to a file.  I need to send a pulse to another computer running labview once every time data is acquired and saved.  I have written several versions of this code that send a continuous pulse train while data is being saved.  I need to modify the code so that it does not send a continuous pulse, but an individual pulse that is a set frequency every time I acquire data.  I believe that I need to use a software trigger to control the pulse, but I can't seem to find a way to have the hardware send a pulse only when I want it to.
 
The program uses a boolean as a start trigger for the acquisition process.  In this manner when the data begins saving(i.e. the boolean is switched) it would send one analog pulse per iteration of the save loop.  Unfortunantly I only seem to be able to either send a continuous pulse that I start before the acquisition begins or am not able send any pulse.  During the time this pulse is being sent I am also constantly acquiring data from the card.  I was wondering if there is any way that I can have the pulse start and initialize before the loop begins and then have it send one analog pulse of a set frequency every time the loop is iterated.  I have tried both DAQmx and DAQ traditional solutions but have had no success.
 
Hardware: PCI-6071-E and BNC-2110 boxes, so I have a large selection of ports and my card seems to be compatible with all the latest software capabilities.
 
Thanks so much for any help!
 
~Matt
 
0 Kudos
Message 1 of 3
(2,657 Views)

Matt,

Could you please clarify...  When you say you want an individual pulse at a set frequency, does this mean you want a single pulse of a specific pulse width?  or a square wave pulse train at a specific frequency?

 

Tom

0 Kudos
Message 2 of 3
(2,647 Views)

Actually after tinkering with it for several hours I managed to figure out a way to solve my problem.  I'll explain it in case anyone else has a problem.

What the software does:  The software is an acquisition loop that outputs a square wave pulse of finite frequency to another acquisition system at the beginning of each acquisition iteration while data is being saved.  This is so that the data from the two systems can be synchronized later.

The program flow is this Send Single Synchronization Pulse-> Acquire Data->Calibrate Data->Save Data to file->Repeat
The pulse is triggered once data begins saving, but the device begins acquiring data on execution of the software.

To do this I set up the DAQmx Channl configuration to CO Pulse frequency.  I then set the timing up to be finite iterations and the number of iterations to 1.  Inside the acquisition loop I enclosed the whole acquisition process in a flat sequence.  In the first sequence, if the program is saving data it turns the pulse on, if not saving the task passes through.  The acquisition occurs in the middle sequence and in the final sequence if saving the task is turned off.  If not saving the task passes through.  This allowed me to send one pulse of a finite frequency every time the loop is run.

Thank you very much for your response though.  If anyone else runs into a problem like this I can post a screenshot for future reference when I get a chance.  Thanks again.

0 Kudos
Message 3 of 3
(2,624 Views)