SSG5000A Programming Guide 107
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
VC++ Example
Environment:
Win10 64bit 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:
Содержание SSG5080A Series
Страница 1: ...SSG5080A Series Signal Generator Programming Guide PG0805A E01A ...
Страница 2: ......
Страница 124: ...122 SSG5000A Programming Guide ...
Страница 136: ......