Fluke 2625A Power Supply User Manual


 
Using the Computer Interface
Using the IEEE-488 Interface
4
4-11
500 PRINT #1, "FUNC " + STR$(I) + "," + CMD$
510 GOSUB 800
520 NEXT I
530 ’
540 LOCATE 23,1
550 PRINT "Measuring " + CMD$ + " " ’ Print to screen
560 ’
570 FOR I = 1 TO 3 ’ Scan 3 times
580 PRINT #1, "*TRG" ’ Start a single
590 GOSUB 800 ’ Get prompt
595 PRINT #1, "SCAN_TIME? : GOSUB 800 ’ Get scan time stamp
597 LINE INPUT #1, RESULTS$
598 PRINT #2, RESULT$ ’ save time stamp in data file
600 FOR J = 1 TO NUMBEROFCHANS ’ Request scan data
610 PRINT #1, "LAST? " + STR$(J) ’ Request channel data
612 GOSUB 800 ’ Get prompt
620 INPUT #1, RESULT$ ’ Get channel result
640 LOCATE J+3, 25 : PRINT "Chan " + STR$(J) + ": ";
650 PRINT RESULT$ ’ Print results to screen
660 PRINT #2, RESULT$ + ","; ’ Print results to file
670 NEXT J
680 PRINT #2, ""
690 NEXT I
700 WEND
710 ’
720 ’ Subroutine: response
730 ’ Checks prompt for errors
740 ’ The possible command responses are:
750 ’ "=> (CR) (LF)" (command successful)
760 ’ "?> (CR) (LF)" (command syntax error)
770 ’ "!> (CR) (LF)" (Command execution error)
780 ’
800 PROMPT$ = INPUT$(4, #1) ’ Get prompt
810 IF INSTR(1, PROMPT$, "=>" <> 0 THEN RETURN ’ Command successful
820 IF INSTR(1, PROMPT$, "?>" <> 0 THEN PRINT "Command Syntax Error!!"
830 IF INSTR(1, PROMPT$, "!>" <> 0 THEN PRINT "Command Execution Error!!"
840 PRINT "Program execution halted due to communication errors."
850 END
Figure 4-2. Sample Program (cont)