Jetter AG
Controlling printer and serial interfaces | 4
Application-oriented manual – Control of alphanumeric HMIs (LCD) and printers
48
4.4 Outputting text strings
STX commands
To output text strings, use the following STX commands (STX functions):
■
DisplayText()
■
DisplayText2()
4.4.1 DisplayText() STX command
Declaration
Function
DisplayText(Dev:Int,
Pos:Int,
Const Ref
Text:String);
Parameter
Parameter
Value
Description
Dev
8 ... 11
Number of the device where to output
the text strings
Pos
Not relevant
Is not evaluated
Text
Text string to be out-
put
Hard-coded text, or name of a string
variable
Tab. 55:
DisplayText()
parameter
How to use this
command
Command-line syntax for outputting text strings to a printer module:
DisplayText(
8
,
0
,
"Hello World!"
);
DisplayText(
8
,
0
, StringVar);
Operating principle
The first command outputs text string 'Hello World!’ the printer module. The sec-
ond STX command outputs the content of the string variable StringVar.
The application program task stops at the
DisplayText()
command waiting for
the entire text to be output.
4.4.2 DisplayText2() STX command
Declaration
Function
DisplayText2(Dev:Int,
Pos:Int,
Const Ref
Text1:String)
Const Ref
Text2:String);
Parameter
Parameter
Value
Description
Dev
8 ... 11
Number of the device where to output
the text strings
Pos
Not relevant
Is not evaluated
Text1
Text string to be out-
put
Hard-coded text, or name of a string
variable
Text2
Text string to be out-
put
Hard-coded text, or name of a string
variable
Tab. 56:
DisplayText2()
parameter