Configuring a Session

NI-VISA

Common Considerations for Using Attributes

As you set up your sessions, there are some common attributes you can use that will affect how the sessions handle various situations. For currently supported session types, all support the setting of timeout values and termination methods:

  • VI_ATTR_TMO_VALUE denotes how long (in milliseconds) to wait for accesses to the device. Defaults to two seconds (2000 ms).
  • VI_ATTR_TERMCHAR_EN sets whether a termination character specified by VI_ATTR_TERMCHAR will be used on read operations. The termchar defaults to linefeed (\n or LF) but the termchar enable attribute defaults to VI_FALSE. Serial users should also see Serial.
  • VI_ATTR_SEND_END_EN determines whether to use an END bit on your write operations. Defaults to VI_TRUE.

Various interfaces have other types of attributes that may affect channel communication. See Interface-Specific Information for attribute information relevant to each support hardware interface type.