6F3B0250
254 T1/T1S User’s Manual
7. Instructions

FUN 186 ASC ASCII conversion

Expression
Input -[
A
ASC
B
]- Output
Function
When the input is ON, this instruction converts the alphanumeric characters into the ASCII codes, and
stores them in the register t able starting with
B
. (16 characters maximum)
Execution condition
Input Operation Output
OFF No execution OFF
ON Execution ON
Operand
Name Device Re
g
ister Constant Index
X Y R S T. C. XW YW RW SW T C D I J K
A
Characters Ö
B
Start of
destination ÖÖÖÖÖÖ
Example
When R030 is O N, the characters ‘ABCDEFG HIJKLMN’ is converted into t he ASCI I codes, and
the result is st ored in 8 register s st ar ting with lower 8 bits (byte) of D0200 ( D0200 t o D0207) .
High Low
F 8 7 0
D0200 H42 (B) H41 (A)
D0201 H44 (D) H43 (C)
D0202 H46 (F) H45 (E)
D0203 H48 (H) H47 (G)
D0204 H4A (J) H49 (I)
D0205 H4C (L) H4B (K)
D0206 H4E (N) H4D (M)
D0207
Note
· Only the number of bytes converted are stored. The rest are not changed. In the above example, 14
characters ar e convert ed into 14 bytes of ASCII code, and these ASCII codes ar e st ored in 7
register s (D0200 to D0206). T he dat a of D0207 remains unchanged.
Previous data is remained
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net