Series 2600B System SourceMeter® Instrument Reference Manual
Section 3: Functions and features
2600BS-901-01 Rev. B / May 2013
3-75
Character codes
The following special codes can be embedded in the
text
string to configure and customize the
message:
$N
Starts text on the next line (newline). If the cursor is already on line 2, text will be ignored after the
‘
$N
’ is received.
$R
Sets text to Normal.
$B
Sets text to Blink.
$D
Sets text to Dim intensity.
$F
Set text to background blink.
$$
Escape sequence to display a single “$”.
In addition to displaying alphanumeric characters, you can display other special characters. Refer to
Display character codes
(on page F-1) for a complete listing of special characters and their
corresponding codes. The following programming example illustrates how to display the Greek
symbol omega (
Ω)
:
display.clear()
c = string.char(18)
display.settext(c)
The following programming example illustrates how to use the
$N
and
$B
character codes to display
the message “Test in Process” on the top line and the blinking message “Do Not Disturb” on the
bottom line:
display.clear()
display.settext("Test in Process $N$BDo Not Disturb")
The following programming example illustrates how to use the
$$
character code to display the
message “You owe me $8” on the top line:
display.clear()
display.setcursor(1, 1)
display.settext("You owe me $$8")
If the extra
$
character is not included, the
$8
would be interpreted as an undefined character code
and will be ignored. The message “You owe me” will instead be displayed.
Be careful when embedding character codes in the text string; it is easy to forget that the character
following the
$
is part of the code. For example, assume you want to display “Hello” on the top line
and “Nate” on the bottom line, and so you send the following command:
display.settext("Hello$Nate")
The above command displays “Hello” on the top line and “ate” on the bottom line. The correct syntax
for the command is as follows:
display.settext("Hello$NNate")
Содержание System SourceMeter 2601B
Страница 841: ......