03.01.2013 Views

Toshiba PROSEC T1-16S PLC User's Manual - CTi Automation

Toshiba PROSEC T1-16S PLC User's Manual - CTi Automation

Toshiba PROSEC T1-16S PLC User's Manual - CTi Automation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

7. Instructions<br />

FUN 063 ATOH ASCII to Hex conversion<br />

Expression<br />

Input −[ A ATOH (n) B ]− Output<br />

162 <strong>T1</strong>-<strong>16S</strong> User’s <strong>Manual</strong><br />

6F3B0253<br />

Function<br />

When the input is ON, the ASCII characters stored in n registers starting with A is converted into<br />

hexadecimal data and stored in B and after. The lower byte of source A is stored as uppermost<br />

digit of destination B, and followed in this order. The allowable ASCII character in the source table<br />

is “0” (H30) to “9” (H39) and “A” (H41) to “F” (H46). The allowable range of n is 1 to 64.<br />

Execution condition<br />

Input Operation Output ERF<br />

OFF No execution OFF −<br />

ON Normal execution ON −<br />

Conversion data error (no execution) OFF Set<br />

Operand<br />

Name Device Register Constant Index<br />

X Y R S T. C. XWYWRWSW T C D I J K<br />

A Source √ √ √ √ √ √ √ √ √ √ √<br />

n Data size 1 - 64<br />

B Destination √ √ √ √ √ √<br />

Example<br />

When R011 is ON, the ASCII characters stored in 8 words of D0300 to D0307 are converted<br />

into hexadecimal data, and stored in 4 words registers starting with RW040.<br />

F 8 7 0 F 0<br />

D0300 “1” (H31) “0” (H30) RW040 H0123<br />

D0301 “3” (H33) “2” (H32) Converted RW041 H4567<br />

D0302 “5” (H35) “4” (H34) RW042 H89AB<br />

D0303 “7” (H37) “6” (H36) RW043 HCDEF<br />

D0304 “9” (H39) “8” (H38)<br />

D0305 “B” (H42) “A” (H41)<br />

D0306 “D” (H44) “C” (H43)<br />

D0307 “F” (H46) “E” (H45)<br />

Note<br />

• If index register (I, J or K) is used for the operand A, only n = 1 is allowed.<br />

• If n is odd number, lower 2 digits of the last converted data will not be fixed, Use even for n.<br />

<strong>CTi</strong> <strong>Automation</strong> - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!