
’ Page 3.64
’***************** Begin example program *****************
CLS ’Clears the PC screen.
OPEN "COM1:1200,N,8,1,CS,DS,RB2048" FOR RANDOM AS #1
PRINT #1, "RP" ’Queries for number of valid replay
’s active screen number
GOSUB Acknowledge ’Input acknowledge from ScopeMeter.
INPUT #1, nr.of.screens
’1st <decimal_number>
IF (nr.of.screens < 0) OR (nr.of.screens > 100) THEN
PRINT nr.of.screens; "is not a valid number of replay screens"
ELSE
PRINT "Number of valid replay screens ="; nr.of.screens
END IF
INPUT #1, current.index
’2nd <decimal_number>
PRINT "Current replay screen number = "; current.index
PRINT "Previous replay screen number = "; current.index - 1
’
PRINT #1, "RP "; ’Queries for the current replay screen
PRINT #1, current.index - 1
GOSUB Acknowledge ’Input acknowledge from ScopeMeter.
PRINT
PRINT "View the previous Replay screen."
PRINT "Press any key on the PC keyboard to continue."
SLEEP
PRINT #1, "AT" ’Go back to normal mode (running)
GOSUB Acknowledge ’Input acknowledge from ScopeMeter.
CLOSE #1
END
’
’**************** Acknowledge subroutine ******************
’Use this subroutine after each command or query sent to the
’ScopeMeter. This routine inputs the acknowledge
’response from the ScopeMeter. If the response is non-zero,
’the previous command was not correct or was not correctly
’received by the ScopeMeter. Then an error message is
’displayed and the program is aborted.
Acknowledge:
INPUT #1, ACK ’Reads acknowledge from ScopeMeter.
IF ACK <> 0 THEN
PRINT "Error "; ACK; ": ";
SELECT CASE ACK
CASE 1
PRINT "Syntax Error"
CASE 2
PRINT "Execution Error; SCOPE mode selected?"
CASE 3
PRINT "Synchronization Error"
CASE 4
PRINT "Communication Error"
CASE IS < 1
PRINT "Unknown Acknowledge"
CASE IS > 4
PRINT "Unknown Acknowledge"
END SELECT
PRINT "Program aborted."
END
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...