Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide 125
Programming Examples
LAN Programming Interface Examples
* Query the signal generator power level:
* lanio xx.xxx.xx.x 'POW?'
*
* Check for errors (gets one error):
* lanio xx.xxx.xx.x 'syst:err?'
*
* Send a list of commands from a file, and number them:
* cat scpi_cmds | lanio -n xx.xxx.xx.x
*
*******************************************************************
*
* This program compiles and runs under
* - HP-UX 10.20 (UNIX), using HP cc or gcc:
* + cc -Aa -O -o lanio lanio.c
* + gcc -Wall -O -o lanio lanio.c
*
* - Windows 95, using Microsoft Visual C++ 4.0 Standard Edition
* - Windows NT 3.51, using Microsoft Visual C++ 4.0
* + Be sure to add WSOCK32.LIB to your list of libraries!
* + Compile both lanio.c and getopt.c
* + Consider re-naming the files to lanio.cpp and
getopt.cpp
*
* Considerations:
* - On UNIX systems, file I/O can be used on network sockets.
* This makes programming very convenient, since routines like
* getc(), fgets(), fscanf() and fprintf() can be used. These
* routines typically use the lower level read() and write()
calls.
*
* - In the Windows environment, file operations such as read(),
write(),
* and close() cannot be assumed to work correctly when applied
to
Содержание X-Series
Страница 4: ...4 ...
Страница 10: ...10 Contents ...