Mode1 4085M
Section 1lI
5 1 0
ON I N T R Hp_l b . 2 GOSUB Se r v i ce
520
ENABLE I N TR Hp_i b : 2
530
OUTPUT Dcs : Command$
5 4 0
SEND Hp_ i b : UNT UNL TAL
K
( Dcs HOD
1 0 0 )
L I S TEN A_dev i ce DATA
550
!
560
S tatus_b v t e o O
5 7 0
LOOP
580
E X I T IF B I T ( S tatus bv te . 2 ) - 1
590
END LOOP
-
6 0 0
SUBEXI T
6 1 0
620
Serv i ce :
!
630
S t atus_by t e - SPOLL ( Dcs)
6 4 0
RETURN
650
SUBEND
6 6 0
!
Line 40 :
Lines 6 0 to 90 :
line 1 1 0 :
Lines 1 2 0 to 1 4 0 :
Lines 1 70 to 230 :
Lines 250 to 300 :
Lines 320 to 350 :
Lines 370 to 650 :
Line 380 :
Line 4 1 0 :
Lines 420 to 490 :
Line 5 1 0 :
Line 660 to end :
The Start sub program is executed.
These program lines define the softkeys. When a softkey is pressed,
the specified subprogram is called.
Displays the connection status of the ports and m easurement pins.
See Figure 3-12.
Initiates a loop that continues until a softkey is pressed.
When KEY 0 (CO N N ECT) is pressed, this subprogram is called. This
subprogram requests the user to input a port number and
m easu
r
ement pin number. It then connects them and redisplays the
connection status screen.
When -KE Y
I
(DISCO N NECT) is pressed, this subprogram is' called.
This subprogram requests the user to input a pin number. It then
disconnects the specified pin from the port and redisplays the
connection status screen.
When KEY 3 (Swm_clear) is pressed, this subprogram is called.
This sub program disconnects all measurement ports from the
m easurement pins, and redisplays the connection status screen.
When K E Y 4 (PLOT and P RI N T) is pressed, this subprogram is
called. This subprogram enables the PLOT and P RI N T capabilities
of the 4 1 45A. Refer to Section
1Il
of the 4 1 4 5 A Operation Manual
for details.
Enables the subprogram to use the COM block variables. Refer to
paragraph 3-46.
Calculates the HP-IB select code. This is necessary for interrupt
handling at lines 5 1 0 and 540.
Selects the 4 1 4 5 A's PLOT or PRINT function, and determines the
proper HP-IB address of the peripheral device.
Sets a higher priority for H P-IB interrupts than for softkey
interrupts.
Link the required subprogra ms from this line.
Swm_status,
Connect and Swm _clear subprograms are required in this sample
program .
Figure 3-13. Manual Operation of 4085M (Sheet 2 of 2)
3-23