173
D. Application Programs
This chapter contains several remote interface example programs to help you
develop programs for your own application. “Remote Interface Reference”
starting lists the syntax for the SCPI (
Standard Commands for Programmable
Instruments
) commands available to program the function generator.
Introduction
Five example programs are included in this chapter to demonstrate controlling the
PICOTEST G5100A using SCPI commands. All of these programs are written in
Microsoft® Visual C++® 6.0 and use the NI-VISA.
If you want to modify the example programs, or write your own programs and
compile them, you will need to install the NI-VISA.
• If you are using GPIB. The software should have been loaded when you installed
your GPIB interface card in your PC.
• If you are using USB or LAN. You must have NI-VISA version to support USB and
LAN.
Microsoft® and Visual C++® 6.0 are U.S. registered trademarks of Microsoft
Corporation.
All of the sample application programs in this chapter are example programs
intended for use with Microsoft Visual C++ 6.0 and the NI-VISA by USB.
To use VISA in another Visual C++ project, you have to set the environmental
variable in Microsoft Visual C++ 6.0. The procedures are in the following.
• In the VC++, after the path Tools\Options\Directories\include has been entered,
you have to add an “Include” path offered by NI-VISA, such as
C:\VXIPNP\WinNT\include.
• Add C:\VXIPNP\WinNT\lib\msc\visa32.lib to Project folder.
The command for USB interface in the following or others will be different on other
unit. If you have to check the right information, please do the procedure of
Utility/IO/Show USB Id (for USB interface) to get it.
char instrDesc[]="USB0::5710::5100::TW00009009::INSTR";