Download Print this page
Fluke 225C Programming Reference Manual
Fluke 225C Programming Reference Manual

Fluke 225C Programming Reference Manual

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

Advertisement

REMOTE CONTROL AND PROGRAMMING REFERENCE
=============================================================
This file contains remote control and programming information
for the above-mentioned models with use of the PM9080
Optically Isolated RS232 Adapter/Cable.
It consists of the following chapters:
1.
INSTALLING THE PM9080
2.
INTRODUCTION TO PROGRAMMING
3.
COMMAND REFERENCE
APPENDIXES
APPENDIX A
APPENDIX B
APPENDIX C
APPENDIX D
for the FLUKE 190 family
of ScopeMeter test tools
ACKNOWLEDGE DATA
STATUS DATA
WAVEFORM DATA
ASCII CODES

Advertisement

loading
Need help?

Need help?

Do you have a question about the 225C and is the answer not in the manual?

Questions and answers

Summary of Contents for Fluke 225C

  • Page 1 REMOTE CONTROL AND PROGRAMMING REFERENCE for the FLUKE 190 family of ScopeMeter test tools ============================================================= This file contains remote control and programming information for the above-mentioned models with use of the PM9080 Optically Isolated RS232 Adapter/Cable. It consists of the following chapters:...
  • Page 2 Page 1.1 ============================================================= INSTALLING THE PM9080 - Connect the PM9080 to the RS232 port of the computer. If necessary, use a 9-pin to 25-pin adapter and 25-pin gender changer. - Hook the PM9080 cable to the ScopeMeter. - Turn on the computer and the ScopeMeter. - Make sure that the communication settings match for the RS232 port of the computer and the ScopeMeter.
  • Page 3 Page 2.1 ============================================================= INTRODUCTION TO PROGRAMMING ** Basic Programming Information ** When you have installed the PM9080 as described in the previous chapter, you can control the ScopeMeter from the computer with simple communication facilities, such as GWBASIC, QuickBASIC and QBASIC (programming languages from Microsoft Corporation).
  • Page 4 Page 2.2 ** Commands sent to the ScopeMeter ** All commands for the ScopeMeter consist of a header made up of two alpha characters sometimes followed by parameters. Example: This is the Reset Instrument command. It resets the ScopeMeter. Some of the commands are followed by one or more parameters to give the ScopeMeter more information.
  • Page 5 Page 2.3 ** Responses received from the ScopeMeter ** After each command sent to the ScopeMeter there is an automatic response from it, indicated as <acknowledge> (which you MUST input), to let the computer know whether or not the received command has been successfully executed. Refer to the ’Acknowledge’...
  • Page 6 Page 2.4 ** Acknowledge ** After receiving of a command, the ScopeMeter automatically returns the <acknowledge> response to let the computer know whether or not the received command has been successfully executed. This response is a one-digit number followed by <cr> as response terminator.
  • Page 7 Page 2.5 ** Data Separators ** Data Separators are used between parameters sent to the ScopeMeter and between values and strings received from the ScopeMeter. Comma (",") is used as program data separator as well as response data separator: - Program Data Separator Name Character ASCII Value...
  • Page 8 Page 2.6 ** Command and Response Terminators ** (Message Terminators) - Command (Program Message) Terminators A code is needed at the end of each command to tell the ScopeMeter that the command is ended, and that it can start executing the command. This code is called the Program Message Terminator.
  • Page 9 Page 2.7 ** Typical program sequence ** An example A typical program sequence consists of the following user actions: 1. Set the communication parameters for the RS232 port of the computer to match the ScopeMeter settings. 2. Output a command or query to the ScopeMeter. 3.
  • Page 10 Page 2.8 ’Example of a typical program sequence: ’***************** Begin example program **************** OPEN "COM1:1200,N,8,1,CS,DS,RB2048" FOR RANDOM AS #1 ’This QBASIC program line sets the parameters for the ’RS232 port (COM1 on the Computer) to match the ’ScopeMeter power-on default settings. It also opens a ’communication channel (assigned #1) for input or output ’through the COM1 port.
  • Page 11 ’ Page 2.9 ’**************** 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.
  • Page 12 Page 3.1 ============================================================= COMMAND REFERENCE CONVENTIONS ** Page layout used for each command ** - Header Each command description starts on a new page with a header for quickly finding the command. This header indicates the command name and the two-character header used for the command syntax.
  • Page 13 Page 3.2 Use an MS-DOS Editor and copy the complete program between these two lines to a file name with the .BAS extension. Start QBASIC and open this file from the FILE menu. Long programs (longer than 55 lines) include page breaks. Such page breaks are preceded by the ’...
  • Page 14 Page 3.3 ** Syntax conventions ** The Command Syntax and the Response Syntax may contain the following meta symbols and data elements: UPPERCASE These characters are part of the syntax. For commands, lower case is also allowed. <...> An expression between these brackets is a code, such as <cr>...
  • Page 15 Page 3.4 ============================================================= ** Overview of commands for the ScopeMeter ** COMMAND PAGE COMMAND NAME HEADER NUMBER ------------------------------------------------------- AUTO SETUP ARM TRIGGER CLEAR MEMORY CPL VERSION QUERY 3.11 DEFAULT SETUP 3.13 GET DOWN 3.15 GO TO LOCAL 3.17 GO TO REMOTE 3.20 HOLD 3.21...
  • Page 16: Auto Setup As

    Page 3.5 ============================================================= AUTO SETUP ------------------------------------------------------------- Purpose: Invokes an automatic setup for the active mode. The result of this command is the same as pressing the AUTO key on the ScopeMeter. Note: You can select the items that are affected by the AUTO SET procedure via the USER OPTIONS key on the ScopeMeter.
  • Page 17 ’ Page 3.6 ’***************** Begin example program ***************** ’Clears the PC screen. OPEN "COM1:1200,N,8,1,CS,DS,RB2048" FOR RANDOM AS #1 PRINT #1, "AS" ’Sends AUTO SETUP command. GOSUB Acknowledge ’Input acknowledge from ScopeMeter. CLOSE #1 ’**************** Acknowledge subroutine ****************** ’Use this subroutine after each command or query sent to the ’ScopeMeter.
  • Page 18 Page 3.7 ============================================================= ARM TRIGGER ------------------------------------------------------------- Purpose: Resets and arms the trigger system for a new acquisition. This command is used for single shot measurements. When the AT command is given while an acquisition is in progress, this acquisition is aborted and the trigger system is rearmed.
  • Page 19 ’ Page 3.8 ’**************** 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.
  • Page 20: Clear Memory Cm

    Page 3.9 ============================================================= CLEAR MEMORY ------------------------------------------------------------- Purpose: Clears all saved setups, waveforms, and screens from memory. Command Syntax: CM<cr> Response Syntax: <acknowledge><cr> Example:...
  • Page 21 ’ Page 3.10 ’***************** Begin example program ***************** OPEN "COM1:1200,N,8,1,CS,DS,RB2048" FOR RANDOM AS #1 PRINT #1,"CM" ’Sends the Clear Memory command. GOSUB Acknowledge ’Input acknowledge from ScopeMeter. CLOSE #1 ’**************** Acknowledge subroutine ****************** ’Use this subroutine after each command or query sent to the ’ScopeMeter.
  • Page 22 Page 3.11 ============================================================= CPL VERSION QUERY ------------------------------------------------------------- Purpose: Queries the CPL interface version. Command Syntax: CV<cr> Response Syntax: <acknowledge><cr>[<version><cr>] where, <version> is an ASCII string representing the year this version has been created. Example:...
  • Page 23 ’ Page 3.12 ’***************** Begin example program ***************** OPEN "COM1:1200,N,8,1,CS,DS,RB2048" FOR RANDOM AS #1 PRINT #1,"CV" ’Sends CPL VERSION query. GOSUB Acknowledge ’Input acknowledge from ScopeMeter. INPUT #1,VERSION$ ’Inputs queried data. PRINT "CPL Version "; VERSION$ ’Displays version data. ’**************** Acknowledge subroutine ****************** ’Use this subroutine after each command or query sent to the...
  • Page 24: Default Setup Ds

    Page 3.13 ============================================================= DEFAULT SETUP ------------------------------------------------------------- Purpose: Resets the ScopeMeter to the factory settings at delivery, except for the RS232 communication settings such as baud rate, to keep the communication alive. A Master Reset (refer to the Users Manual) performs the same, but also resets the RS232 communication settings to the default values.
  • Page 25 ’ Page 3.14 ’***************** Begin example program ***************** OPEN "COM1:1200,N,8,1,CS,DS,RB2048" FOR RANDOM AS #1 PRINT #1, "DS" ’Sends DEFAULT SETUP command. GOSUB Acknowledge ’Input acknowledge from ScopeMeter. SLEEP 2 ’Delay (2 s) necessary after "DS". PRINT #1, "ID" ’Sends the IDENTIFICATION query. GOSUB Acknowledge ’Input acknowledge from ScopeMeter.
  • Page 26 Page 3.15 ============================================================= GET DOWN ------------------------------------------------------------- Purpose: Switches the instrument’s power off. If a power adapter is connected, you can use the SO command to switch power on again. If there is no power adapter connected, the instrument can only be switched on manually by pressing the Power ON/OFF key.
  • Page 27 ’ Page 3.16 ’***************** Begin example program ***************** OPEN "COM1:1200,N,8,1,CS,DS,RB2048" FOR RANDOM AS #1 PRINT #1, "GD" ’Sends the GET DOWN command. GOSUB Acknowledge ’Input acknowledge from ScopeMeter. PRINT "The GET DOWN command switched the ScopeMeter off." PRINT "Press any key on the PC keyboard to switch " PRINT "the ScopeMeter on again."...
  • Page 28 Page 3.17 ============================================================= GO TO LOCAL ------------------------------------------------------------- Purpose: Sets the ScopeMeter in the local operation mode so the keypad is enabled. Also refer to the GR (Go to Remote) command. Command Syntax: GL<cr> Response Syntax: <acknowledge><cr> Example: The following example uses the GR (GO TO REMOTE) command (refer to the description for this command) to set the ScopeMeter in the REMOTE state so that the keypad is disabled.
  • Page 29 ’ Page 3.18 ’***************** Begin example program ***************** ’Clears the PC screen. OPEN "COM1:1200,N,8,1,CS,DS,RB2048" FOR RANDOM AS #1 PRINT #1, "GR" ’Sends GO TO REMOTE command. GOSUB Acknowledge ’Input acknowledge from ScopeMeter. PRINT "All ScopeMeter keys (except the Power ON/OFF key) PRINT "are now disabled by the GR (GO TO REMOTE) command."...
  • Page 30 ’ Page 3.19 ’**************** 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.
  • Page 31 Page 3.20 ============================================================= GO TO REMOTE ------------------------------------------------------------- Purpose: Sets the ScopeMeter in the remote operation mode so that the keypad is disabled. You can use the following methods to return to the local operation mode so that the keypad is enabled: 1.
  • Page 32 Page 3.21 ============================================================= HOLD ------------------------------------------------------------- Purpose: Sets the ScopeMeter in the Hold mode. In other words, the ScopeMeter stops sampling the input channels and calculating measurement results. Command Syntax: HO<cr> Response Syntax: <acknowledge><cr> Example:...
  • Page 33 ’ Page 3.22 ’***************** Begin example program ***************** OPEN "COM1:1200,N,8,1,CS,DS,RB2048" FOR RANDOM AS #1 PRINT #1, "HO" ’Sends the HOLD command. GOSUB Acknowledge ’Input acknowledge from ScopeMeter. PRINT "The HOLD command has put the ScopeMeter in HOLD." PRINT "Check on the ScopeMeter screen." PRINT "Press any key on the PC keyboard to continue and"...
  • Page 34 Page 3.23 ============================================================= IDENTIFICATION ------------------------------------------------------------- Purpose: Returns the ScopeMeter model identification information. Command Syntax: ID<cr> Response Syntax: <acknowledge><cr>[<identity><cr>] where, <identity> is an ASCII string containing the following data elements: <model_number>;<software_version>; <creation_date>;<languages> Example: The following example program queries the identity data of the ScopeMeter and displays this data on the PC screen.
  • Page 35 ’ Page 3.24 ’***************** Begin example program ***************** ’Clears the PC screen. OPEN "COM1:1200,N,8,1,CS,DS,RB2048" FOR RANDOM AS #1 PRINT #1, "ID" ’Sends IDENTIFICATION query. GOSUB Acknowledge ’Input acknowledge from ScopeMeter. INPUT #1, IDENT$ ’Inputs the queried data. PRINT IDENT$ ’Displays queried data. CLOSE #1 ’**************** Acknowledge subroutine...
  • Page 36 Page 3.25 ============================================================= INSTRUMENT STATUS ------------------------------------------------------------- Purpose: Queries the contents of the ScopeMeter’s status register. The returned value reflects the present operational status of the ScopeMeter. This is a 16-bit word, presented as an integer value, where each bit represents the Boolean value of a related event.
  • Page 37 Page 3.26 ’***************** Begin example program ***************** ’Clears the PC screen OPEN "COM1:1200,N,8,1,CS,DS,RB2048" FOR RANDOM AS #1 PRINT #1, "IS" ’Sends the INSTRUMENT STATUS query GOSUB Acknowledge ’Input acknowledge from ScopeMeter INPUT #1, Status$ ’Input Instrument Status StV = VAL(Status$) ’Decimal value of Instrument Status PRINT "Instrument Status : ";...
  • Page 38 ’ Page 3.27 ’**************** 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.
  • Page 39 57600 (Fluke 19xC, PM9080/101 required) The default baudrate is 1200. This is set at power-on or after a Reset Instrument command (command "RI") Notes: The Fluke 19x/19xC instruments support 1 stopbit, 8 databits and software handshake (X-on X-off protocol). Hardware handshaking is not supported.
  • Page 40 Page 3.29 Response Syntax: <acknowledge><cr> See an example for this command under QUERY PRINT (QP).
  • Page 41 Page 3.30 ============================================================= PROGRAM SETUP ------------------------------------------------------------- Purpose: Restores a complete setup, previously saved with the SS (Save Setup) command and queried with the QS (Query Setup) command and saved in a string variable or to a file. <Command 1> -> <Response 1> -> <Command 2> -> <Response 2> Command Syntax 1: PS [<saved_setup_no>]<cr>...
  • Page 42 to the ScopeMeter.
  • Page 43 ’ Page 3.31 ’***************** Begin example program ***************** OPEN "COM1:1200,N,8,1,CS,DS,RB2048" FOR RANDOM AS #1 GOSUB ClearPort ’Clears pending data from port. PRINT #1, "QS" ’Queries the actual setup data. GOSUB Acknowledge ’Input acknowledge from ScopeMeter. GOSUB Response ’Writes the setup data to file. PRINT "Present setup data are stored in the file SETUP0"...
  • Page 44 ’ Page 3.32 ’**************** 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.
  • Page 45 ’ 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$.
  • Page 46 Page 3.34 ============================================================= QUERY MEASUREMENT ------------------------------------------------------------- Purpose: Queries for active readings (see Syntax 1) or measurement results from the ScopeMeter (see Syntax 2). Command Syntax 1: QM<cr> Command Syntax 2: QM <no>{,<no>}<cr> where in TrendPlot mode, ************************** <no> = 11 | 21 where in Meter mode, **************************** * <no>...
  • Page 47 Page 3.35 Response Syntax 1: <acknowledge><cr>[<reading>{,<reading>}<cr>] where, <reading> = <no>,<valid>,<source>,<unit>,<type>,<pres>,<resol> <no> see Command Syntax 2 <valid> validity of the reading: reading valid reading non-valid <source> source of the reading: Voltage channel: Input A (Scope mode) Ampere channel: Input B (Scope mode) Input external: COM &...
  • Page 48 Celsius <resol> resolution of the reading as <float> to determine the least significant digit Response Syntax 2: <acknowledge><cr>[<meas_value>{,<meas_value>}<cr>] where, <meas_value> = [<sign>]<decimal_number>E<sign><decimal_number> Notes: Only displayed results are available for output. Not all readings are available in all Fluke 19x/19xC models/versions.
  • Page 49 Page 3.36 Example: ’***************** Begin example program ***************** ’Clears the PC screen. OPEN "COM1:1200,N,8,1,CS,DS,RB2048" FOR RANDOM AS #1 PRINT #1, "QM" ’Queries for active readings GOSUB Acknowledge ’Input acknowledge from ScopeMeter. ’*** Examines only the 7 inputs of the first reading <no> 11. INPUT #1, reading.no ’1st <decimal_number>...
  • Page 50 END IF INPUT #1, presentation ’6th <decimal_number> PRINT "Presentation of reading= "; IF presentation = 0 THEN PRINT "Absolute value" ELSEIF presentation = 1 THEN PRINT "Relative value" ELSEIF presentation = 2 THEN PRINT "Logarithmic value" ELSE PRINT "Unexpected value?" END IF INPUT #1, resolution ’7th <decimal_number>...
  • Page 51 ’ Page 3.37 ’**************** 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.
  • Page 52 <screen_number> = 0 Always zero <output_format> = 0 Epson FX, LQ compatible Returns screen image 1:1 (Fluke 19x) Returns screen image 4:3 (Fluke 19xC) Laser Jet Returns screen image 4:3 (Fluke 19x) Desk Jet Returns screen image 4:3 (Fluke 19x)
  • Page 53 Page 3.39 Example for QP 0,0 (or QP or QP 0,1 or QP 0,2 or QP 0,3): The following program reads the ScopeMeter screen (print) data and copies this data to the file Qpfile. This file can be copied to the printer port LPT1, for example. The Read Buffer length for the PC is set to 7500 bytes to prevent buffer overflow during input from the ScopeMeter.
  • Page 54 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 ’Close all files.
  • Page 55 Page 3.40 Response Syntax for QP 0,11,b or QP 0,11,B: <acknowledge><cr><png_data_length>,<png_data> where, <png_data_length> = <digit>{<digit>} This field indicates the total number of bytes in the <png_data>. <png_data> = <segment>{<segment>} <segment> = <acknowledge><cr>#0<block_header><block_length> <block_data><check_sum><cr> <block_header> = <binary_character> When the most significant bit (bit 7) is set, this block (segment) is the last one in the sequence.
  • Page 56 IDHR: Header chunk describing the image characteristics. PLTE: Palette chunk. The first 96 entries form the color palette table, the next 96 entries form the grey-scale palette table for conversion to Black & White. Notice that the index numbers in the IDAT chunk only refer to the first 96 palette entries.
  • Page 57 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.
  • Page 58 PRINT #1, "PC 1200" ’Programs ScopeMeter back to the ’default baud rate. GOSUB Acknowledge ’Input acknowledge from ScopeMeter. CLOSE #1 PRINT "Print data copied to file ’SCREEN.PNG’." PRINT "You can use a browser program or a graphics editor" PRINT "to view this file." ’****************** ReadBlock subroutine ********************* ’This subroutine reads one block of data from the RS232 port.
  • Page 59 ’the block again) GOSUB Acknowledge ’Input acknowledge from ScopeMeter. CLOSE ’Close all files. PRINT "Program aborted." END IF BytesToReceive& = BytesToReceive& - BlockLength& RETURN ’**************** Acknowledge subroutine ****************** ’Use this subroutine after each command or query sent to the ’ScopeMeter. This routine inputs the acknowledge ’response from the ScopeMeter.
  • Page 60 Page 3.42 ============================================================ QUERY SETUP ------------------------------------------------------------ Purpose: Queries the present acquisition setup data from the ScopeMeter. Command Syntax: QS [<setup_no>]<cr> where, <saved_setup_no> = 0 : Actual setup Response Syntax: <acknowledge><cr>[#0{<node>}<cr>] where, <node> = <node_header><node_identifier><node_length> [<node_data>]<check_sum> <node_header> = <binary_character> Possible values: 20 hex All nodes except the last (end node)
  • Page 61 When a waveform is queried that is still under processing, the processing is finished first (no half traces returned). Command Syntax: QW <trace_no>[,V|S] <trace_no> = <decimal number> <trace_no> Trace Source: (only for Fluke 19x) --------------------------------------------- Scope mode: Normal trace INPUT A Min/Max trace INPUT A...
  • Page 62 TrendPlot 2: Min/Max/Average trace Scope mode: Min/Max trace INPUT B ENVELOPE Scope mode: Min/Max trace INPUT B REFERENCE Scope mode, Mathematics: Min/Max trace A+B, A-B or AxB V | v Trace values (samples) only S | s Setup (administration) data only. When V or S is omitted, trace values and setup data are returned.
  • Page 63 Page 3.44 If option V or v (value only) is given: <trace_data> = <trace_samples><cr> For detailed descriptions about the waveform structure, refer to Appendix C. If option S or s (Setup data only) is given: <trace_data> = <trace_admin><cr> where, <trace_admin> = string of hexadecimal characters, representing the setup related to the given <trace_no>.
  • Page 64 ’...
  • Page 65 ’ Page 3.45 ’**************** 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.
  • Page 66 ’ Page 3.46 ’****************** 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...
  • Page 67 ’ Page 3.47 Interpret.Admin: Resp.Count = 1 ’Byte counter for Resp$ SumCheck1% = 0 ’Sumcheck byte for Resp$ ’ ’***** Interpret the <trace_admin> waveform data bytes ’***** in the Resp$ string (see appendix C). ’ ’***** 2 bytes <trace_admin> block trailing : #0 IF MID$(Resp$, Resp.Count, 2) <>...
  • Page 68 Resp.Count = Resp.Count + 2 PRINT " <x_divisions> ="; X.Divisions ’...
  • Page 69 ’ Page 3.48 ’ DIM expscale(2) ’Exponents for Y/X.Scale DIM YXscale#(2) ’Values for Y/X.Scale ’ ’***** 3 bytes <y_scale> = <mantissa_high><mantissa_low><exponent> ’***** <mantissa> = <mantissa_high> * 256 + <mantissa_low> ’***** <y_scale> = <sign><mantissa> E <sign><exponent> ’***** Example: +123E-4 = 123 / 10000 = 0.0123 FOR i = 0 TO 2 SumCheck1% = (SumCheck1% + ASC(MID$(Resp$,Resp.Count+i,1))) MOD 2 NEXT i...
  • Page 70 PRINT " <x_step> ="; X.Step ’...
  • Page 71 ’ Page 3.49 ’ DIM exponent(6) ’Exponents for Y/X.Zero & Y/X.Resol & Y/X.At.0 DIM YXvalue#(6) ’Values for Y/X.Zero & Y/X.Resol & Y/X.At.0 ’ ’***** 3 bytes <y_zero> = <mantissa_high><mantissa_low><exponent> ’***** <mantissa> = <mantissa_high> * 256 + <mantissa_low> ’***** <y_zero> = <sign><mantissa> E <sign><exponent> ’***** Example: +123E-4 = 123 / 10000 = 0.0123 FOR i = 0 TO 2...
  • Page 72 nb = nb + ASC(MID$(Resp$, Resp.Count + 1, 1)) ELSE ’...
  • Page 73 ’ Page 3.50 ’ nb = nb * 256 ’Positive value nb = nb + ASC(MID$(Resp$, Resp.Count + 1, 1)) END IF exponent(3) = ASC(MID$(Resp$, Resp.Count + 2, 1)) YXvalue#(3) = nb Resp.Count = Resp.Count + 3 ’***** ’* Further calculation after ’Signed.Samples’ determination ’***** ’***** 3 bytes <x_resolution>...
  • Page 74 ’...
  • Page 75 ’ Page 3.51 ’ FOR i = 0 TO 2 SumCheck1% = (SumCheck1% + ASC(MID$(Resp$,Resp.Count+i,1))) MOD 2 NEXT i nb = ASC(MID$(Resp$, Resp.Count, 1)) IF nb >= 128 THEN nb = - (256 - nb) * 256 ’Negative value nb = nb + ASC(MID$(Resp$, Resp.Count + 1, 1)) ELSE nb = nb * 256 ’Positive value...
  • Page 76 PRINT "SumCheck so far (MOD 256) ="; SumCheck1% MOD 256 CLOSE: END ’...
  • Page 77 ’ Page 3.52 Interpret.Samples: ’ ’***** Interpret the <trace_samples> waveform data bytes ’***** in the Resp$ string (see appendix C). ’***** ’***** 1 byte separator admin/samples : , ’***** 2 bytes <trace_samples> block trailing : #0 ’ SumCheck2% = 0 IF MID$(Resp$, Resp.Count, 3) <>...
  • Page 78 END IF ’...
  • Page 79 ’ Page 3.53 ’ Resp.Count = Resp.Count + 1 PRINT "Signed.Samples = "; PRINT #4, "Signed.Samples = "; IF Signed.Samples = 1 THEN PRINT "TRUE "; : PRINT #4, "TRUE" ELSE PRINT "FALSE "; : PRINT #4, "FALSE" END IF PRINT "Sample.Format = ";...
  • Page 80 END IF NEXT j ’...
  • Page 81 ’ Page 3.54 ’ Y.Zero = YXvalue#(1) X.Zero = YXvalue#(2) Y.Resol = YXvalue#(3) X.Resol = YXvalue#(4) Y.At.0 = YXvalue#(5) X.At.0 = YXvalue#(6) PRINT "<y_zero> ="; Y.Zero, PRINT " <x_zero> ="; X.Zero PRINT "<y_resolution> ="; Y.Resol, PRINT " <x_resolution> ="; X.Resol PRINT "<y_at_0>...
  • Page 82 ’ Page 3.55 ’ ’***** <Sample.Bytes> bytes <invalid> value Sample.Byte = ASC(MID$(Resp$, Resp.Count, 1)) SumCheck2% = SumCheck2% + Sample.Byte IF (Signed.Samples = 1) AND (Sample.Byte >= 128) THEN Sample.Byte = - (256 - Sample.Byte) END IF Invalid& = Sample.Byte FOR i = 2 TO Sample.Bytes Sample.Byte = ASC(MID$(Resp$, Resp.Count + i - 1, 1)) SumCheck2% = (SumCheck2% + Sample.Byte) MOD 256 Invalid&...
  • Page 83 Resp.Count = Resp.Count + Sample.Bytes ’...
  • Page 84 ’ Page 3.56 ’ IF i=1 OR i=2 OR i = Nbr.Of.Samples-1 OR i = Nbr.Of.Samples THEN IF (Signed.Samples = 0) OR (Sample.Value&(i) < CLimit) THEN Ampl.Value = Sample.Value&(i) * Y.Resol ’Positive value ELSE ’Negative value Ampl.Value = - ((CMaxim - Sample.Value&(i)) * Y.Resol) END IF PRINT "Sample";...
  • Page 85 ’ Page 3.57 Create.CSV: ’ ’***** ’***** Convert the total Response string to file Wave.CSV ’***** as input file for Excel (spreadsheet), for example. ’***** ’ OPEN "Wave.CSV" FOR OUTPUT AS #4 PRINT #4, "Title , "; IF MID$(Query$, 4, 2) = "10" THEN PRINT #4, "Input A"...
  • Page 86 ’ Page 3.58 ’ ’***** Sample values x,y (time,amplitude) Time.Value = X.Zero ’Start at x-offset MinMax.Flag = MinMax.Samples ’Switch flag (2, 1, 0) FOR i = 1 TO Nbr.Of.Samples IF (Signed.Samples = 0) OR (Sample.Value&(i) < CLimit) THEN ’Positive value Amplit.Value = Sample.Value&(i) * Y.Resol ELSE ’Negative value...
  • Page 87 Page 3.59 ============================================================= READ DATE ------------------------------------------------------------- Purpose: Reads the real time clock date settings. Command Syntax: RD<cr> Response Syntax: <acknowledge><cr>[<date><cr>] where, <date> = string of the following format: <year>,<month>,<day> e.g. 1999,8,14 Example: The following example program reads the date setting from the ScopeMeter.
  • Page 88 ’ Page 3.60 ’***************** Begin example program ***************** OPEN "COM1:1200,N,8,1,CS,DS,RB2048" FOR RANDOM AS #1 PRINT #1, "RD" ’Sends the READ DATE query. GOSUB Acknowledge ’Input acknowledge from ScopeMeter. INPUT #1, SMYear$, SMMonth$, SMDay$ ’Inputs the date string. PRINT "Date "; SMYear$; "-"; SMMonth$; "-"; SMDay$ ’Displays the date string.
  • Page 89: Reset Instrument Ri

    Page 3.61 ============================================================= RESET INSTRUMENT ------------------------------------------------------------- Purpose: Resets the entire instrument, including the CPL interface. The baud rate remains unchanged. Command Syntax: RI<cr> Response Syntax: <acknowledge><cr> Note: Wait for at least 2 seconds after the <acknowledge> reply has been received, to let the ScopeMeter settle itself before you send the next command.
  • Page 90 ’ Page 3.62 ’***************** Begin example program ***************** ’Clears the PC screen. OPEN "COM1:1200,N,8,1,CS,DS,RB2048" FOR RANDOM AS #1 PRINT #1, "RI" ’Sends the RESET INSTRUMENT command. GOSUB Acknowledge ’Input acknowledge from ScopeMeter. SLEEP 2 ’Delay (2 s) necessary after reset. GOSUB ClearPort ’Clears pending data from port.
  • Page 91 To select and setup the Replay analysis mode and to select a replay screen (see Syntax 2) or to query the total number of valid replay screens (see Syntax 1). Note: applicable for the Fluke 199 and 196 families Command Syntax 1: RP<cr>...
  • Page 92 ’ Page 3.64 ’***************** Begin example program ***************** ’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 ’screens + active screen number GOSUB Acknowledge ’Input acknowledge from ScopeMeter. INPUT #1, nr.of.screens ’1st <decimal_number>...
  • Page 93 END IF : RETURN ’****************** End example program ******************...
  • Page 94 Page 3.65 ============================================================= RECALL SETUP ------------------------------------------------------------- Purpose: Recalls an internally stored setup. This setup must have been stored in the ScopeMeter manually or with the SS (Save Setup) command. The effect of the RS command is that the instrument setup is recalled and the instrument forced to running state.
  • Page 95 ’ Page 3.66 ’***************** Begin example program ***************** ’Clears the PC screen. OPEN "COM1:1200,N,8,1,CS,DS,RB2048" FOR RANDOM AS #1 PRINT #1, "SS 8" ’Sends SAVE SETUP command. ’Setup saved in setup memory 8. GOSUB Acknowledge ’Input acknowledge from ScopeMeter PRINT "The present setup data are stored in setup memory 8." PRINT "The remainder of this program will restore these."...
  • Page 96 ’ Page 3.67 ’**************** 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.
  • Page 97 Page 3.68 ============================================================= READ TIME ------------------------------------------------------------- Purpose: Reads the real time clock time settings. Command Syntax: RT<cr> Response Syntax: <acknowledge><cr>[<time><cr>] where, <time> = string of the following format: <hours>,<minutes>,<seconds> e.g. 15,4,43 Example: The following example program reads the time setting from the ScopeMeter.
  • Page 98 ’ Page 3.69 ’***************** Begin example program ***************** OPEN "COM1:1200,N,8,1,CS,DS,RB2048" FOR RANDOM AS #1 PRINT #1,"RT" ’Sends the READ TIME query. GOSUB Acknowledge ’Input acknowledge from ScopeMeter. INPUT #1,SMhour$,SMmin$,SMsec$ ’Inputs the time strings. PRINT "Time "; SMhour$;":";SMmin$;":";SMsec$ ’Displays the time string. ’**************** Acknowledge subroutine ******************...
  • Page 99: Switch On So

    Page 3.70 ============================================================= SWITCH ON ------------------------------------------------------------- Purpose: Switches the ScopeMeter on. This only works when the ScopeMeter is powered via the power adapter. Command Syntax: SO<cr> Response Syntax: <acknowledge><cr> See an example for this command under GET DOWN (GD).
  • Page 100 Page 3.71 ============================================================= SAVE SETUP ------------------------------------------------------------- Purpose: Saves the present setup in one of the battery-backup instrument registers. Command Syntax: SS <setup_reg><cr> where, <setup_reg> = 1 to 15 : Screen/Setup memories When <setup_reg> is omitted, number 1 is assumed. 1001 : Long Record/Replay memory Input A 1002 : Long Record/Replay memory Input B...
  • Page 101 Page 3.72 ============================================================= STATUS QUERY ------------------------------------------------------------- Purpose: Queries the error status of the ScopeMeter. This is a 16-bit word, presented as an integer value, where each bit represents the Boolean value of a related error event. After the reply or after a RI (Reset Instrument) command, the value is reset to zero.
  • Page 102 ’ Page 3.73 ’***************** Begin example program ***************** ’Clears the PC screen. OPEN "COM1:1200,N,8,1,CS,DS,RB2048" FOR RANDOM AS #1 PRINT #1, "PC 12345" ’Sends a baud rate value that is ’ out of range for the ScopeMeter. GOSUB Acknowledge.Status ’Input acknowledge from ScopeMeter ’and the status value if the ’acknowledge value is non-zero.
  • Page 103 ’ Page 3.74 ’************** Displays ScopeMeter status ***************** ’This subroutine gives you further information if the ’acknowledge reply from the ScopeMeter is non-zero. Status.display: PRINT #1, "ST" ’Sends the STATUS query. GOSUB Acknowledge.Status ’Inputs acknowledge from ScopeMeter. INPUT #1, STAT ’Inputs status value.
  • Page 104: Trigger Acquisition Ta

    Page 3.75 ============================================================= TRIGGER ACQUISITION ------------------------------------------------------------- Purpose: Triggers an acquisition. This command acts as a hardware trigger to start a new acquisition. In SINGLE shot acquisition mode the trigger system must have been armed with the AT (Arm Trigger) command. Command Syntax: TA<cr>...
  • Page 105 ’ Page 3.76 ’***************** Begin example program ***************** ’Clears the PC screen. OPEN "COM1:1200,N,8,1,CS,DS,RB2048" FOR RANDOM AS #1 PRINT #1, "TA" ’Sends TRIGGER ACQUISITION command. GOSUB Acknowledge ’Input acknowledge from ScopeMeter. ’**************** Acknowledge subroutine ****************** ’Use this subroutine after each command or query sent to the ’ScopeMeter.
  • Page 106 Page 3.77 ============================================================= WRITE DATE ------------------------------------------------------------- Purpose: Writes the real time clock date settings. Command Syntax: WD <date><cr> where, <date> = string of the following format: <year>,<month>,<date> e.g. 1999,9,14 Response Syntax: <acknowledge><cr> Example: The following example program programs the ScopeMeter with a new date setting.
  • Page 107 ’ Page 3.78 ’***************** Begin example program ***************** ’Clears the PC screen. OPEN "COM1:1200,N,8,1,CS,DS,RB2048" FOR RANDOM AS #1 PRINT #1, "WD 1999,9,14" ’Sets the real time clock ’to September 14, 1999 GOSUB Acknowledge ’Input acknowledge from ScopeMeter. ’**************** Acknowledge subroutine ****************** ’Use this subroutine after each command or query sent to the ’ScopeMeter.
  • Page 108 Page 3.79 ============================================================= WRITE TIME ------------------------------------------------------------- Purpose: Writes the real time clock time settings. Command Syntax: WT <time><cr> where, <time> = string of the following format: <hours>,<minutes>,<seconds> e.g. 15,30,0 Response Syntax: <acknowledge><cr> Example: The following example program programs the ScopeMeter with a new time setting.
  • Page 109 ’ Page 3.80 ’***************** Begin example program ***************** ’Clears the PC screen. OPEN "COM1:1200,N,8,1,CS,DS,RB2048" FOR RANDOM AS #1 PRINT #1, "WT 15,28,0" ’Sets the real time clock to ’03:28 p.m.. GOSUB Acknowledge ’Input acknowledge from ScopeMeter. ’**************** Acknowledge subroutine ****************** ’Use this subroutine after each command or query sent to the ’ScopeMeter.
  • Page 110 Page A.1 ============================================================= APPENDIX A ACKNOWLEDGE DATA ------------------------------------------------------------- The ScopeMeter returns an <acknowledge> reply after each command or query. The value indicates correct or incorrect operation. You always must read this reply to check for the correct operation and to achieve synchronization between your program and the RS232 interface of the ScopeMeter.
  • Page 111 Page A.2 Synchronization Error Returned when the ScopeMeter receives data while it does not expect any data. This can occur as follows: - The ScopeMeter receives a new command while a previous command or query is not yet completely executed. You can prevent this error by doing the following: 1.
  • Page 112 Page B.1 ============================================================= APPENDIX B STATUS DATA ------------------------------------------------------------- The Status word returned from the ST query gives you extra information when you have received a non-zero <acknowledge> reply. The Status word is a 16-bit binary word where each bit set true represents an error event with a decimal value determined by the bit position.
  • Page 113 Page C.1 ============================================================= APPENDIX C WAVEFORM DATA ------------------------------------------------------------- The waveform data that is received from the QW (Query Waveform) query, consists of the following data. <trace_admin>,<trace_samples> where, <trace_admin> = #0<block_header><block_length><trace_result> <y_unit><x_unit><y_divisions><x_divisions> <y_scale><x_scale><y-step><x_step><y_zero> <x_zero><y_resolution><x_resolution><y_at_0> <x_at_0><date_stamp><time_stamp><check_sum> where, <block_header> = <binary_character> Possible values: 144 and 0. The value 0 is returned when also the <trace_samples>...
  • Page 114 <hours> <days> <Hertz> = 10 <Degree> = 11 <degree_Celsius> = 12 <degree_Fahrenheit> = 13 <percentage> = 14 <dBm 50 Ohm> = 15 <dBm 600 Ohm> = 16 <dB Volts> = 17 <dB Ampere> = 18 <dB Watts> = 19 <Volt * Ampere Reactive> = VAR, 20 <Volt * Ampere>...
  • Page 115 Page C.2 <y_divisions> = <unsigned_integer> Number of y divisions in which the waveform is displayed on the instrument screen. <x_divisions> = <unsigned_integer> Number of x divisions in which the waveform is displayed on the instrument screen. <y_scale> = <float> Number of units per y division. <x_scale>...
  • Page 116 Page C.3 <y_at_0> = <float> This field contains the value corresponding with the lowest horizontal grid line. <x_at_0> = <float> This field contains the value corresponding with the most left vertical grid line. Value = 0E0 (not used). <date_stamp> = <year><month><day>...
  • Page 117 <overload> = <sample_value> This field specifies which value in the trace samples represents the overload value.
  • Page 118 Page C.4 <underload> = <sample_value> This field specifies which value in the trace samples represents the underload value. <invalid> = <sample_value> This field specifies which value in the trace samples represents an invalid sample. Invalid samples can be present at locations in the trace that have not been filled (yet).
  • Page 119 Page D.1 ============================================================= APPENDIX D ASCII CODES ------------------------------------------------------------- Hexadecimal value | ASCII character Decimal value 00 NUL SP 32 ‘ 01 SOH 02 STX " 03 ETX 04 EOT 05 ENQ 06 ACK & 07 BEL ’ LF 10 VT 11 FF 12 CR 13 SO 14...
  • Page 120 Page D.2 Hexadecimal value | ASCII character Decimal value ? 128 À à ¡ 161 Á á ‚ 130 ¢ 162 Â â ƒ 131 £ 163 Ã ã „ 132 ¤ 164 Ä ä … 133 ¥ 165 Å å...

This manual is also suitable for:

Scopemeter 190 series