EasyManua.ls Logo

R&S ESU Series - Page 401

R&S ESU Series
855 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
R&S ESU Instrument Functions
RSIB Interface Functions
4.370 Operating Manual 1302.6163.12 - 03
When import libraries are used, the DLL is automatically loaded immediately before
the application is started. At the end of the program, the DLL is unloaded again
unless it is still used by other applications.
Access to librsib.so functions (UNIX platforms)
The functions of librsib.so are declared in the header file RSIB.H. Uppercase/
lowercase characters for file names are typically observed under UNIX. The library
functions are linked to a C/C++ program by entering the -lrsib linker option.
The shared library librsib.so is automatically loaded on starting the application.
The accessibility (for example via standard path) of the library must be ensured.
Refer to section “UNIX Environment” on page 4.355.
Query of strings
If instrument responses are to be further processed as strings, a zero termination
must be appended.
Example
char buffer[100];
...
RSDLLibrd( ud, buffer, &ibsta, &iberr, &ibcntl );
buffer[ibcntl] = 0;
Programming example
In the following C program example, a single sweep is started on the device with the
IP address 89.10.38.97 and subsequently a marker is set to maximum level. Prior to
the search for maximum, a synchronization to the end of the sweep is performed.
For this purpose the command "*OPC" (Operation complete) is used to create a
service request at the end of the sweep, for which the control program waits with the
function RSDLLWaitSrq(). Then the maximum is determined ("CALC:MARK:
MAX") and the level read out ("Y?").
#define MAX_RESP_LEN 100
short ibsta, iberr;
unsigned long ibcntl;
short ud;
short srq;
char MaxPegel[MAX_RESP_LEN];
char spr;
// Determine handle for instrument
ud = RSDLLibfind( "89.10.38.97", &ibsta, &iberr, &ibcntl );
// if instrument exists
if ( ud >= 0 )
{
// Set timeout for RSDLLWaitSrq() to 10 seconds
RSDLLibtmo( ud, 10, &ibsta, &iberr, &ibcntl );

Table of Contents

Related product manuals