Download Print this page

Fluke 225C Programming Reference Manual page 66

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

Advertisement

'
'****************** 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$
'and are written to the following files:
'File Waveform : the waveform data bytes
'File Waveresp : the waveform ASCII values
'
Response:
start! = TIMER
'Wait for bytes (maximum 1 s) to enter RS232 buffer
WHILE ((TIMER < (start! + 1)) AND (LOC(1) = 0))
WEND
IF LOC(1) > 0 THEN
OPEN "WaveForm" FOR OUTPUT AS #2
docount = 1
total.count& = 0
DO
LOOP WHILE LOC(1) > 0
CLOSE #2
PRINT
END IF
'
'***** Write the total Response string to file WaveResp
'
OPEN "WaveResp" FOR OUTPUT AS #3
PRINT "Response data length = "; LEN(Resp$)
PRINT #3, "Response data length = "; LEN(Resp$)
FOR i = 1 TO LEN(Resp$)
PRINT #3, ASC(MID$(Resp$, i, 1));
NEXT i
CLOSE #3: RETURN
'
'File to contain the waveform data bytes
' LOC(1) gives the number of bytes waiting:
total.count& = total.count& + LOC(1)
ScopeInput$ = INPUT$(LOC(1), #1)
PRINT #2, ScopeInput$;
PRINT total.count&;
Resp$ = Resp$ + ScopeInput$
start! = TIMER
WHILE ((TIMER < (start! + 1)) AND (LOC(1) = 0))
WEND
docount = docount + 1
Page 3.46
'If RS232 buffer contains bytes
'Repeat as long as bytes enter
'Input bytes

Advertisement

loading

This manual is also suitable for:

Scopemeter 190 series