R&S FSL Interfaces and Protocols
1300.2519.12 5.31 E-11
RSIB Interface Functions
The library functions are adapted to the interface functions of National Instruments for GPIB
programming. The functions supported by the libraries are listed in the following table.
Function Description
RSDLLibfind() Provides a handle for access to a device.
RSDLLibwrt() Sends a zero–terminated string to a device.
RSDLLilwrt() Sends a certain number of bytes to a device.
RSDLLibwrtf() Sends the contents of a file to a device.
RSDLLibrd() Reads data from a device into a string.
RSDLLilrd() Reads a certain number of bytes from a device.
RSDLLibrdf() Reads data from a device into a file.
RSDLLibtmo() Sets timeout for RSIB functions.
RSDLLibsre() Switches a device to the local or remote state.
RSDLLibloc() Temporarily switches a device to the local state.
RSDLLibeot() Enables/disables the END message for write operations.
RSDLLibrsp() Performs a serial poll and provides the status byte.
RSDLLibonl() Sets the device online/offline.
RSDLLTestSrq() Checks whether a device has generated an SRQ.
RSDLLWaitSrq() Waits until a device generates an SRQ.
RSDLLSwapBytes Swaps the byte sequence for binary numeric display (only required for
non–Intel platforms).
As with the National Instrument interface, the successful execution of a command can be checked by
means of the variables ibsta, iberr and ibcntl. For this purpose, all RSIB functions are assigned
references to these three variables.
Status word – ibsta
The status word ibsta provides information on the status of the RSIB interface. The following bits are
defined:
Bit
designation
Bit Hex code
Description
ERR
15 8000 Is set when an error has occurred on calling a function. If this
bit is set, iberr contains an error code that specifies the error
in greater detail.
TIMO
14 4000 Is set when a timeout has occurred on calling a function.
CMPL
8 0100 Is set if the response of the GPIB parser has been read out
completely. If a parser response is read out with the function
RSDLLilrd() and the length of the buffer is insufficient for
the answer, the bit will be cleared.