EasyManua.ls Logo

Keysight 34420A - HP BASIC;GPIB Program Example 4

Keysight 34420A
307 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
6 Application Programs
240 Keysight 34420A User’s Guide
HP BASIC/GPIB Program Example 3
This program example demonstrates the use of an SRQ to indicate when
measurements are complete. The meter is set to use external triggering. Math
scaling is also demonstrated.
10 !
20 ! This program configures the meter to make multiple dc voltage measurements
30 ! using an external trigger. The "Operation Complete" bit in the Standard
40 ! Event Register is used to determine when the trigger is received and
50 ! generates an SRQ. This program also shows the use of math scaling.
60 !
70 INTEGER Value,Task ! Dimension variables
80 CLEAR 7 ! Clear interface - send "device clear"
90 ASSIGN @Meter TO 722 ! Assign I/O path to address 722
100 COM @Meter ! Use same address in subprogram
110 OUTPUT @Meter;"*RST" ! Reset the meter
120 OUTPUT @Meter;"*CLS" ! Clear status registers
130 OUTPUT @Meter;"*OPC?" ! Send "1" to output buffer when reset complete
140 ENTER @Meter;Value ! Enter value
150 !
160 ! Configure the Status Register system to generate an SRQ when the
170 ! "Operation Complete" bit is set in the Standard Event Register
180 !
190 OUTPUT @Meter;"*SRE 32" ! Enable "Standard Event" bit in Status Byte
200 ! to pull the IEEE-488 SRQ line
210 OUTPUT @Meter;"*ESE 1" ! Enable "Operation Complete" to set
220 ! "Standard Event" bit in Status Byte

Table of Contents

Related product manuals