This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.


Specify digital channel direction


When you add a digital channel or a group to a session, you can specify the measurement type to be:

  • Input

  • Output

  • Unknown

When you specify the MeasurementType as Bidirectional, 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 s, type:


Change the Direction of a Digital Channel

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]
MeasurementType: 'Bidirectional (Unknown)'

Change the channels direction to 'Input'.

ch.Direction = 'Input'
ch = 

Data acquisition digital bidirectional (input) channel 'port0/line0' on device 'Dev6':

      Direction: Input
           Name: ''
             ID: 'port0/line0'
         Device: [1x1]
MeasurementType: 'Bidirectional (Input)'

Properties, Methods, Events
Was this topic helpful?