Example 2: Retrieve numerical data from the received ASCII message.
When numerical data is included in the received ASCII message, you may want to retrieve
the numerical data and copy into a data register. The Copy instruction can be used for this
purpose.
In this example, received ASCII message is stored in TXT1 to TXT6. This ASCII message
includes numerical data β1.23β as ASCII characters from TXT3 to TXT6. The Copy instruction
converts those ASCII characters into the equivalent numerical data and copies into data register
DF1.
A B C CR
SD50 3
TXT1 A
TXT2 B
TXT3 C
Barcode
Reader
System Data Register SD50
stores the number of received
characters for Port 2.
Copied
DF1 1.23
TXT1 A
TXT2 B
TXT3 1
TXT4 .
TXT5 2
TXT6 3
Converted & Copied
Use Pack Mode
CLICK PLC Hardware User Manual, 6th Edition, Rev. F β C0-USER-M
4β42
Chapter 4: PLC Communications