Generate Non-Clocked Digital Data
This example shows how to write data to two lines on an NI 6255.
Discover NI devices connected to your system and find the ID for the NI 6255.
d = daqlist("ni")dev =
3×4 table
DeviceID Description Model DeviceInfo
________ ___________________________________ __________ _______________________
"Dev1" "National Instruments(TM) USB-6255" "USB-6255" [1×1 daq.ni.DeviceInfo]
"Dev2" "National Instruments(TM) USB-6363" "USB-6363" [1×1 daq.ni.DeviceInfo]Create a DataAcquisition object and add two digital output lines from port
0 on Dev1.
d = daq("ni"); addoutput(d,"Dev1","Port0/Line0:1","Digital"); d.Channels
ans =
Index Type Device Channel Measurement Type Range Name
_____ _____ ______ _____________ ________________ _____ __________________
1 "dio" "Dev1" "port0/line0" "OutputOnly" "n/a" "Dev1_port0/line0"
2 "dio" "Dev1" "port0/line1" "OutputOnly" "n/a" "Dev1_port0/line1"Generate digital output.
write(d,[1 0])