DL205 User Manual, 4th Edition, Rev. B
5–211
Chapter 5: Standard RLL Instructions - ASCII
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
ASCII Instructions (DL260)
The DL260 CPU supports several instructions and methods that allow ASCII strings to be
read into and written from the PLC communications ports.
Specifically, port 2 on the DL260 can be used for either reading or writing raw ASCII strings,
but cannot be used for both on the same CPU.
The DL260 can also decipher ASCII embedded within a supported protocol (K–Sequence,
Direct
NET, Modbus, Ethernet) via the CPU ports, H2–ECOM or D2–DCM module.
ASCII character tables and descriptions can be found at www.asciitable.com.
Reading ASCII Input Strings
There are several methods which the DL260 can use to read ASCII input strings:
1)
ASCII IN (AIN)
– This instruction configures port 2 for raw ASCII input strings with parameters
such as fixed and variable length ASCII strings, termination characters, byte swapping options, and
instruction control bits. Use barcode scanners, weight scales, etc. to write raw ASCII input strings
into port 2 based on the (AIN) instruction’s parameters.
2) Write embedded ASCII strings directly to V–memory from an external HMI or similar master
device via a supported communications protocol using the CPU ports, H2–ECOM or D2–DCM.
The AIN instruction is not used in this case.
3) If a DL260 PLC is a master on a network, the Network Read instruction (RX) can be used to read
embedded ASCII data from a slave device via a supported communications protocol using port 2,
H2–ECOM or D2–DCM. The RX instruction places the data directly into V–memory.
Writing ASCII Output Strings
The following instructions can be used to write ASCII output strings:
1)
Print from V–memory (PRINTV)
– Use this instruction to write raw ASCII strings out of port 2
to a display panel or a serial printer, etc. The instruction features the starting V–memory address,
string length, byte swapping options, etc. When the instruction’s permissive bit is enabled, the
string is written to port 2.
2) Print to V–memory (VPRINT) – Use this instruction to create pre–coded ASCII strings in the
PLC (i.e. alarm messages). When the instruction’s permissive bit is enabled, the message is loaded
into a pre–defined V–memory address location. Then use the PRINTV instruction to write the
pre–coded ASCII string out of port 2. American, European and Asian Time/Date stamps are
supported.
Additionally, if a DL260 PLC is a master on a network, the Network Write instruction (WX)
can be used to write embedded ASCII data to an HMI or slave device directly from
V–memory via a supported communications protocol using port 2, H2–ECOM or
D2–DCM.
ý
ý
ý
þ
230
240
2
5
0
-1
2
6
0
DS
Used
HPP
N/A