Manual

A
PPENDIX
I:
Program Examples
260
ISSUED: February 2005
WM-RCM-E Rev D
SOURCE CODE PROGRAMS
These programs can be divided into two types, those using National Instruments GPIB software and hardware,
and those using ActiveDSO, which for GPIB also connects to National Instruments software and hardware. A
great benefit of ActiveDSO is that the code written by the user is completely independent of the hardware
connection. The selection of GPIB, LAN, or RS232 (for earlier DSOs) is made by a single command near the
start of a program.
Programming examples can be found on LeCroy’s Web site at http://www.lecroy.com/tm/library/software/
.
SOURCE CODE EXAMPLE GPIB - 1
Use the Interactive GPIB Program “IBIC”
This example assumes the use of an IBM PC (or compatible) computer equipped with a National Instruments
GPIB interface card. The GPIB driver is left in default state so that the device name “dev4” corresponds to the
GPIB address 4, the oscilloscope address. All text is entered by the user. Bold type represents prompts from
the program.
IBIC<cr>
program announces itself
: ibfind<CR>
enter board/device name: dev4<CR>
dev4: ibwrt<CR>
enter string: “tdiv?”<CR>
[0100] ( cmpl )
count: 5
dev4: ibrd<CR>
enter byte count: 10<CR>
[0100] ( cmpl )
count: 10
54 44 49 56 20 35 30 45 T D I V 5 0 E
2D 39 9
dev4: ibwrt<CR>
enter string: “c1:cpl?”<CR>
[0100] ( cmpl )
count: 7