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 MeasurementType as Bidirectional, you can use the channel to input and output messges. By default the channel is set to Unknown. Change the direction to output singnal on the channel.
To change the direction of a bidirectional signal on a digital channel in the session s, type:
Change the direction of a bidirectional digital channel to Input.
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 '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