
’ Page 3.33
’****************** 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 1 s) to enter RS232 buffer
WHILE ((TIMER < (start! + 1)) AND (LOC(1) = 0))
WEND
IF LOC(1) > 0 THEN ’If RS232 buffer contains bytes
OPEN "Setup0" FOR OUTPUT AS #2 ’File for setup data
DO
’ LOC(1) gives the number of bytes waiting:
ScopeInput$ = INPUT$(LOC(1), #1) ’Input bytes
PRINT #2, ScopeInput$;
start! = TIMER
WHILE ((TIMER < (start! + 1)) AND (LOC(1) = 0))
WEND
LOOP WHILE LOC(1) > 0 ’Repeat as long as bytes enter
CLOSE #2
END IF
RETURN
’****************** End example program ******************
Summary of Contents for ScopeMeter 190 Series
Page 40: ...Page 3 29 Response Syntax acknowledge cr See an example for this command under QUERY PRINT QP...
Page 42: ...to the ScopeMeter...
Page 64: ......
Page 68: ...Resp Count Resp Count 2 PRINT x_divisions X Divisions...
Page 70: ...PRINT x_step X Step...
Page 72: ...nb nb ASC MID Resp Resp Count 1 1 ELSE...
Page 74: ......
Page 76: ...PRINT SumCheck so far MOD 256 SumCheck1 MOD 256 CLOSE END...
Page 78: ...END IF...
Page 80: ...END IF NEXT j...
Page 83: ...Resp Count Resp Count Sample Bytes...