About the data handling instructions, Convert to bcd (tod) – Rockwell Automation 1761-HHP-B30 MicroLogix 1000 with Hand-Held Programmer (HHP) User Manual
Page 185

Chapter 11
Using Data Handling Instructions
11–2
Use these instructions to convert information, manipulate data in the
controller, and perform logic operations.
Since these are output instructions, they do not have LD, AND, and OR
equivalents.
In this chapter you will find a general overview preceding groups of
instructions. Before you learn about the instructions in each of these groups,
we suggest that you read the overview. This chapter contains the following
overviews:
•
Move and Logical Instructions Overview
•
FIFO and LIFO Instructions Overview
Use this instruction to convert 16-bit integers into BCD values.
The source must be a word address. The destination parameter can be a
word address in a data file, or it can be the math register, S13 and S14.
If the integer value you enter is negative, the sign is ignored and the
conversion occurs as if the number was positive.
Updates to Arithmetic Status Bits
With this Bit:
The Controller:
S0/0
Carry (C)
always resets.
S0/1
Overflow (V)
sets if the BCD result is larger than 9999. On overflow, the
minor error flag is also set.
S0/2
Zero (Z)
sets if destination value is zero.
S0/3
Sign (S)
sets if the source word is negative; otherwise resets.
Entering the Instruction
You enter the instruction from within the program monitor functional area.
As you enter the instruction, you can return to previously entered operands
by pressing this key:
Then if you want to edit that operand, press
DEL
or
FUN-DEL
and enter new
parameters. Press
ENT
to accept the operand and move on to the next one.
Once the entire instruction is entered, if you want to edit the instruction’s
parameters you must go into the overwrite mode. (See page 17–4.)
About the Data Handling
Instructions
TOD
TO BCD
Source
N7:11
0
Dest
S:13
00000000
Execution Times (
µ
sec) when:
True
False
49.64
6.78
Ladder representation:
Convert to BCD (TOD)