For demonstration purposes, this article uses a 3 Hz sine wave with 10kHz sampling rate and 10k number of samples as input signal.
1. Launch LabVIEW and create a
New VI.
2. Create the block diagram of the VI, as shown in the diagram below.
Note: This image is a LabVIEW snippet, which includes LabVIEW code that you can reuse in your project. To use a snippet, right-click the image, save it to your computer, and drag the file onto your LabVIEW diagram.
3. Double click the
Trigger and Gate Express VI. A window will pop up.
4. Configure the settings as below:
a) Start Trigger:
- Threshold
- Start Sense: Rising
- Start level: 0.01
b) Stop Trigger:
- Threshold
- Start sense: Rising
- Stop level: -0.01
c) Note:
- The settings above are only suitable for the input signal used in this example.
- Please configure your own settings for the Trigger and Gate Express VI depending on type of input signal and requirement of the application.
- When using Threshold for Start Trigger or Stop Trigger, you will lose a small portion of data.
- If you know the exact number of samples for each segment, you can configure the Stop Trigger to use Number of samples.
5. Run the VI and observe the signal on the front panel.