Overview:
Software Trigger Digital Output Lines demonstrates on configuring Digital Output channel to generate a finite pulse train upon receiving trigger. Hardware Trigger Digital Output Lines demonstrates on retriggering digital signal from Digital Output lines by using external trigger.
Description:
For the software trigger VI, trigger signal is from the Boolean control on the front panel. Each time the user clicks on the Retrigger? control, the device perform a finite generation until the task is stopped.
This example was designed with a PCIe-6321 and a BNC-2120. It lights up each of the Digital I/O LEDs in Port 0 sequentially. The pattern starts on a digital edge start trigger.
For the hardware trigger VI, When this VI runs, it waits for a digital trigger signal received at the Trigger Source. Once the digital signal with specified Trigger Edge is received, it will begin to write data to the Digital Output Lines. The DAQmx Is Task Done VI is place in a while loop to continuously query the status of the task. Once the task is completed, it will stop the loop, clear the task and wait for another start trigger.
Note: The following code was written and tested on a PCI-6534. Since retriggering isn't supported in the hardware, it can be done through software. After the digital lines generation is completed, stop the DAQmx task and restart it. This will re-arm the task's start trigger which will then wait for the next digital edge.
Requirements:
1. LabVIEW 2012 or compatible.
2. NI-DAQmx 15.5.1 or compatible.
Steps to Implement or Execute Code:
Software Trigger:
- Sets all control values on the front panel.
- Run this VI.
Hardware Trigger:
- Set the control value on the front panel corresponding to the digital lines at which data will be output, the trigger source at which terminal digital pulse is received which allow digital output line to begin generation and other necessary values.
- Run this VI.
**This document has been updated to meet the current required format for the NI Code Exchange.**
Systems Engineer
SISU