Publication 1763-RM001C-EN-P - October 2009
208 Conversion Instructions
TOD - Convert to Binary
Coded Decimal (BCD)
Instruction Type: output
The TOD instruction is used to convert the integer source value to BCD
and place the result in the destination.
Addressing Modes and File Types can be used as shown in the following
table:
TOD Instruction Destination Operand
The destination can be either a word address or math register.
The maximum values permissible once converted to BCD are:
• 9999 if the destination is a word address (allowing only a 4-digit
BCD value)
• 32768 if the destination is the math register (allowing a 5-digit BCD
value with the lower 4 digits stored in S:13 and the high order digit
in S:14).
If the destination is the math register, it must be directly addressed as S:13.
S:13 is the only status file element that can be used.
TOD
To BCD
Source N7:0
0<
Dest N7:1
0000h<
TOD
Execution Time for the TOD Instructions
Controller When Rung Is:
True False
MicroLogix 1100 29.31 μs 0.87 μs
TOD Instruction Valid Addressing Modes and File Types
For definitions of the terms used in this table see Using the Instruction Descriptions on page 82.
Parameter
Data Files Function Files
CS0 - Comms
IOS - I/O
DLS - Data Log
Address
Mode
(1)
Address Level
O
I
S
B
T, C, R
N
F
L
MG, PD
Ri
PLS
RTC
HSC
PTO, PWM
STI
EII
BHI
MMI
LCD
Immediate
Direct
Indirect
Bit
Word
Long Word
Element
Source •• ••• • • ••
Destination •••••• •
• ••
(2)
(1) See Important note about indirect addressing.
(2) See TOD Instruction Destination Operand below.
IMPORTANT
You cannot use indirect addressing with: S, ST, MG, PD,
RTC, HSC, PTO, PWM, STI, EII, BHI, MMI, CS, IOS, and
DLS files.
efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive