Fluke 2620A Using the Computer Interface, Using the IEEE-488 Interface, 2. Sample Program cont

Models: 2625A 2620A

1 197
Download 197 pages 4.31 Kb
Page 81
Image 81

Using the Computer Interface

4

Using the IEEE-488 Interface

500 PRINT #1, "FUNC " + STR$(I) + "," + CMD$

510GOSUB 800

520NEXT I

530

540LOCATE 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

595PRINT #1, "SCAN_TIME? : GOSUB 800 ’ Get scan time stamp

597LINE 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

 

 

680PRINT #2, ""

690NEXT I

700WEND

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)

4-11

Page 81
Image 81
Fluke 2620A, 2625A user manual Using the Computer Interface, Using the IEEE-488 Interface, 2. Sample Program cont