LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I set a start and stop trigger while still reading pretrigger samples from the start trigger?

Hello,
I am trying to create a LabVIEW code to find an FRF by measuring the impulse from an impact hammer and the response from that impulse.  I am trying to use an analog edge trigger to start the capture when the impulse (CH1) reaches a certain threshold with an upward slope.  Later, I want to end the capture when the response (CH2) returns to zero, or a small window around zero.  Thanks for any help you can provide.
--Jason
0 Kudos
Message 1 of 4
(2,557 Views)
Additionally, if anyone knows of a good VI for modal/FRF analysis using an impact hammer that would be great as well.
0 Kudos
Message 2 of 4
(2,543 Views)
Hello labviewpsu,

I see that you want to do a FRF. What hardware are you using?

From your description of what you want to do. You need a reference trigger. A Reference Trigger establishes the reference point in a set of input samples. You can configure this trigger to occur on a digital edge, a digital pattern, an analog edge, or when an analog signal enters or leaves a window. Data acquired up to the reference point is pretrigger data. Data acquired after this reference point is posttrigger data. It allows you to acquire samples both before and after the trigger is received. The number of pretrigger samples to be acquired is set using the Pretrigger Samples input. The number of posttrigger samples to be acquired is automatically determined by subtracting the number of Pretrigger Samples specified from the number of Samples to Read specified.

I would take a look at the hardware specifications or user manual to make sure that your device supports reference triggers.

Take a look at this example:

NI-DAQmx: Continuous Analog Input with Both Start and Reference (Stop) Triggers - LabVIEW - CVI - A...

With regards to your question with about the FRF, you can use the VI Frequency Response Function (Mag-Phase). Also refer to the shipping example: Frequency Analysis of a Filter Design.vi to get an idea of how that works.

Let me know if something isn't clear.

Regards,
  Sandra T.

Applications Engineer | National Instruments

Message 3 of 4
(2,530 Views)
This is very helpful, thanks for the quick response!Smiley Happy
0 Kudos
Message 4 of 4
(2,521 Views)