Programming Example for HP 4145 Users
This section shows a programming example with SCPI commands that
performs the same operations as the desired HP 4145 ASP program.
Built-in IBASIC can execute ASP-like commands for controlling the HP
4155A/4156A. Refer to \Creating ASP-like IBASIC Programs" in Chapter 1 on
programming this commands.
Following program is the simplest example of creating an HP BASIC program
(with SCPI commands) that performs the same operations as the desired HP
4145 ASP program. The ASP program gets a setup le named \VTH" from
the diskette, makes a single measurement, then saves measurement to a le
named \VTH1".
1 ASSIGN @Hp415x TO 800
1 GET P VTH 10 OUTPUT @Hp415x;":MMEM:LOAD:STAT 0,'VTH.PRO'"
2 SINGLE 20 OUTPUT @Hp415x;":PAGE:SCON:SING"
30 OUTPUT @Hp415x;"*OPC?"
40 ENTER @Hp415x;Complete
3 SAVE D VTH1 50 OUTPUT @Hp415x;":MMEM:STOR:TRAC DEF,'VTH1.DAT'"
60 END
The above HP BASIC program (with SCPI commands) does as follows:
Line 1 assigns a path named
@Hp415x
to
800
, which is the select
code/HP-IB address to use if this is an IB
ASIC program running in the
HP 4155A/56A. If this program will run on an external computer
, use
the select code of the HP-IB interface and the HP-IB address of the HP
4155A/4156A instead.
Line 10 gets a measurement setup le named \VTH.MES". So, you need
to save setup data to a le named \VTH.MES" on the diskette before
executing this program. For an example setup, see \Example Application
Setup for Vth Measurement" in Chapter 3.
Line 20 performs a single measurement.
Line 50 saves measurement setup and result data to a le named
VTH1.DAT
.
For built-in help function, which makes it easier to enter the desired SCPI
command, see the \To Use the Help Function" in Chapter 1.
4-50