Sample program – Despatch 926E Equipment Manual (C-155)Rev 2/11 User Manual
Page 54
49
Sample Program
For the Black Box 488 to 232 converter.
10
! Program for H-P 85 with Hpib Interface
and Black Box 488 to 232 Converter to
Talk
20
! To a Watlow 982 Control, Copyright
Despatch March 28, 1995
30
Clear 7
40
on Timeout 7 Gosub 340
50
Set Timeout 7; 3200
60
on Key# 1 Goto 220
70
on Key# 2 Goto 160
80
on Key# 3 Goto 410
90
on Key# 4 Goto 270
100
Clear
110
Disp "K1 to Read Setpoint"
120
Disp "K2 to Set Setpoint"
130
Disp "K3 to End"
140
Disp "K4 to Analyze R$"
150
Goto 150
160
! Set Control Setpoint
170
Disp "Enter New Set Point"
180
Input P
190
Output 710 ; "= sp1 "&val$(P)&chr$(13)
200
Print "Setpoint Changed to "; P
210
Goto 100
220
! Read Control Setpoint
230
Output 710 ;"? sp1 "&chr$(13)
240
Enter 710 ; R$
250
Print "? Response = ";R$
260
Goto 150
270
! String Analysis for R$
280
L=len(r$)
290
Print "# of Char in R$ = ";L
300
for I=1 to L
310
Print "Char # "; I;" of String Has Value = ";Num(r$[I])
320
next I
330
Goto 100
340
! Print Status of Interface
350
Print "Interface Timeout"
360
for I=0 to 6
370
Status 7, I; S(i)
380
Print "Status Byte #"; I;" = ";S(i)
390
next I
400
Return
410
Disp "End"
420
End
Notes:
HPIB interface is #7.
Black Box is set for Address 10.
Watlow control is set up for
XON/XOFF.
(Prot = on) mode.