Terminal Commands
Section 6-7
6-7 Terminal Commands
This section describes the terminal commands used to display character strings or graphics according to instructions from the host, independently of the screens registered in the NT20.
Terminal commands designate screen attributes such as inversion, flashing, cursor position and size of characters before the characters are displayed.
Once screen attributes are set, they remain effective for screen displays until they are cancelled or other attributes are set.
In addition, continuous lines and circles can be drawn.
Clear Screen
Format
[ESC] &
1B 26
Description
Clears all text and graphics on the NT20 screen.
Reference:
Even if this command is used to clear a screen, the NT20 still displays the preceding screens.
After the display of number, text, lamps or touch switches is upgraded, only the upgraded parts are re-displayed.
Character Specify Size
Format
[ESC]
1B
)
29 m
1
* * m
1
:
Character size
0 (30
H
): Normal size, 16 x 8 dots (H x W)
1 (31
H
): 1/2 size, 8 x 8 dots (H x W)
Description
Specifies if 1-byte alphanumeric characters sent subsequently are displayed as normal characters or 1/2-size characters.
Reference:
The character string is specified with the Specify Displayed Characters Com-
mand (refer to Specify Displayed Characters). Both normal characters and 1/
2-size characters are enlarged as specified by the Specify Character Enlarge-
ment Command (refer to Specify Character Enlargement below).
The character size specified with this command remains valid until the screen display is switched or another character size is specified with the command.
The default character size is normal characters.
229
Terminal Commands
Specify Character Enlargement
Format
Section 6-7
[ESC]
1B
*
2A m
1
* * m
1
: Character enlargement
0 (30
H
): No enlargement
1 (31
H
): Enlarge height x 2
2 (32
H
): Enlarge width x 2
3 (33
H
): 2 x 2 enlargement
4 (34
H
): 3 x 3 times enlargement
5 (35
H
): 4 x 4 times enlargement
Description
All text and marks sent after this command are displayed in the specified size.
Reference:
The character string is specified with the Specify Displayed Characters Com-
mand (refer to Specify Displayed Characters).
Normal Display
Set Inverse Display
The enlargement specified with this command remains valid until the screen display is switched or another enlargement is specified with the command.
The default enlargement is no enlargement.
Format
[ESC]
1B
!
21
Description
Cancels all display attribute settings (inverse, flashing, flashing inverse) for characters and marks so that all characters are displayed as “normal” characters (not inverse or flashing).
Format
[ESC]
1B
”
22
Description
Sets the display attribute to inverse so that all characters and marks sent subsequently are highlighted. Other attributes remain unchanged.
Reference:
The Set Inverse Display Command is cancelled by the End Inverse Display
Command or the Normal Display Command.
The setting with this command remains valid until the screen display is switched or another display attribute setting is made. The default display attributes are set to a normal display when a screen is initially displayed.
Use this command with the Set Flashing Display Command (refer to Set
Flashing Display) to produce a flashing inverse display.
230
Terminal Commands
End Inverse Display
Section 6-7
Format
[ESC]
1B
#
23
Description
Clears the inverse display attribute so that all characters and marks sent subsequently are not highlighted. Other attributes remain unchanged.
Reference:
The inverse display attribute is set with the Set Inverse Display Command.
Set Flashing Display
The setting with this command remains valid until the screen display is switched or another display attribute setting is made. The default display attributes are set to a normal display when a screen is initially displayed.
Format
[ESC]
1B
$
24
Description
Sets the display attribute to flashing so that all characters and marks sent subsequently are displayed flashing. Other attributes remain unchanged.
Reference:
The Set Flashing Display Command is cancelled by the End Flashing Display
Command or the Normal Display Command (refer to Normal Display and End
Inverse Display).
The setting with this command remains valid until the screen display is switched or another display attribute setting is made. The default display attributes are set to a normal display when a screen is initially displayed.
Use this command with the Set Inverse Display Command (refer to Set
Inverse Display) to produce a flashing inverse display.
End Flashing Display
Format
[ESC] %
1B 25
Description
Clears the flashing display attribute so that all characters and marks sent subsequently are not flashing. Other attributes remain unchanged.
Reference:
The flashing display attribute is set with the Set Flashing Display Command.
The setting with this command remains valid until the screen display is switched or another display attribute setting is made. The default display attributes are set to a normal display when a screen is initially displayed.
231
Terminal Commands
Set Cursor Position
Format
Section 6-7
[ESC]
1B
+
2B x
1
* * x
2
* * x
3
* * y
1
* * y
2
* * y
3
* * x
1 x
2 x
3
: X coordinate (3-digit BCD)
000 to 255 y
1 y
2 y
3
: Y coordinate (3-digit BCD)
000 to 127
Description
Before displaying a character string with the Terminal commands, use this command to set the bottom-left point of the first character to be displayed.
Reference:
The cursor position set with this command is also the bottom-left point of the first character displayed if the displayed characters are enlarged.
Specify Displayed Characters
Format
[ESC] 4
1B 34 n
1
* * n
2
* * c
1
* * c
2
* * c
3
* * c n
* * n
1 n
2
: Character string length as a number of normal characters
(2-digit hexadecimal)
01 to 20H (1 to 32) c
1 c
2 c
3
to c n
: Character-string to display
Description
• The character string is displayed from the cursor position.
• The character-string data can contain a mixture of normal (alphanumeric)
characters and marks. Refer to Appendix H Special Characters for details.
• The character string is displayed according to the enlargement and display attributes set with commands.
Reference:
The character string continues on the next line if it cannot fit into a single line.
Set the position where the character string is displayed with the Set Cursor
Position Command (refer to Set Cursor Position).
232
Terminal Commands
Draw Polyline
Draw Circle
Section 6-7
Format
[ESC]
1B
7
37 xn
1
* * m
1
* * xn
2
* * m
2
* * xn
3
* * x0
1
* * yn
1
* * x0
2
* * yn
2
* * x0
3
* * yn
3
* * y0
1
* * y0
2
* * y0
3
* * m
1
, m
2
: Number of lines to draw (2-digit hexadecimal)
01 to 28
H
(1 to 40) x0
1 x0
2 x0
3
to xn
1 xn
2 xn
3
: X coordinates of line end points (3-digit BCD)
000 to 255 y0
1 y0
2 y0
3
to yn
1 yn
2 yn
3
: Y coordinates of line end points (3-digit BCD)
000 to 127
Description
Draws the specified number of lines between the specified points.
Format
[ESC] 8
1B 38 x
1
* * x
2
* * x
3
* * y
1
* * y
2
* * y
3
* * r
1
* * r
2
* * r
3
* * x
1 x
2 x
3
: X coordinate of circle center (3-digit BCD)
000 to 255 y
1 y
2 y
3
: Y coordinate of circle center (3-digit BCD)
000 to 127 r
1 r
2 r
3
: circle radius in dots (3-digit BCD)
001 to 063
Description
Draws a circle of the specified radius around the circle center point.
233