SIGLENT
132 SSG5000X Programming Guide
4.
Programming Examples
This chapter gives some examples for the programmer. In these examples you can see
how to use the VISA or sockets, in combination with the commands have been described
above to control the signal generator. By following these examples, you can develop
many more applications.
4.1
VISA Examples
4.1.1
VC++ Example
Environment: Win7 32bit system, Visual Studio
The functions of this example: Use National Instruments NI-VISA to control the device
with USBTMC or TCP/IP access and perform write and read operations.
Follow the steps to finish the example:
1.
Open Visual Studio, create a new VC++ win32 console project.
2.
Set the project environment to use the NI-VISA lib, there are two ways to use NI-VISA,
static or automatic:
(1) Static: find files: visa.h, visatype.h, visa32.lib in NI-VISA install path. Copy them to
your project, and add them into project. In the projectname.cpp file, add the follow
two lines:
#include
"visa.h"
#pragma
comment
(
lib
,"visa32.lib")
(2) Automatic:
Set the .h file include directory, the NI-VISA install path, in our computer we set the
path is: C:\Program Files\IVI Foundation \VISA\WinNT\include. Set this path to
project---properties---c/c++---General---Additional Include Directories: See the
picture:
Содержание SSG5000X Series
Страница 1: ...SSG5000X Series Signal Generator Programming Guide PG0805X E01A...
Страница 14: ...SIGLENT 14 SSG5000X Programming Guide...
Страница 131: ...SIGLENT SSG5000X Programming Guide 131...
Страница 152: ...SIGLENT 152 SSG5000X Programming Guide To close the normal telnet window type Quit and press Enter...