Agilent Technologies 6628A Welding System User Manual


 
Programming with a Series 200/300 Computer
107
Error Detection
The power supply can recognize programming errors and can inform you when a programming error occurs. When an error
is detected, no attempt is made to execute the command. Instead, a bit in the serial poll register is set. If SRQ2 or SRQ3 is
set, an interrupt will be generated. The following program checks for programming errors and can be entered and run as is.
While it is running, commands can be sent to the power supply from the keyboard. If the ERROR annunciator on the power
supply’s front panel indicates that an error has been detected, depress the labeled softkey to display the error on your
computer screen.
10 ASSIGN @Ps TO 705
20 COM /Ps/ @Ps
30 ON KEY 0 LABEL "ERROR?’’ CALL Err_trap
40 Lbl: GOTO Lbl
50 END
60 !
70 !
80 SUB Err _ trap
90 OFF KEY
100 COM /Ps/ @Ps
110 OUTPUT @Ps;"ERR?’’
120 ENTER @Ps:Err
130 OUTPUT 2 USING "#,K";CHR$(255)&CHR$(75)
140 IF Err THEN
150 PRINT "POWER SUPPLY PROGRAMMING ERROR:’’
160 END IF
170 SELECT Err
180 CASE 0
190 PRINT ’’NO ERROR OCCURRED"
200 SUBEXIT
210 CASE 1
220 PRINT "INVALID CHARACTER’’
230 CASE 2
240 PRINT "INVALID NUMBER"
250 CASE 3
260 PRINT "INVALID STRING"
270 CASE 4
280 PRINT ’’SYNTAX ERROR"
290 CASE 5
300 PRINT ’’NUMBER OUT OF RANGE"
310 CASE 6
320 PRINT "DATA REQUESTED WITHOUT QUERY’’
330 CASE 7
340 PRINT ’’STRING EXCEEDS DISPLAY LENGTH"
350 CASE 8
360 PRINT "NUMBER TOO LARGE FOR INPUT BUFFER"
370 CASE 28
380 PRINT "INVALID CHARACTERS IN STRING"
390 CASE ELSE
400 PRINT "UNRECOGNIZED ERROR NUMBER’’; Err
410 END SELECT
420 PRINT "RE-ENTER STATEMENT AND TRY AGAIN"
430 SUBEND