Documentation Center

  • Trial Software
  • Product Updates

Direction

Specify digital channel direction

Description

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 messges. By default the channel is set to Unknown. Change the direction to output singnal on the channel.

Example

To change the direction of a bidirectional signal on a digital channel in the session s, type:

s.Channels(1).Direction='Output';

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 daq.ni.DeviceInfo]
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 daq.ni.DeviceInfo]
MeasurementType: 'Bidirectional (Input)'


Properties, Methods, Events
Was this topic helpful?