MDO3000 Programmer Manual.pdf - 第485页

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 i…

100%1 / 1158
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
Species the color index (0 through 15) to change color as specied
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
Undened
Bit 1
Undened
Bit 0
Undened
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
Commands Listed in Alphabetical Order
Another way to e
nter characters is \xnn where the nn is the hexadecimal value of
the character to display.
An advantage o
f these methods is that any controller program can be used.
Another advantage is it’s easy to access characters with the high bit set, that is,
those characters with a decimal value greater than 127.
An alternate way to enter certain characters is with a backslash followed bya
single character (following “standard” Unix) as described in the table below.
n
Newline (c
arriage return and line feed)
\ Backslash
(\\ is required to get a backslash character)
t
Horizont
al tab; the next 2 characters specify the pixel column to tab to
as explained earlier
If a backslash is followed by an undefined special character, the backslash is
ignored and the character following it is accepted as is.
NOTE. The use of any escape codes other than those described above may
produc
e unpredictable results.
Examples
MESSage:SHOW “Hello World”
displays “Hello world” in the upper left corner of the box (you can define the box
size
with the MESSAGE BOX command).
MESSage:SHOW @Hello World@ .. hello”
dis
plays “Hello world .. hello” in the upper left corner of the box and the word
“world” is displayed in inverse video. In this example, stands for the escape
character. The escape character may appear differently for you depending on
your controller program.
MESSage:STATE
Controls the display of the message box.
Group
Display
Syntax
MESSage:STATE {OFF|ON| <NR1>}
MESSage:STATE?
Related Commands
MESSage:BOX
MESSage:SHOW, MESSage:CLEAR
2-456 MDO4000/B/C, MSO/DPO4000B and MDO3000 Series Oscilloscopes Programmer Manual