|Download Help (Windows Only)|
Reads the status byte of a service request.
Assembly: NationalInstruments.VisaNS (in NationalInstruments.VisaNS.dll) Version: 220.127.116.11
|Visual Basic (Declaration)|
Public Function ReadStatusByte As StatusByteFlags
public StatusByteFlags ReadStatusByte()
The service request status byte. This value is a bitfield composed of several flags. The bitfield includes, but is not limited to, the values in StatusByteFlags.
|VisaException||The NI-VISA driver returned an error as a result of calling this method.|
|DllNotFoundException||The NI-VISA driver library cannot be found.|
|EntryPointNotFoundException||A required operation in the NI-VISA driver library cannot be found.|
|InvalidOperationException||Unable to start operation because setup is invalid (due to properties being set to an inconsistent state).|
|ObjectDisposedException||This member is called after the Dispose method is called directly from code or indirectly through a finalizer.|
For example, on the IEEE 488.2 interface, polling devices read the message. For other types of interfaces, a message is sent in response to a ServiceRequest to retrieve status information.
For a session to a Serial device or Ethernet socket, if IOProtocol
is set to Protocol4882, the string, "*STB?\n", is sent to the device,
and the device status byte is read; otherwise, this method is not valid. If the status
information is only one byte long, the most significant byte is returned with the zero value.
If the service requester does not respond in the actual timeout period,
a VisaException is thrown with an error code of
ErrorTimeout. For a session to a
USB instrument, this function sends the
READ_STATUS_BYTE command on
the control pipe.