Topic: DMD0015 BCDTO - BCD To Integer/Real |
|
|
|
The BCD To Integer/Real (BCDTO) instruction is used to convert a BCD (binary coded decimal) value to an Integer or Real (floating point) value.
|
|
Parameters:Note: Use the F9 key (Element Browser) or Down-Arrow key (Auto-Complete) at any time to see a complete list of the memory locations that are valid in the current field of the instruction.
BCD Input - designates the location that contains the BCD value to convert. This can be any constant value or any readable numeric location. Note: if the BCD Input location does not contain a valid BCD number, ST132 (Argument Out of Range) will be ON, and the System Error string $ERR will contain "Digit greater than 9 in BCDTO @xxxxxxxx".
Output - designates the location to store the Integer or Real result. This can be any writable numeric location.
|
|
|
|
See Also:
|
|
|
|
Related Topics:Note: although Do-more controllers do not natively support BCD, the following two instructions are available for converting data from 3rd party devices which is formatted as BCD.
|
|
|
|
Rung Example:
|
|
|