Download Print this page

Fluke 225C Programming Reference Manual page 54

Remote control and programming reference
Hide thumbs Also See for 225C:

Advertisement

SELECT CASE ACK
CASE 1
PRINT "Syntax Error"
CASE 2
PRINT "Execution Error"
CASE 3
PRINT "Synchronization Error"
CASE 4
PRINT "Communication Error"
CASE IS < 1
PRINT "Unknown Acknowledge"
CASE IS > 4
PRINT "Unknown Acknowledge"
END SELECT
CLOSE
PRINT "Program aborted."
END
END IF
RETURN
'****************** Response subroutine *********************
'This subroutine reads bytes from the RS232 buffer as long
'as they enter. When no bytes enter for 1 second, the program
'assumes that the ScopeMeter has terminated its response.
'All bytes that enter the buffer are appended to the string
'Resp$.
Response:
start! = TIMER
'Wait for bytes (maximum 2 s) to enter RS232 buffer
WHILE ((TIMER < (start! + 2)) AND (LOC(1) = 0))
WEND
IF LOC(1) > 0 THEN
Resp$ = ""
OPEN "Qpfile" FOR OUTPUT AS #2
DO
LOOP WHILE LOC(1) > 0
CLOSE #2
END IF
RETURN
'******************
'Close all files.
' LOC(1) gives the number of bytes waiting:
ScopeInput$ = INPUT$(LOC(1), #1)
PRINT #2, ScopeInput$;
start! = TIMER
WHILE ((TIMER < (start! + 2)) AND (LOC(1) = 0))
WEND
End example program
'If RS232 buffer contains bytes
'Repeat as long as bytes enter
'File for print data
'Input bytes
******************

Advertisement

loading

This manual is also suitable for:

Scopemeter 190 series