Provides access to the message-based functionality, such as reading and writing, available in VISA.

Derives from

Syntax

Namespace: NationalInstruments.Visa

public class MessageBasedSession : Session, IMessageBasedSession

Constructors

NameDescription
MessageBasedSession(string, AccessModes, int)

Initializes a new instance of the MessageBasedSession object from the specified resource name, access modes, and timeout.

Properties

NameDescription
FormattedIO

Gets a reference to the formatted I/O interface for this session.

IOProtocol

Gets or sets the protocol type for I/O communication with the physical resource. In some cases you may not be able to change the protocol, so reading this property value may not return the same value that was set.

RawIO

Gets a reference to the raw I/O interface for this session.

SendEndEnabled

Enables/disables sending the END signal on the last byte of a write.

TerminationCharacter

Gets or sets the ASCII character used to end reading.

TerminationCharacterEnabled

Specifies whether the read operation ends when a termination character is received.

Methods

NameDescription
AssertTrigger()

Asserts a software or hardware trigger dependent on the interface type.

Clear()

Performs an IEEE 488.1-style clear of the device and clears the input and output buffer (both raw and formatted I/O buffers). It also may terminate pending operations on the device.

ReadStatusByte()

Reads the status from the device. For 488.2 instruments, this is the 488.2 status byte.

Events

NameDescription
ServiceRequest

Occurs when a service request is received from the device.