Compiling a Program
To compile a program from the DOS command line using the Large memory model, execute the following:
• Microsoft® C/ and C+ + :
cl /AL < path\program name.C> path\clhpib.lib
• Borland C and C+ + :
tcc -ml < path\program name.C> path\tchhpib.lib
When using the Small memory model, change the “AL” or “-ml” parameters to “AS” or “-ms”.
Sending SCPI Commands
The following shows how to use the IOUTPUTS function from the GPIB Command Library to send SCPI
commands to an instrument. The function needs the complete GPIB address of the instrument.
Receiving Data
The following shows how to use the IOENTERS function from the GPIB Command Library to receive
character data from an instrument. The function needs the complete GPIB address of the instrument.
Sending SCPI Commands
IOOUTPUTS (70900L, “SYSTem:ERRor?”, 13);
Function
GPIB Address
Length of the SCPI Command
SCPI Command
Receiving Character Data
IOENTERS (70900L, get_data, &length);
Function
GPIB Address
Get length of the Returned Data
Variable that Receives Data
Sending SCPI Commands 2-11