
6F3B0250
7. Instructions
FUN 188
BIN
Binary conversion
Expression
Input
Function
When the input is ON, this instruction converts the 4 digits of BCD data of A into binary, and stores in B. If any digit of A contains
Execution condition
Input |
| Operation | Output | ERF |
OFF | No execution |
| OFF | - |
ON | Normal execution |
| ON | - |
| BCD data error |
| OFF | Set |
Operand
| Name |
|
| Device |
|
|
|
|
|
| Register |
|
|
|
| Constant | Index | ||
|
| X | Y | R | S | T. | C. | XW | YW | RW | SW | T | C | D | I | J | K |
|
|
A | Source (BCD) |
|
|
|
|
|
| Ö | Ö | Ö | Ö | Ö | Ö | Ö | Ö | Ö | Ö | H0000 - |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| H9999 |
|
B | Destination |
|
|
|
|
|
|
| Ö | Ö | Ö | Ö | Ö | Ö | Ö | Ö | Ö |
|
|
| (Binary) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
When R017 is ON, the BCD data of RW28 is converted into binary data, and the result is stored in D0127.
For example, if RW28 is H1234, the binary data 1234 is stored in D0127.
RW28
H1234
BCD to Binary | D0127 | |
|
| 1234 |
|
|
Note
·If any digit of operand A contains
Basic Hardware and Function 255
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net