Chapter 5: Standard RLL Instructions - Message
Port 2 on the DL250–1/260 has standard RS232 levels, and should work with most printer
1
serial input connections.
Text element - this is used for printing character strings. The character strings are defined as
the character (more than 0) ranged by the double quotation marks. Two hex numbers
2
preceded by the dollar sign means an 8-bit ASCII character code. Also, two characters
preceded by the dollar sign is interpreted according to the following table:
3
4
5
6
The following examples show various syntax conventions and the length of the output to the
7
printer.
Example:
8
" "
9
"A"
" "
10
" $" "
" $ R $ L "
11
" $ 0 D $ 0 A "
" $ $ "
12
In printing an ordinary line of text, you will need to include double quotation marks before
and after the text string. Error code 499 will occur in the CPU when the print instruction
13
contains invalid text or no quotations. It is important to test your PRINT instruction data
during the application development.
14
The following example prints the message to port 2. We use a PD contact, which causes the
message instruction to be active for just one scan. Note the $N at the end of the message,
which produces a carriage return / line feed on the printer. This prepares the printer to print
A
the next line, starting from the left margin.
B
C
D
5–202
DL205 User Manual, 4th Edition, Rev. B
#
Character code
1
$$
2
$"
3
$L or $1
4
$N or $n
5
$P or $p
6
$R or $r
7
$T or $t
Length 0 without character
Length 1 with character A
Length 1 with blank
Length 1 with double quotation mark
Length 2 with one CR and one LF
Length 2 with one CR and one LF
Length 1 with one $ mark
X1
PRINT
K2
"Hello, this is a PLC message.$N"
Description
Dollar sign ($)
Double quotation (")
Line feed (LF)
Carriage return line feed (CRLF)
Form feed
Carriage return (CR)
Tab
Print the message to Port 2 when
X1 makes an off-to-on transition.
Need help?
Do you have a question about the DirectLOGIC DL205 Series and is the answer not in the manual?