Fluke 190 202 Users Manual 19x_____prog Guide_eng_190II___WN 2012+edits
2015-09-09
: Fluke Fluke-190-202-Users-Manual-808850 fluke-190-202-users-manual-808850 fluke pdf
Open the PDF directly: View PDF
.
Page Count: 82
| Download | |
| Open PDF In Browser | View PDF |
REMOTE CONTROL AND
PROGRAMMING REFERENCE
for all FLUKE 190 family
of
ScopeMeter® test tools
© Fluke Corporation 1996, 2012
Revision 1a – December 2012
Copyright © 1996, 2012 Fluke Corporation or its subsidiaries.
Productnames and brandnames which appear in this document may be trademarks or registered trademarks of their respective owners.
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 2
TABLE OF CONTENTS
Table of Contents ................................................................................................................................................. 3
Introduction.......................................................................................................................................................... 5
INTRODUCTION TO PROGRAMMING ................................................................................................................... 7
Basic Programming Information ....................................................................................................................... 7
Commands structure ........................................................................................................................................ 7
Responses to receive from the ScopeMeter .................................................................................................... 8
Acknowledge .................................................................................................................................................... 8
Command and Response Terminators (Message Terminators) ...................................................................... 9
Typical program sequence - An example ......................................................................................................... 9
COMMAND REFERENCE...................................................................................................................................... 11
Conventions .................................................................................................................................................... 11
AS AUTO SETUP ..................................................................................................................................... 13
AT ARM TRIGGER ................................................................................................................................... 14
CM CLEAR MEMORY ............................................................................................................................... 16
DS DEFAULT SETUP ................................................................................................................................ 17
GD GET DOWN........................................................................................................................................ 18
GL GO TO LOCAL .................................................................................................................................... 19
GR GO TO REMOTE ................................................................................................................................ 19
HO HOLD
........................................................................................................................................ 21
ID
IDENTIFICATION ................................................................................................................................ 22
IS
INSTRUMENT STATUS ....................................................................................................................... 23
PC PROGRAM COMMUNICATIONS (not used in 190-series-II) ............................................................. 25
PS
PROGRAM SETUP.............................................................................................................................. 26
QM QUERY MEASUREMENT .................................................................................................................... 29
QP QUERY PRINT .................................................................................................................................... 34
QS QUERY SETUP.................................................................................................................................... 40
QW QUERY WAVEFORM .......................................................................................................................... 41
RD READ DATE ........................................................................................................................................ 43
RI
RESET INSTRUMENT ......................................................................................................................... 44
RP REPLAY
........................................................................................................................................ 46
RS RECALL SETUP ................................................................................................................................... 48
RT READ TIME ........................................................................................................................................ 50
SO SWITCH ON ....................................................................................................................................... 51
SS
SAVE SETUP ...................................................................................................................................... 52
ST
STATUS QUERY ................................................................................................................................. 53
TA TRIGGER ACQUISITION ..................................................................................................................... 55
WD WRITE DATE ...................................................................................................................................... 56
WT WRITE TIME ...................................................................................................................................... 57
Appendix A
ASCII Codes ..................................................................................................................... 58
Appendix B
Installing the interface cable and drivers........................................................................ 60
Appendix C
Installing USB-drivers for 190-series-II............................................................................ 61
Appendix D
Acknowledge Data .......................................................................................................... 64
Appendix E
Status Data...................................................................................................................... 65
Appendix F
Waveform Data............................................................................................................... 66
Appendix G
Program Example for Query Waveform ......................................................................... 70
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 3
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 4
INTRODUCTION
When using ScopeMeter® testtools, the desire to store any measurement results on the PC, for reference
purposes or for documenting the tests made is rather obvious. For that purpose, Fluke offers a dedicated
software package: FlukeView ScopeMeter for Windows (or ‘SW90W’). It allows the user to store test results,
be it voltage readings or complete scope screen images, or long-time recordings of successive measurements
over time, or even to make a spectral analysis and see what frequency components are contained within a
signal. FlukeView offers all this in a readily available software package, at an affordable price, with user
interface in either English, French or German language, to run on a Windows PC.
FlukeView offers the possibility to store complete instrument settings on the PC, as a file, for sharing those
with co-workers or for re-using them at a later point in time. And the package even includes a possibility to
remotely control the ScopeMeter testtool via a ‘virtual instrument’ seen on the PC-screen, where the mouse
can be used to press keys just like you would on the real instrument; leave your ScopeMeter is a testtroom
and control it remotely, while staying in a more safe environment yourself.
FlukeView ScopeMeter software is readily available as a commercial package, for applications on a Windows
PC (Win-XP or later). When in doubt about purchasing the package, a trial version is available as a demo
package (meaning: no storage nor printing capabilities included). For virtually all ScopeMeter users,
FlukeView ScopeMeter is the perfect tool to get all tasks mentioned above covered – quickly and
conveniently.
Nevertheless, in some situations end-users of ScopeMeter testtools want to write test protocols themselves,
for instance for educational purposes, or want to use ScopeMeters in a larger system-set-up in which
FlukeView can’t be easily included or can’t provide the functionality that the user is looking for. For that
reason, we have written the document at hand.
This document contains remote control and programming information for all models of the different series of
the Fluke 190-series ScopeMeter® testtools. Previous editions of the document dealt with the ‘original 190series’ (instruments that can be recognized by three digit typenumbers without any letters included, e.g.
‘Fluke-199’), and later on was extended to also cover the 190B and 190C series (e.g. ‘Fluke-196C’). This
edition now is created as an update to extend the description and to support the newer ‘Fluke 190-series-II’
instruments as well (model numbers like ‘Fluke-190-204’ or ‘Fluke-190-502’).
The first edition was written around the PM9080 Optically Insulated RS232 Adapter/Cable, which was the
only interface cable available at that point in time. At a later stage, the OC4USB was introduced, which
includes an RS-232 to USB converter, and which behaves just like the PM9080, yet it uses the electrical
interface of the USB-port to establish the physical connection to the (notebook-)PC. From PC-side, however,
this interface is seen through a virtual RS-232-port, also known as a COM-port, and command handling is
exactly the same as when using the PM9080.
The Fluke-190-series-II has a similar kind of interface/converter built into the instrument mainframe. If you
look at the testtool body, you may see a USB-connector on the side of the instrument (in case you can’t find
it: open the plastic cover on the left-hand side of the testtool, closest to the on/off switch). An optical
interface inside the ScopeMeter housing provides the hardware link between that USB-port and the other
internal electronics, while ensuring full electrical insulation, needed to use the testtool as a double insulated
instrument in CAT III 1000 V applications. As a result of this interface, and seen from the PC-side, also the
190-series-II ScopeMeter testtools are controlled through a virtual RS-232 port (a.k.a. ‘a COM-port’).
Details about making the interconnection between PC and instrument using PM9080 or the OC4USB may be
found in Appendix B of this document.
Drivers for the interface cables for the 190, 190B and 190C series were included on the CD-ROM that is or
was found with the instrument.
Details about installing the dedicated USB-drivers for the 190-series-II testtools can be found as Appendix C
of this document.
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 5
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 6
INTRODUCTION TO PROGRAMMING
Basic Programming Information
Before trying to remotely control any ScopeMeter tetstool, a communication link needs to be established
between PC and ScopeMeter. Next, the software interface needs to be established. Refer to Appendix B and
C for details. Once you have installed the interface and drivers, you can control the ScopeMeter® from the
computer with simple communication facilities, such as GWBASIC, QuickBASIC or QBASIC, programming
languages from Microsoft® Corporation.
All examples given in this manual are in the QBASIC language but will also run in QuickBASIC.
QuickBASIC, as a compiler, allows you to make executable files of programs, so you can start such programs
directly from DOS. For reading and interpreting this manual, knowledge of these programming languages is
assumed. QBASIC was supplied with Microsoft MS-DOS 5.0 and higher and with Windows 95, 98, and NT.
With newer Windows operating systems, QBasic is no longer included as a standard, but it is available as
freeware instead, e.g. through ‘quickbasic.sourceforge.net’.
The benefit of presenting the program examples as QBASIC files is in transparency, the easy ‘readability’ even
for programming engineers who are accustomed to work in other, newer programming languages.
Features of the syntax and protocol used with ScopeMeters are as follows:
• Easy input format with a ‘forgiving’ syntax: all commands consist of two characters that can be either
in UPPER or lower case. Parameters, that sometimes follow the command, may be separated from it
by one or more separation characters.
• Strict and consistent output format:
o
alpha character responses are always in UPPERCASE.
o
Parameters are always separated by a comma ("," = ASCII 44, see Appendix A).
o
Responses always end with the carriage return code (ASCII 13). Because the carriage return
code is a non-visible character (visible neither on screen nor on a print-out), this character
is represented as in the command syntax.
• Synchronization between input and output: after receipt of each command, the ScopeMeter returns
an acknowledge character followed by the carriage return code (ASCII 13). This indicates that the
command has been successfully received and executed. The computer program must always read
this acknowledge response before sending the next command to the ScopeMeter testtool. See
below and Appendix D for details.
Commands structure
All remote commands for the ScopeMeter consist of a header, made up of two letters (‘alpha characters’),
which are sometimes followed by additional parameters. Example:
RI
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.
Example:
SS 8
This is the Save Setup command. It saves the present acquisition settings in memory.
The SS header is followed by a separator (space), then followed by the parameter "8" to
indicate where to store the settings. The meaning of this parameter is described in
Chapter 3 COMMAND REFERENCE.
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 7
Some commands require several parameters. Example:
WT 9,50,30
This is the Write Time command. This command requires three parameters. The
parameters are separated by a comma, which is called the Program Data Separator.
You may use only one comma between the parameters.
Also refer to the section ‘Data Separators’.
A code at the end of each command tells the ScopeMeter that the command is ended. This is the carriage
return code (ASCII 13) and is called the Program Message Terminator. This code is needed to indicate to the
ScopeMeter that the command is completed so it can start executing the command.
Also refer to the section ‘Command and Response Terminators’.
Responses to receive from the ScopeMeter
After each command sent to the ScopeMeter, there is an automatic response coming back from it, indicated
as < acknowledge> which you MUST input (receive and handle), to let the computer know whether or not the
previous command has been successfully executed.
Refer to the ‘Acknowledge’ section below.
There are several commands that ask the ScopeMeter for response data. Such commands are called Queries.
Example:
ID
This is the IDentification query which asks for the model number and the software
version of the ScopeMeter.
When the ScopeMeter receives a query it sends the < acknowledge> reply, just as it does
after every command received, but now it is followed by the requested response data.
The format of the response data depends upon which query was sent. When a response consists of different
response data portions, these are separated by commas (ASCII character 44).
Also refer to the section ‘Data Separators’, below.
All response data, < acknowledge> as well as following (requested) response data, is terminated by the
carriage return code ( = ASCII 13).
Also refer to the section ‘Command and Response Terminators’.
Acknowledge
After receiving a command, the ScopeMeter automatically returns the 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 as response terminator.
• If is 0, it indicates that the ScopeMeter has successfully executed the command.
• If the command was a query, the response is immediately followed by the
requested response data, terminated by .
• If is 1 or higher, this indicates that the ScopeMeter testtool has not executed the
command successfully. In that case, and if the command was a query, the
response is NOT followed by any further response data.
There can be several reasons for a non-zero response. For more details, refer to Appendix D.
In case of an error you can obtain more detailed status information by using the ST (STATUS) query.
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 8
Notes:
1. You MUST ALWAYS input (that is: make the PC accept this acknowledgement), even
when the original command was not a query.
2. Throughout this manual, the may be written in full (as was just done), or as .
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
Comma
,
ASCII value
(Decimal)
44
Comments
Single comma allowed
- Response Data Separator
Comma
,
44
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
the instrument can start executing the command. This code is called the Program Message Terminator. The
code needed for the ScopeMeter is carriage return (ASCII code 13 decimal).
Notes:
1. The carriage return code is a non-visible ASCII character. Therefore this code is represented as in
the Command Syntax and Response Syntax lines given for each command.
2. The QBASIC programming language, which is used for all program examples, automatically adds a
carriage return to the end of the command output. (In the QBASIC language, this is the PRINT #....
statement.)
Once is recognized by the ScopeMeter, the entered command is executed. After EACH command, the
ScopeMeter returns to the computer to signal the end of the command processing (also see the
section ‘Acknowledge’.)
- Response (Message) Terminators
The response from the ScopeMeter ends with a carriage return (ASCII 13). This is indicated as in the
Response Syntax for each command.
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 (not needed for 190-series II).
2. Send a command or query to the ScopeMeter.
3. Read (input) the acknowledge response from the ScopeMeter.
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 9
If the response value is zero, go to step 4.
If the response value is not zero, the ScopeMeter didn’t execute the previous command. Read the
error message from the following acknowledge subroutine, recover the error, and repeat the
command or query (this is not shown in the following program example.)
4. If a query was sent to the ScopeMeter, read the response.
5. The sequence of steps 2, 3, and 4 may be repeated for different commands or queries.
6. Close the communication channel.
The following program example gives this in more detail:
‘Example of a typical program sequence:
‘***************** Beginning of 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. Your ScopeMeter must be connected
‘to this port. "RB2048" sets the size of the computer
‘receive buffer to 2048 bytes to prevent buffer overflow
‘during communication with the ScopeMeter.
PRINT #1, "ID"
‘Outputs the IDENTITY command (query) to the ScopeMeter.
GOSUB Acknowledge
‘This subroutine inputs the acknowledge response from
‘the ScopeMeter and displays an error message if the
‘acknowledge value is non-zero.
INPUT #1, Response$ ‘This inputs the response data from the IDENTITY query.
PRINT Response$
‘Displays the queried data.
CLOSE #1
‘This closes the communication channel.
END
‘This ends the program.
‘******************* 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"
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
END IF
RETURN
‘****************** End of example program *****************
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 10
COMMAND REFERENCE
Conventions
Page layout used for each command
XY
Header
Each command description starts with a header for quickly finding the command.
This header includes the two-character command indicator (i.c. ‘XY’) used for the command
syntax, and includes the full command name (i.c. ‘HEADER’). Note: for the sake of this example,
the command indicator differs from the command name, where usually one is an abbreviation of
the other.
Purpose:
Explains what the command does or what it is used for.
Command
Syntax:
Shows the syntax for the command. Parameters are separated by commas.
Commands are terminated by (carriage return).
Response
Syntax:
Shows the format of the response from the ScopeMeter. Responses are
terminated by (carriage return). Each Response Syntax starts with the
response, followed by the query response if the syntax relates to a
query.
Note:
Further notes relating to the command, or giving reference to associated
commands.
Example:
This is an example QBASIC program which shows how you can use the
command. The example may also include some other commands to show
the relation with those commands.
The following two comment lines (which start with an ‘ ) successively
indicate the beginning and the end of an example program.
‘***************** Beginning of example program *****************
‘
‘
‘******************** End of example program ********************
Use an MS-DOS Editor and copy the complete example program between the two lines to a file name with
the .BAS extension. Start QBASIC and open this file from the FILE menu. Longer programs may include page
breaks. Pay attention to remove those prior to running the program, or make them proceed by the ‘ (=remark)
character to prevent the QBASIC interpreter from interpreting them as an incorrect statement.
Note: some editors may not recognize the quote (‘) symbol as the start of a REMARK-line. In such case,
replace the quote-symbols by a REM-text.
When you have connected the ScopeMeter, you can start the program from the RUN menu.
You may want to refer to the Table of Contents on page 3 for an overview of all available commands, for an
easier reference.
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 11
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 (carriage return)
that can not be expressed in a printable character, or it is a parameter that is
further specified.
Do not actually include these brackets in the command!
[...]
The item between these brackets is optional.
This means that you may omit it from the command, or the ScopeMeter may omit
this from a response.
Do not actually include these brackets in the command!
|
This is a separator between selectable items. This means, that you must choose to
use only one of the listed items (exclusive or).
{.....}
Specifies an element that may be repeated zero or more times.
(…...)
Grouping of multiple elements.
=
0 to 255
=
0 to 9
=
+ or ̶ [this is: positive or negative]
=
{}
=
=
=
=
Two bytes representing a signed integer value. The first byte is the most
significant and contains the sign bit (bit 7).
=
four ‘s
=
Two bytes representing an unsigned integer value. The first byte is the most
significant.
=
four ‘s
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 12
AS
AUTO SETUP
Purpose:
Command Syntax:
Response Syntax:
Notes:
Switches on the AUTO-ranging mode of the ScopeMeter, which will allow it to
automatically adept the actual instrument settings to the input signals applied.
AS
• You may select elements of the setup not to modified by the AUTO SET
procedure, by going through the USER OPTIONS menu of the ScopeMeter.
• The instrument will send the as soon as the Autoranging mode has been
activated. This doesn’t indicate that a stable or the most suitable display of the
applied input signal would have been arrived at. Depending on a series of
variables, achieving a stable display may take up to 10 seconds. Reaching such
stability is not signaled to the PC, though. Once AURTORANGING is active,
settings may also change in case the signal changes.
Example:
Example: The following example program sends an AUTO SETUP command to the
ScopeMeter. Connect a repetitive signal on INPUT A to see the effect of AUTO
SETUP.
‘***************** Beginning of example program *****************
CLS
‘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
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"
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
END IF
RETURN
‘******************** End of example program ********************
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 13
AT
ARM TRIGGER
Purpose:
Command Syntax:
Response Syntax:
Notes:
Resets and arms the trigger system for a new acquisition. This command can also be
used for single shot acquisitions. When the AT command is given while an
acquisition is in progress, this acquisition is aborted and the trigger system is
rearmed. The command can also be used to go from other mdoes (e.g. from Replay
mode) to ‘live’ acquisition mode.
AT
• Also see the example program for the IS command, which uses the AT command
for a single shot application.
• The is sent only once the ScopeMeter has completed rearming the
acquisition system
Example:
The following example program (see next page) arms the trigger system of the
ScopeMeter using the AT command. This means that after this command the
ScopeMeter starts an acquisition as soon as a trigger is generated by the actual
signal (thus: when signal exceeds the trigger level) or from a TA (Trigger Acquisition)
command.
After the AT (Arm Trigger) command it is assumed that the signal amplitude is
sufficient to actually trigger the acquisition. If not, you can use the TA (TRIGGER
ACQUISITION) command to force the acquisition to start. This is not useful, however,
if you want the acquisition to be actually started by a signal transition, for
synchronization purposes.
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 14
‘***************** Beginning of example program *****************
OPEN "COM1:1200,N,8,1,CS,DS,RB2048" FOR RANDOM AS #1
PRINT #1, "AT"
‘Sends the ARM TRIGGER command.
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"
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
END IF
RETURN
‘******************** End of example program ********************
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 15
CM
CLEAR MEMORY
Purpose:
Command Syntax:
Response Syntax:
Note:
Example:
Clears all saved setups, waveforms, and screens from internal memory.
CM
Reciving the confirms that the action has been completed. Depending on
memory size of the instrument at hand, this may take several seconds.
See below
‘***************** Beginning of 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
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”
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
END IF
RETURN
‘******************** End of example program ********************
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 16
DS
DEFAULT SETUP
Purpose:
Command Syntax:
Response Syntax:
Notes:
Resets the ScopeMeter to the factory-default settings, just like these were at the
moment of original delivery, except for the RS232 communication settings such as
baud rate (so as to keep the communications alive).
DS
• Wait for at least 2 seconds after the reply has been received, so as to let
the ScopeMeter settle itself, before you send the next command.
• A Master Reset (refer to the Users Manual) performs the same, but also resets
the RS232 communication settings to the default values.
• Refer to AS (= Auto Setup) for a command that gives an automatic adaptation of
settings to match the applied input signals.
Example:
See below
‘***************** Beginning of example program *****************
OPEN “COM1:1200,N,8,1,CS,DS,RB2048” FOR RANDOM AS #1
CLS
PRINT #1, “DS”
‘Sends DEFAULT SETUP command.
GOSUB Acknowledge
‘Input acknowledge from ScopeMeter.
SLEEP 2
‘Delay (2 sec.) necessary after “DS”.
PRINT #1, “ID”
‘Sends the IDENTIFICATION query.
GOSUB Acknowledge
‘Input acknowledge from ScopeMeter.
INPUT #1, ID$
‘Inputs identity data from ScopeMeter.
PRINT ID$
‘Displays identity data.
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”
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
END IF
RETURN
‘******************** End of example program ********************
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 17
GD
GET DOWN
Purpose:
Command Syntax:
Response Syntax:
Notes:
Switches off the instrument’s power system.
GD
• If external power (mains adapter) is supplied, you can use the SO command to
switch the instrument on again.
• If no external power is connected, the instrument can only be switched on
manually by pressing the ON/OFF key.
Example:
See below
‘***************** Beginning of example program *****************
OPEN “COM1:1200,N,8,1,CS,DS,RB2048” FOR RANDOM AS #1
CLS
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.”
SLEEP
PRINT #1, “SO”
‘Sends the SWITCH ON command.
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”
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
END IF
RETURN
‘******************** End of example program ********************
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 18
GL
GO TO LOCAL
Purpose:
Command Syntax:
Response Syntax:
Note:
Example:
GR
Switches on the ‘local operation mode’, this is: enable the keypad for local (manual)
control.
GL
Also refer to the GR (Go to Remote) command.
The following example (see next page) uses the GR (GO TO REMOTE) command to
set the ScopeMeter in the REMOTE state so that the keypad is disabled. Next, the GL
(GO TO LOCAL) command is sent to activate the keypad and provide manual (local)
operation of the ScopeMeter testtool again.
GO TO REMOTE
Purpose:
Command Syntax:
Response Syntax:
Notes:
Sets the ScopeMeter in the remote operation mode which disables local (keypad
controlled) operation.
GR
You can use the following methods to return to the local operation mode so as to
enable manual (local) operation again:
1. Sending the GL (GO TO LOCAL) command.
2. Switching off the instrument (through on/off key on the front panel or
through GD command), then switching on again (through SO command or
locally, using on/off key on front panel).
Example:
The following example (see next page) uses the GR (GO TO REMOTE) command to
set the ScopeMeter in the REMOTE state so that the keypad is disabled. Next, the GL
(GO TO LOCAL) command is sent to activate the keypad and provide manual (local)
operation of the ScopeMeter testtool again.
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 19
‘***************** Beginning of example program *****************
CLS
‘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.”
PRINT “Check this.”
PRINT
PRINT “Press any key on the PC keyboard to continue.”
SLEEP
PRINT
PRINT #1, “GL”
‘Sends GO TO LOCAL command.
GOSUB Acknowledge
‘Input acknowledge from ScopeMeter.
PRINT “The ScopeMeter keys are now enabled again by the “
PRINT “GL (GO TO LOCAL) command.”
PRINT “Check this.”
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”
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
END IF
RETURN
‘******************** End of example program ********************
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 20
HO
HOLD
Purpose:
Command Syntax:
Response Syntax:
Example:
Sets the ScopeMeter in the Hold mode. In more detail: the ScopeMeter stops
sampling the input channels and stops calculating new measurement results.
Bringing the instrument to Hold-mode makes it ‘freeze’ the display.
HO
The following example program uses the HO command to stop the signal acquisition
and freeze the information on screen; next it uses the AT (ARM TRIGGER) command
to enable a new acquisition of applied input signal(s) again.
‘***************** Beginning of example program *****************
OPEN “COM1:1200,N,8,1,CS,DS,RB2048” FOR RANDOM AS #1
CLS
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”
PRINT “enable acquisition again.”
SLEEP
PRINT #1, “AT”
‘Sends the ARM TRIGGER command to
‘enable acquisition again.
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”
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
END IF
RETURN
‘******************** End of example program ********************
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 21
ID
IDENTIFICATION
Purpose:
Command Syntax:
Response Syntax:
Makes the ScopeMeter send its model identification data to the PC.
ID
[]
where,
is an ASCII string containing the following data elements:
;;;
Example:
The following example program queries the identity data of the ScopeMeter and
displays this data on the PC screen.
‘***************** Beginning of example program *****************
CLS
‘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
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”
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
END IF
RETURN
‘******************** End of example program ********************
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 22
IS
INSTRUMENT STATUS
Purpose:
Command Syntax:
Note:
Response Syntax:
Queries the contents of the ScopeMeter’s status register. The returned value
reflects the present operational status of the testtool itself (see note).
Status is indicated by a 16-bit word, presented as an integer value, where each bit
signals the logical status of an individual parameter (so: represented as 1 or 0). See
table below for details.
IS
Not to be confused with the ST-command (Status Query), which provides status
information about the CPL-interface (e.g. ‘Illegal Command’ or ‘Checksum Error’).
[]
where,
= integer value 0 to 65535 (see below)
Bit
Value
0
1
1
2
2
4
3
8
4
16
5
32
6
64
7
128
8
256
9
512
10
1024
11
2048
12
4096
13
8192
14
16384
15
32768
Status Description
Maintenance mode
Charging
Recording
AutoRanging
Remote
Battery Connected
Power Adapter (external power) applied
Calibration necessary
Instrument in HOLD mode
Pre Calibration busy
Pre Calibration valid
Replay buffer full
Triggered
Instrument On
Instrument Reset occurred
Next field available. Not used to date (hence always 0)
Example program – See next page.
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 23
‘***************** Beginning of example program *****************
CLS
‘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 : “; StV
IF (StV AND 1) = 1 THEN PRINT “ ScopeMeter in Maintenance mode.”
IF (StV AND 2) = 2 THEN PRINT “ ScopeMeter charging.”
IF (StV AND 4) = 4 THEN PRINT “ ScopeMeter recording.”
IF (StV AND 8) = 8 THEN PRINT “ AutoRanging active”
IF (StV AND 16) = 16 THEN PRINT “ ScopeMeter remote.”
IF (StV AND 32) = 32 THEN PRINT “ Battery connected.”
IF (StV AND 64) = 64 THEN PRINT “ Power Adapter connected.”
IF (StV AND 128) = 128 THEN PRINT “ Calibration necessary.”
IF (StV AND 256) = 256 THEN PRINT “ ScopeMeter in HOLD.”
IF (StV AND 512) = 512 THEN PRINT “ Pre-calibration busy.”
IF (StV AND 1024) = 1024 THEN PRINT “ Pre-calibration valid.”
IF (StV AND 2048) = 2048 THEN PRINT “ Replay-buffer full.”
IF (StV AND 4096) = 4096 THEN PRINT “ ScopeMeter triggered.”
IF (StV AND 8192) = 8192 THEN PRINT “ ScopeMeter On.”
ELSE
PRINT “ ScopeMeter Off.”
END IF
IF (StV AND 16384) = 16384 THEN PRINT “ Reset Instrument occurred.”
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”
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
END IF
RETURN
‘******************** End of example program ********************
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 24
PC
PROGRAM COMMUNICATIONS
Purpose:
Command Syntax:
(not used in 190-series-II)
Programs the baud rate for RS232 communications (not used with 190-series-II).
PC
where,
=
1200 | 2400 | 4800 | 9600 | 19200
38400 (Fluke 19xC)
57600 (Fluke 19xC, PM9080/101 or OC4USB required)
The default baudrate is 1200 . This is set at power-on or after an RI (Reset
Instrument) command.
Notes:
• The Fluke 19x/19xC instruments support 1 stopbit, 8 databits and software
handshake (a.k.a. “X-on X-off protocol”). Hardware handshaking is not supported.
• The 190-series-II has a USB interface. No baudrate setting is required, nor
supported. If the PC command is used nevertheless (with proper parameters),
this will be accepted and ignored and a positive given.
Response Syntax:
Example:
See an example for this command under the QP (QUERY PRINT) command
description.
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 25
PS
PROGRAM SETUP
Purpose:
Restores a complete setup, as previously saved internally using the SS (Save Setup)
command and queried by the PC using the QS (Query Setup) command, then saved
in a string variable or as a file.
-> -> ->
Command Syntax 1:
PS []
where,
= 0
Response Syntax 1:
Notes:
: Actual setup
• If no number is given, the sent set-up becomes active immediately, overwriting
the present instrument settings.
• The 190-series and 190-series-II don’t support set-up numbers other than zero
(0), so the set-up automatically becomes the actual and active one. Use the SS
(save Set-up) command to copy this restored and re-activated set-uop into one of
the memory locations for later usage.
• Wait for at least two seconds after the reply has been received, to allow
the ScopeMeter to settle, before sending a next command.
Command Syntax 2:
= the data returned in reply to the QS command in an earlier stage
(omit the from the original response, store the received data string
only).
Response Syntax 2:
Notes:
• Wait for at least two seconds after the reply has been received, to allow
the ScopeMeter to settle, before sending a next command.
• The ScopeMeter sends the reply after it has executed the setup from the
PS command. You must send the string as a whole, exactly as returned
from the QS (Query Setup) command.
• In case the set-up string is recognized not to originate from an instrument of the
same model-number and the same firmware revision, the instrument may decide
not to act upon receiving the set-up string. If so, no acknowledgement will be
sent.
• Modification of the set-up string in any way may make the ScopeMeter crash,
after which a full Reset may be necessary to recover the instrument.
(Refer to the ScopeMeter Users Manual.)
Example:
The example program on the next two pages demonstrates the use of the QS
(QUERY SETUP) and the PS (PROGRAM SETUP) commands.
The active (or present) setup is queried from the ScopeMeter, copied to the PC and
saved to file. The program then invites you to change the ScopeMeter settings, after
which the original setup is read from file and sent back to the ScopeMeter.
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 26
‘***************** Beginning of example program *****************
OPEN “COM1:1200,N,8,1,CS,DS,RB2048” FOR RANDOM AS #1
CLS
‘Clears the PC screen
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 is stored in the file SETUP0”
PRINT “This setup will now be retrieved from the file and”
PRINT “sent back to the ScopeMeter.”
PRINT “To see if this works, change the present settings and”
PRINT “verify if the ScopeMeter returns to the previous”
PRINT “settings when receiving the set-up string.”
PRINT
PRINT “Press any key on the PC keyboard to continue.”
SLEEP
CLS
PRINT #1, “PS”
‘Program header for programming
‘the setup data to the ScopeMeter.
GOSUB Acknowledge
‘Input acknowledge from ScopeMeter.
OPEN “SETUP0” FOR INPUT AS #2
‘Opens file SETUP0 for data retrieval.
DO WHILE NOT EOF(2)
SUCHR$ = INPUT$(1, #2)
‘Reads setup data from file
PRINT #1, SUCHR$;
‘Programs ScopeMeter with the
‘setup data stored in SETUP0$.
LOOP
PRINT #1, CHR$(13);
‘Program message terminator
CLOSE #2
‘Close file SETUP0.
GOSUB Acknowledge
‘Input acknowledge from ScopeMeter.
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”
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
END IF
RETURN
‘******* Clears pending data from the RS232 port *********
ClearPort:
WHILE LOC(1) > 0
Dummy$ = INPUT$(1, #1)
WEND
RETURN
‘
‘
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 27
‘****************** 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 of example program ********************
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 28
QM
QUERY MEASUREMENT
Purpose:
Command Syntax 1:
Response Syntax 1:
Queries the ScopeMeter testtool for the availability, validity and characteristics of the
various automatic measurements (see Syntax 1) or for the actual results of automatic
measurements (see Syntax 2). Readings or measurements must be active on screen in
order to be available for transfer to a remote PC.
QM
[{,}]
where,
= ,,,,,,
= (see the following ables)
Measurement numbers are used consistently amongst the 190-, 190B and 190C-series,
but different measurement numbers are used with the 190-series-II testtools.
Carefully select from either of the two following tables!
Notes:
See next page for a not on the usage of Syntax 1 versus Syntax 2 commands.
Scope mode
Meter mode
TrendPlot mode
No.
Response
11
*
*
Measurement reading 1
11
*
Meter absolute reading
19
*
Meter relative reading
*
*
*
*
*
*
*
*
*
21
31
41
53
54
55
61
71
(relative to instrument setup reference value)
Measurement reading 2
Cursor 1 absolute amplitude value
Cursor 2 absolute amplitude value
Cursor absolute amplitude value (Maximum)
Cursor absolute amplitude value (Average)
Cursor absolute amplitude value (Minimum)
Cursor relative amplitude value (Delta V)
Cursor relative time value (delta T)
Scope mode
Meter mode
TrendPlot mode
No.
Response
11
*
*
Measurement reading 1
11
*
Meter absolute reading
19
*
Meter relative reading
*
*
*
*
*
*
*
*
*
*
*
*
*
*
21
31
41
61
62
71
72
73
74
75
76
Table applies to 190, 190B
and 190C specifically.
Table applies to 190-series-II
specifically.
(relative to instrument setup reference value)
Measurement reading 2
Measurement reading 3
Measurement reading 4
Cursor 1 absolute amplitude value
Cursor relative amplitude value (Delta V)
Cursor 2 absolute amplitude value
Cursor relative time value (delta T)
Cursor absolute amplitude value (Maximum)
Cursor absolute amplitude value (Average)
Cursor absolute amplitude value (Minimum)
Cursors frequency
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 29
Note:
The Syntax 1 command enables the programmer to once ask for the availability,
validity and type of measurements that are available given the actual set-up of the
instrument. Once this information is known, the use of the command as per Syntax 2
allows for the specific results of individual measurement(s) more rapidly. Those results
are then sent as numbers, without any context or unit-of-measure.
validity of the reading:
1 reading valid
0 reading non-valid
source of the reading, as per the following table:
No.
1
2
3
4
5
12
21
190-series, 190B-series,
190-series-II
190C-series
Voltage channel
Input A (Scope mode)
or Input A (Scope mode)
Ampere channel
Input B (Scope mode)
or Input B (Scope mode)
External Input
Input C (Scope mode)
--Input D (Scope mode)
--External Input
Input A_over_B (for power and/or phase readings)
or M (Mathematics A+B, A-B or AxB)
Input B_over_A (for power and/or phase readings)
unit of the reading:
0
1
2
3
4
5
6
7
8
9
10
None (off)
Volt
Ampere
Ohm
Watt
Farad
Kelvin
seconds
hours
days
Hertz
11
12
13
14
15
16
17
18
19
20
21
Degrees
Celsius
Fahrenheit
percentage (%)
dBm 50 Ohm
dBm 600 Ohm
dBVolt
dBAmpere
dBWatt
Volt * Ampere Reactive (VAR)
Volt * Ampere (VA)
reading characteristic of the measurement:
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
None
Mean
Rms
True rms
Peak peak
Peak maximum
Peak minimum
Crest factor
Period
Duty cycle negative
Duty cycle positive
Frequency
Pulse width negative
Pulse width positive
Phase
Diode
Continuity
(not assigned)
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Reactive Power
Apparent Power
Real Power
Harmonic Reactive Power
Harmonic Apparent Power
Harmonic Real Power
Harmonic rms
Displacement Power Factor
Total Power Factor
Total Harmonic Distortion
Total Harmonic Distortion with
respect to Fundamental
K Factor (European definition)
K Factor (US definition)
Line Frequency
Vac PWM or Vac+dc PWM
Rise time
Fall time
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 30
presentation value of the reading:
0 Absolute value
1 Relative value
2 Logarithmic value
3 Linear value
4 Fahrenheit
5 Celsius
resolution of the reading as to determine the least significant digit
Command Syntax 2:
QM {,}
where
is as per the table above
(carefully select the table for 190, 190B and 190C series, or the table for 190-series-II).
Response Syntax 2:
[{,}]
where,
= []E
Notes:
• Only measurement results displayed on screen are available for output.
• Not all types of readings are available for all models and firmware versions of the
ScopeMeter testtools
• Maximum number of 10 readings per command.
• If one of the readings is non-valid, no readings will be returned.
• Only active (valid) readings will be returned.
Example:
See next pages.
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 31
‘***************** Beginning of example program *****************
CLS
‘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 11.
INPUT #1, reading.no
‘1st
IF reading.no = 11 THEN
PRINT “Measurement reading 1”;
ELSEIF reading.no = 21 THEN
PRINT “Measurement reading 2”;
ELSE
PRINT “Unknown measurement reading”;
END IF
INPUT #1, validity
‘2nd
IF validity = 1 THEN
PRINT “ is valid”
ELSE
PRINT “ is ‘not’ valid”
END IF
INPUT #1, source
‘3rd
PRINT “Source of reading
= “;
IF source = 1 THEN
PRINT “Voltage channel Input A”
ELSEIF source = 2 THEN
PRINT “Ampere channel Input B”
ELSEIF source = 3 THEN
PRINT “Input External”
ELSE PRINT “Unknown source?”
END IF
INPUT #1, unit
‘4th
PRINT “Unit of reading
= “;
IF unit = 1 THEN
PRINT “Volt”
ELSEIF unit = 2 THEN
PRINT “Ampere”
ELSEIF unit = 3 THEN
PRINT “Ohm”
ELSE
PRINT “Unexpected unit?”
END IF
INPUT #1, types
‘5th
PRINT “Type of reading
= “;
IF types = 1 THEN
PRINT “Mean value”
ELSEIF types = 2 THEN
PRINT “Rms value”
ELSEIF types = 3 THEN
PRINT “True rms value”
ELSE
PRINT “Unexpected characteristic?”
END IF
INPUT #1, presentation
‘6th
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
PRINT “Resolution of reading =”; resolution
‘
‘
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 32
GOSUB ClearReadings
PRINT #1, “QM 11”
‘Clears rest of readings data from port
‘Queries Measurement reading 1 or
‘Meter absolute reading (Meter mode).
‘Input acknowledge from ScopeMeter.
GOSUB Acknowledge
INPUT #1, result
PRINT “Measurement value =”; result; “V”
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”
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
END IF
RETURN
‘******* Clears pending data from the RS232 port *********
ClearReadings:
WHILE LOC(1) > 0
LINE INPUT #1, dummy$
WEND
RETURN
‘******************** End of example program ********************
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 33
QP
QUERY PRINT
Purpose:
Command Syntax:
Queries a screen dump of the ScopeMeter in a selected printer format.
This allows you to make a copy of the ScopeMeter screen on paper or as an image
file held on the PC.
Image aspect ratios:
1 : 1 = width x height = 240 x 240
(as was the screen of e.g. the 190)
4 : 3 = width x height = 320 x 240
(as is, e.g., the screen of the 190-II)
QP[ ,[,]]
where,
= 0 This number represents the screen image number to be
printed. Number zero is default, and for some instruments the only possible value,
resulting in a copy of the actual screen. If this value is omitted, number zero is
assumed as well.
=
where
#
0
1
2
3
11
Notes:
190-series
190C-series
190-series-II
Epson FX, LQ
compatible; 1:1
Laser Jet; 4:3
Epson FX, LQ
compatible; 4:3
Epson FX, LQ
compatible; 4:3
----
-----
DeskJet; 4:3
PostScript; 4:3
--
PNG format
(
mandatory); 4:3
12
-FBRLE2D = Fluke 199C-series color pallet based
compressed image format (4:3)
= b binary format
B Binary format
• Sending QP without arguments returns the screen image in Epson format
(i.e., this command is equivalent to QP 0,0).
• The instrument can only printout the active screen ( equal 0)
for the “real” printer formats.
The Binary format is capable to print all (saved screens included) available
screens.
The options are mandatory for the transfer and is not
possible for all other formats.
• Two different example programs are given, the first for a ‘real printer’ type of file
(QP 0), the second for a block transfer of a PNG-file (QP 0,11).
Response Syntax:
for QP or QP 0,0 or QP 0,1 or QP 0,2 or QP 0,3
(Note: for response to ‘QP 0,11’ (this is: requesting a PNG-file) see below, after the
example program).
[]
where,
= This data can be sent directly to the printer to get a hard copy
of the screen on paper.
Example:
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
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 34
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).
‘***************** Beginning of example program *****************
CLS
OPEN “COM1:1200,N,8,1,CS,DS,RB7500” FOR RANDOM AS #1
‘Programs COM1 port parameters to
‘match the ScopeMeter power-on default
‘values.
PRINT #1, “PC 19200”
‘Programs ScopeMeter to the maximum
‘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 the new ScopeMeter settings.
PRINT #1, “QP 0,0”
‘Sends QUERY PRINT data command.
‘(actual screen for EPSON print)
GOSUB Acknowledge
‘Input acknowledge from ScopeMeter.
PRINT
PRINT “Busy reading print data !”
PRINT
GOSUB Response
PRINT #1, “PC 1200”
‘Programs ScopeMeter back to the
‘default baud rate.
GOSUB Acknowledge
‘Input acknowledge from ScopeMeter.
PRINT “Print data copied to file ‘QPFILE’.”
PRINT “You can copy the file contents to the EPSON Printer.”
PRINT “DOS-example: COPY Qpfile LPT1”
CLOSE
‘Close all files.
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”
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
END IF
RETURN
‘
‘
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 35
‘****************** 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 2 s)
‘to enter RS232 buffer
WHILE ((TIMER < (start! + 2)) AND (LOC(1) = 0))
WEND
IF LOC(1) > 0 THEN
‘If RS232 buffer contains bytes
Resp$ = “”
OPEN “Qpfile” FOR OUTPUT AS #2
‘File for print 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! + 2)) AND (LOC(1) = 0))
WEND
LOOP WHILE LOC(1) > 0
‘Repeat as long as bytes enter
CLOSE #2
END IF
RETURN
‘******************** End of example program ********************
Response Syntax:
for QP 0,11,b or QP 0,11,B
(Note: for response to other than ‘QP 0,11’ see above, before the example program).
,
where,
= {}
This field indicates the total number of bytes in the .
= {}
= #0
=
When the most significant bit (bit 7) is set, this block (segment) is the last one in the
sequence.
=
Specifies the number of ‘s that follow in the field.
= {}
Part of the graphics (PNG) data.
=
One binary character which represents the sum of all the ‘s sent
after the and before the .
Note:
The is sent in blocks (segments). When the parts of all
‘s are concatenated, they form a PNG-format graphics file of length
bytes.
The instrument has to be prompted for every block (segment):
Command syntax for block transfer:
where,
=
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 36
0 Continue: Requests the next segment.
1 Retransmit: Requests retransmission of the just transferred segment.
2 Terminate: Aborts block transfer for this QP command.
The PNG format is specified in: “PNG (Portable Network Graphics) Specification,
Version 1.2”, by G. Randers-Pehrson et al. (PNG Development Group), July 1999;
This document is available from www.libpng.org/pub/png/.
The PNG file consists of the following chunks:
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. To retrieve the grey-scale values, add 96 to the index numbers.
tEXt: Text chunk specifying the acquisition date and time of the screen.
The Keyword is “Creation Time”, the Text field format is
“dd-mm-yyyy,hh:mm:ss”.
IDAT: The image data chunk.
IEND: The image end chunk.
Example:
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 the default value of 1200 baud.
‘***************** Beginning of 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 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
BlockNumber% = 1
‘
‘
‘File for PNG data.
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 37
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
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.”
END
‘****************** ReadBlock subroutine *********************
‘This subroutine reads one block of data from the RS232 port.
‘The actual data bytes received (i.e., excluding the block
‘header, checksum and acknowledge bytes) are stored in the
‘string BlockData$.
‘LastBlock% indicates whether the received block is the last
‘one (1) or not (0).
ReadBlock:
PRINT #1, “0”
‘Request the next data block.
GOSUB Acknowledge
‘Input acknowledge from ScopeMeter.
BlockHeader$ = INPUT$(5, #1)
‘Read the block header.
IF LEFT$(BlockHeader$, 2) <> “#0” THEN
PRINT “Block transfer protocol error.”
CLOSE
‘Close all files.
PRINT “Program aborted.”
END
END IF
IF (ASC(MID$(BlockHeader$, 3, 1)) AND 128) = 128 THEN
LastBlock% = 1
‘This is the last block.
ELSE
LastBlock% = 0
END IF
BlockLenHigh% = ASC(MID$(BlockHeader$, 4, 1))
BlockLenLow% = ASC(MID$(BlockHeader$, 5, 1))
BlockLength& = (256 * BlockLenHigh%) + BlockLenLow%
BlockData$ = INPUT$(BlockLength&, #1
‘Read the block data.
CheckSum$ = INPUT$(2, #1)
‘Read the checksum
ReceivedCheckSum% = ASC(LEFT$(CheckSum$, 1))
CalculatedCheckSum% = 0
FOR I& = 1 TO BlockLength&
Byte% = ASC(MID$(BlockData$, I&, 1))
CalculatedCheckSum% = CalculatedCheckSum% + Byte%
CalculatedCheckSum% = CalculatedCheckSum% MOD 256
NEXT I&
IF CalculatedCheckSum% <> ReceivedCheckSum% THEN
PRINT “Checksum error”
PRINT #1, “2”
‘Terminate (abort) QP command.
‘(We could send “1” instead to request
‘the block again)
GOSUB Acknowledge
‘Input acknowledge from ScopeMeter.
CLOSE
‘Close all files.
PRINT “Program aborted.”
END
END IF
‘
‘
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 38
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. 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”
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
END IF
RETURN
‘******************** End of example program ********************
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 39
QS
QUERY SETUP
Purpose:
Command Syntax:
Queries the ScopeMeter testtool for the present acquisition setup data.
QS []
where,
= 0
Response Syntax:
: Actual setup
[#0{}]
where,
=
[]
=
Possible values:
20 hex All nodes except the last (end node)
A0 hex End node
= .
Unique number for each specific node.
= .
Specifies the number of fields that follow in
the field.
= {}.
The contents of depends on the
and the selected setup.
= .
Contains the sum of all the binary bytes in the field.
Notes:
• Also see the Program Setup (PS) command.
• If no set-up number is specified, the data about the active set-up is returned
Example:
An example that includes this QS command can be seen with the section covering
the PS (PROGRAM SETUP) command.
Remote Control and Programming Reference for the FLUKE 190 family of ScopeMeter® test tools
page 40
QW
QUERY WAVEFORM
Purpose:
Command Syntax:
Queries the trace data (administration and/or sample data) of a waveform from the
ScopeMeter.
When a waveform is queried that is still being processed (or ‘under construction’),
that processing is completed before sending the waveform, so as to avoid incomplete
traces from being returned.
QW [,V|S]
= , as per the tables below
Mode
Scope mode
Scope Mode, mathematics
trace
ScopeRecord mode
Channel A
10
10
TrendPlot mode