VI_ATTR_ASRL_WIRE_MODE

NI-VISA

VI_ATTR_ASRL_WIRE_MODE

Resource Classes

Serial INSTR

Attribute Information

Access Privilege Data Type Range Default

Read/Write
Global

ViInt16

VI_ASRL_WIRE_485_4 (0)
VI_ASRL_WIRE_485_2_DTR_ECHO (1)
VI_ASRL_WIRE_485_2_DTR_CTRL (2)
VI_ASRL_WIRE_485_2_AUTO (3)
VI_ASRL_WIRE_232_DTE (128)
VI_ASRL_WIRE_232_DCE (129)
VI_ASRL_WIRE_232_AUTO (130)VI_STATE_UNKNOWN (–1)

N/A

Description

VI_ATTR_ASRL_WIRE_MODE represents the current wire/transceiver mode.

For RS-485 hardware, this attribute is valid only with the RS-485 serial driver developed by National Instruments.

For RS-232 hardware, the values RS232/DCE and RS232/AUTO are valid only with RS-232 serial drivers developed by National Instruments and documented to support this feature with the corresponding National Instruments hardware. When this feature is not supported, RS232/DTE is the only valid value.

RS-232 settings:

  • VI_ASRL_WIRE_232_DTE uses DTE mode.
  • VI_ASRL_WIRE_232_DCE uses DCE mode.
  • VI_ASRL_WIRE_232_AUTO automatically detects which mode to use.

RS-485 settings:

  • VI_ASRL_WIRE_485_4 uses 4-wire mode.
  • VI_ASRL_WIRE_485_2_DTR_ECHO uses 2-wire DTR mode controlled with echo.
  • VI_ASRL_WIRE_485_2_DTR_CTRL uses 2-wire DTR mode controlled without echo.
  • VI_ASRL_WIRE_485_2_AUTO uses 2-wire auto mode controlled with TXRDY.
Note  This attribute is valid only on the platforms on which National Instruments supports its RS-232 or RS-485 products.


Related Topics

INSTR Resource