Specify digital channel direction
When you add a digital channel or a group to a session, you can specify the measurement type to be:
When you specify the
you can use the channel to input and output messages. By default the
channel is set to
Unknown. Change the direction
to output signal on the channel.
To change the direction of a bidirectional signal on a digital
channel in the session
Change the direction of a bidirectional digital
Create a session and add a bidirectional digital channel.
s = daq.createSession('ni') ch = addDigitalChannel(s,'dev6', 'Port0/Line0', 'Bidirectional')
ch = Data acquisition digital bidirectional (unknown) channel 'port0/line0' on device 'Dev6': Direction: Unknown Name: '' ID: 'port0/line0' Device: [1x1 daq.ni.DeviceInfo] MeasurementType: 'Bidirectional (Unknown)'
Change the channels direction to
ch.Direction = 'Input'
ch = Data acquisition digital bidirectional (input) channel 'port0/line0' on device 'Dev6': Direction: Input Name: '' ID: 'port0/line0' Device: [1x1 daq.ni.DeviceInfo] MeasurementType: 'Bidirectional (Input)' Properties, Methods, Events