MDO3000 Programmer Manual.pdf - 第484页
Commands Listed in A lphabetical Order Syntax MESSage:SHOW < QString> MESSage:SHOW? Related Commands MESSage:BOX MESSage:CLEAR MESSage:ST A TE Arguments <QString> is the message and can include any of the cha…

Commands Listed in Alphabetical Order
Syntax
MESSage:BOX <X
1>,<Y1>[,<X2>,<Y2>]
MESSage:BOX?
Related Commands
MESSage:STATE
,
MESSage:SHOW,
MESSage:CLEAR
Arguments
<X1> and <X2> = 0 to 1023, and are pixel positions along the horizontal axis.
<X1> defines the left and <X2> defines the right side of the window.
<Y1> and <Y2> = 0 to 767, and are pixel positions along the vertical axis. <Y1>
defines the top and <Y2> defines the bottom of the window. The reserved height
of all characters is 16 pixels so the window must be at least that high to fully
display cha
racters.
<X2> an d <Y2> are optional because the MESSAGE:SHOW
command automatically sizes the box to fit the message. All four values are
returned in a query.
MESSage:
CLEAR (No Query Form)
Clears the contents of the message box.
Group
Display
Syntax
MESSage:CLEAR
Related Commands
MESSage:B
OX, MESSage:SHOW, MESSage:STATE
Examples
MESSage:CLEAR
removes the message from the message window.
MESSage:SHOW
This command specifies the contents of the message box. MESSage:SHOW
<Qstring> defines the content of the message box. Change in string length causes
automatic resize of the message box to fit the text. The box may be resized using
the MESSage:BOX command. The MESSage:STATE commandisusedtoturn
on and off the message box display.
Group
Display
MDO4000/B/C, MSO/DPO4000B and MDO3000 Series Oscilloscopes Programmer Manual 2-453

Commands Listed in Alphabetical Order
Syntax
MESSage:SHOW <
QString>
MESSage:SHOW?
Related Commands
MESSage:BOX
MESSage:CLEAR
MESSage:STATE
Arguments
<QString> is the message and can include any of the characters shown in
the Character Set. (See page A-1, Character Set.)The maximum length of the
message is 1000 characters; the instrument ignores longer strings.
The message box size is set to fit the message. You can also set the message area
height and width using the MESSage:BOX command. The length of the message
that fits in the message area depends on the contents of the message because
the width of characters varies.
If the message exceeds the limits of the message box, either horizontally or
vertically, the portion of the message that exceeds the limits will not be displayed.
The message string itself is not altered. The entire message can be returnedasa
query response regardless of what is displayed in the message box.
The message is left-justified, and is displayed on a single line starting with the
topmostlineinthewindow.Anewlinecharactercanbeembeddedinthestring
to position the message on multiple lines. You can also use white space and tab
characters to position the message within a line. Text which does not fit within
the message box is truncated. Defining a message box text string erases any
previously displayed text within the message box.
You can send a tab by transmitting a tab character (\t or \x09) followed characters
representing the most significant eight bits followed by significant eight bits of a
16-bit number. The number specifies the position relative to the left marginof
the message area. For example, to tab send TAB (\t or \x09), NUL (decimal 0),
and CR (decimal 13).
For example, using hexadecimal escape sequences, MESSAGE:SHOW
’\x09\x01\x17Hello’ when sent as a command would cause the ’Hello’ to be
displayed starting at pixel position 279 relative to the left margin set by the
MESSAGE:BOX command. If you want to display characters starting at position
279, then 279 = 0x0117; split the hexadecimal number into two characters 0x01
and 0x17 and send \x09\x01\x17.
Special characters which control decoration are two character sequences where the
first character is an escape (0x1b) and the second character is as described below.
2-454 MDO4000/B/C, MSO/DPO4000B and MDO3000 Series Oscilloscopes Programmer Manual

Commands Listed in Alphabetical Order
Bit 7 0
Bit 6
If set, invers
e video is toggled from current state and the following text
is displayed in the new inverse state until the state is toggled again.
Remaining bits are ignored
Bit 5
If set, the color index in the four LSB’s (bits 0 through 3) is applied to
the foregrou
nd or background color depending on the fg/bg bit (bit 4 ).
Bit 4
If set, colo
r change is applied to the background, otherwise applies to
the foreground.
Bit0–3
Specifies the color index (0 through 15) to change color as specified
below:
Index 0
Black (transparent)
Index 1
Yellow (Ch 1)
Index 2
Cyan (Ch 2 )
Index 3
Magenta (Ch 3)
Index 4
Green (Ch 4)
Index 5
Red (math)
Index 6
White (reference)
Index 7
Orange
Index 8 Black
Inde
x9
Blac
k
Index 10 Blue
Index 11
Dark Green
Index 12 Tan
In
dex 13
Bl
ack
Index 14
Wh
ite (text color)
Index 15 Dark gray
Bit 4
If set, the foreground color is set to the default foreground color.
Bit 3
If set, the background color is set to the default background color.
Bit 2
Undefined
Bit 1
Undefined
Bit 0
Undefined
The ESC (escape) character followed by the @ character turns inverse video on or
off and can be embedded in the message string. Example: “abcESC@defESC@
ghi” specifies the string “abcdefghi” where the “def” portion is displayed in
inverse video.
Example: “abcESC#defESC)ESC@ghi” specifies the string “abcdefghi” where
the “def” portion appears in the channel 3 color (magenta) and the “ghi” portion
appears in the normal text color except it’s in inverse video.
An alternate way to enter characters is octal escape sequences. This consists of a
backslash followed by numerals in the standard C language printf fashion.
MDO4000/B/C, MSO/DPO4000B and MDO3000 Series Oscilloscopes Programmer Manual 2-455