Main Content

Digital Input and Output

Acquire and generate digital data with data acquisition hardware

Digital subsystems perform read and write operations to transfer and receive digital or logical values in bits via digital lines. Data Acquisition Toolbox™ provides a DataAcquisition interface to perform these operations in clocked and non-clocked systems.

Add digital subsystem channels, known as digital lines, to your DataAcquisition interface object using the addinput, addoutput, or addbidirectional functions.

  • Input only channel — Acquire digital data using the read operation.

  • Output only channel — Generate digital data using the write operation.

  • Bidirectional channel — Acquire or generate digital data by modifying the channel direction. You can set the direction to either Input or Output, but not both at the same time. By default, the direction is Input.

Before you use digital channels, see Hardware Discovery and Setup.

Functions

expand all

addinputAdd input channel to device interface
addoutputAdd output channel to device interface
addbidirectionalAdd digital bidirectional channel to device interface
removechannelRemove channel from device interface
readRead data acquired by hardware
writeWrite output scans to hardware channels
readwriteSimultaneously read and write device channel data
startStart DataAcquisition background operation
stopStop background operation
preloadQueue scan data for device output
flushFlush DataAcquisition input and output buffers
decimalToBinaryVectorConvert decimal value to binary vector
binaryVectorToDecimalConvert binary vector value to decimal value
hexToBinaryVectorConvert hexadecimal value to binary vector
binaryVectorToHexConvert binary vector value to hexadecimal

Topics

Digital Subsystem

Digital Data Acquisition

Digital Data Generation

Bidirectional System

Featured Examples