Overview: Demonstrates on writing to digital lines base on specified conditions.
Description: On every iteration of the loop, the case structure will determine if the random number generated is greater than or less than 5, then takes action by writing out a digital line to configured port and line, either high or low.
LabVIEW 2012 or compatible.
NI-DAQmx 15.5.1 or compatible.
Steps to Implement or Execute Code:
Configure the block diagram DAQ Assistant Express VIs to your digital hardware.
Run this VI.
Observe the status of the digital lines (High/Low) from the LED on the front panel. The Current Value shows the most recent generated values wired to the case selector of the case structure.
Block Diagram Steps:
Generates random number ranges from 0 to 10. The result is wired to the Case Selector.
If the value is less than 5, the digital line configured in the DAQ Assistant will output high and the LED on the front panel will turn on. Else, it will output low to the digital line and turn off the LED. This loop will continue running until the user clicks on the stop button.
**This document has been updated to meet the current required format for the NI Code Exchange.**