Programming the E5250A

SCPI Programming Basics

Controlling E5250A by Using HP BASIC

1. Assign I/O path for controlling the E5250A by using the ASSIGN command.

In the following example, the select code of the external computer is 7 and GPIB address of the E5250A is 22.

10 ASSIGN @Hp5250 TO 722

2.Use OUTPUT command to send SCPI commands to control the E5250A.

3.Use ENTER command to get query response from the E5250A.

Example:

10REAL Complete

20!

30ASSIGN @Hp5250 TO 722

40!

50OUTPUT @Hp5250;"*RST"

60!

70OUTPUT @Hp5250;":ROUT:FUNC NCON"

80OUTPUT @Hp5250;":ROUT:CONN:RULE ALL,FREE"

90OUTPUT @Hp5250;":ROUT:CONN:SEQ ALL,BBM"

100OUTPUT @Hp5250;":ROUT:CLOS (@10101,10202)"

110!

120OUTPUT @Hp5250;"*OPC?"

130ENTER @Hp5250;Complete

140!

150END

Line Number

Description

 

 

10

Declares "Complete" as a real number.

 

 

30

Assigns I/O path to control the E5250A.

 

 

50

Resets the E5250A.

 

 

70

Sets the E5250A to Normal channel configuration mode.

 

 

80

Sets all cards to free connection rule.

 

 

90

Sets all cards to break-before-make connection sequence.

 

 

100

Creates channels 10101 and 10202.

 

 

120 and 130

Waits until all operations are complete.

 

 

 

 

Agilent E5250A User’s Guide, Edition 9

6-5

Page 141
Image 141
Agilent Technologies Agilent E5250A manual Controlling E5250A by Using HP Basic, Example