
Page 3.41
Example for QP 0,11,b or QP 0,11,B:
The following program reads screen (print) data in PNG format
from a Fluke 19xC instrument and copies this data to the file
SCREEN.PNG. This file can be viewed by loading it into a
graphics editor or browser.
The Read Buffer length for the PC is set to 7500 bytes to
prevent buffer overflow during input from the ScopeMeter.
The communication speed (baud rate) is set to 19200 and after
the data transfer it is reset to 1200 (default baud rate).
’***************** Begin example program *****************
CLS
OPEN "COM1:1200,N,8,1,CS,DS,RB7500" FOR RANDOM AS #1
’Programs COM1 port parameters to
’match with the ScopeMeter power-on
’defaults.
PRINT #1, "PC 19200" ’Programs ScopeMeter to the maximum
’guaranteed baud rate.
GOSUB Acknowledge ’Input acknowledge from ScopeMeter.
CLOSE #1
OPEN "COM1:19200,N,8,1,CS,DS,RB7500" FOR RANDOM AS #1
’Programs COM1 port parameters to
’match with the new ScopeMeter
’settings.
PRINT #1, "QP 0,11,B" ’Sends QUERY PRINT data command.
’(actual screen in PNG format)
PRINT
PRINT "Busy reading screen data !"
GOSUB Acknowledge ’Input acknowledge from ScopeMeter.
’(This may take 5 to 10 seconds)
ScreenDataLength$ = ""
DO
C$ = INPUT$(1, #1)
ScreenDataLength$ = ScreenDataLength$ + C$
LOOP WHILE C$ <> ","
BytesToReceive& = VAL(ScreenDataLength$)
OPEN "SCREEN.PNG" FOR OUTPUT AS #2 ’File for PNG data.
BlockNumber% = 1
DO
PRINT "Reading block "; BlockNumber%
GOSUB ReadBlock ’Read data into BlockData$
PRINT #2, BlockData$;
BlockNumber% = BlockNumber% + 1
LOOP WHILE LastBlock% = 0
CLOSE #2
IF BytesToReceive& <> 0 THEN
PRINT "Block transfer protocol error."
END IF
Содержание ScopeMeter 190 Series
Страница 40: ...Page 3 29 Response Syntax acknowledge cr See an example for this command under QUERY PRINT QP...
Страница 42: ...to the ScopeMeter...
Страница 64: ......
Страница 68: ...Resp Count Resp Count 2 PRINT x_divisions X Divisions...
Страница 70: ...PRINT x_step X Step...
Страница 72: ...nb nb ASC MID Resp Resp Count 1 1 ELSE...
Страница 74: ......
Страница 76: ...PRINT SumCheck so far MOD 256 SumCheck1 MOD 256 CLOSE END...
Страница 78: ...END IF...
Страница 80: ...END IF NEXT j...
Страница 83: ...Resp Count Resp Count Sample Bytes...
Страница 93: ...END IF RETURN End example program...
Страница 117: ...overload sample_value This field specifies which value in the trace samples represents the overload value...