LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Delaying data acquisition after simulating a signal

Hi there,

 

I am trying to simulate a signal for a mechanical test rig to then record the vibration with accelerometers, and there is a delay between simulating the signal and the test rig operation. Is there a way to delay the recording of the data to account for this? Image and VI attached.

 

Appreciate any help!

Download All
0 Kudos
Message 1 of 4
(846 Views)

Hi Giss,

 


@GISS_DMP wrote:
Is there a way to delay the recording of the data to account for this? Image and VI attached.

Well, sure!

In the first step it would help not to run those ExpressVIs in parallel without any dependencies: THINK DATAFLOW determines which code part is executed in which order...

 

In the long run it would help to get rid of all those ExpressVIs (DAQAssistent!) and use plain DAQmx functions. Then you can use all those triggers etc. to implement your delays.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(838 Views)

Thanks GerdW,

 

How would we run the DAQ in series and avoid running in parallel? And which DAQmx would be used for recording accelerometer data?

Sorry for the ignorance we are new to labview!

 

Thanks,

 

GISS_DMP

0 Kudos
Message 3 of 4
(794 Views)

You can use the error wire to sequence execution of LabVIEW nodes. LabVIEW execution is based on structured dataflow which means that a node will run as soon as all of its inputs are available.

 

From your code, you are using the Sound and Vibration Toolkit. SVT audio measurements examples show several stimulus-response examples that handle the delays common between output and input. The delays come from two primary sources: digital delays in the acquisition hardware and analog delays resulting from the physics of the system you are studying. Those examples rely on synchronization between analog input and analog output. 

 

If you want to keep your analog output code and your analog input code decoupled and running in parallel, try this:
1.Configure a Finite analog input task with an analog reference trigger. Start the task.

2. Configure and Run/Start an analog output task to generate the stimulus signal.

3. After the analog input task acquires the requested number of samples, DAQmx Read will return with the requested samples.

4. Process the acquired channels to apply the desired integration and frequency analysis.

 

If your hardware doesn't support analog reference triggering, you can use a software implementation as attached here: https://forums.ni.com/t5/Example-Code/Analog-Acquisition-with-Software-Analog-Reference-Trigger/ta-p...

You can also acquire all the data and post process it to determine the best trigger point.

 

No matter which triggering strategy you choose, make sure you leave enough time/samples for the integration filters to settle before you perform additional analysis!

 

Reply back to this thread to post your solution or to let us know if you still need help with this measurement.

 

Doug
NI Sound and Vibration
0 Kudos
Message 4 of 4
(657 Views)