TDS200, TDS1000/2000, TDS1000B/2000B, TPS2000 Programmer
4-1
Programming Examples
The following series of commands and queries illustrate many of the
most common commands and techniques. Table 2--1 on page 2--1
lists oscilloscopes, extension modules, and the communication
protocol you can use wit h them.
To use these commands and queries over USB, you will need to use
a program or rout ines that interface to the USBTMC driver on your
PC. You can al so use the PC Communic ations software that came on
the CD with your oscilloscope to get the same data without having to
write programs. For operating information, you can launch the PC
Communications software and refer to the online help.
To use these commands and queries over GPIB, you will need to use
a program or rout ines that interface to the GPIB hardware in your
computer. The software is usually suppli ed by the GPIB hardware
manufacturer.
To use these commands and queries over RS-232, you will need to
use a communications program on your computer, such as tip in the
Unix environment, or Hyperterminal in the Microsoft Windows
environment.
In these examples, data sent from the controller computer to the
oscilloscope is prefaced with the > symbol. Replies from the
oscilloscope have no preface.
> rem ”Check for any messages, and clear them from the queue.”
> *esr?
128
> allev?
:ALLEV 401,”Power on; ”
> rem ”Set the scope to the default state.”
> factory
> rem ”Set the scope parameters that differ from the defaults.”
> ch1:volts 2.0
> hor:main:scale 100e-6
> trig:main:level 2.4