EasyManuals Logo

Allen-Bradley MicroLogix 1100 Instruction Set Reference Manual

Allen-Bradley MicroLogix 1100
616 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #203 background imageLoading...
Page #203 background image
Publication 1763-RM001C-EN-P - October 2009
Conversion Instructions 203
ENC - Encode
1-of-16 to 4
Instruction Type: output
The ENC instruction searches the source from the lowest to the highest
bit, looking for the first bit set. The corresponding bit position is written to
the destination as an integer. The ENC instruction converts the values as
shown in the table below:
Updates to Math Status Bits
ENC
Encode 1 of 16 to 4
Source N7:0
0000000000000000<
Dest N7:1
0000h<
ENC
Execution Time for the ENC Instruction
Controller When Rung Is:
True False
MicroLogix 1100 27.84 μs 0.87 μs
Encode 1-of-16 to 4
Source Bits Destination Bits
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 15 to 04 03 02 01 00
x x x x x x x x x x x x x x x 1 0 0 0 0 0
x x x x x x x x x x x x x x 1 0 0 0 0 0 1
x x x x x x x x x x x x x 1 0 0 0 0 0 1 0
x x x x x x x x x x x x 1 0 0 0 0 0 0 1 1
xxxxxxxxxxx10000 0 0100
xxxxxxxxxx100000 0 0101
xxxxxxxxx1000000 0 0110
xxxxxxxx10000000 0 0111
x x x x x x x 1 0 0 0 0 0 0 0 0 0 1 0 0 0
x x x x x x 1 0 0 0 0 0 0 0 0 0 0 1 0 0 1
x x x x x 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0
x x x x 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1
xxx1000000000000 0 1100
xx10000000000000 0 1101
x100000000000000 0 1110
1000000000000000 0 1111
x = determines the state of the flag
TIP
If source is zero, the destination is zero and the math
status is zero, the flag is set to 1.
Math Status Bits
With this Bit: The Controller:
S:0/0 Carry always resets
S:0/1 Overflow sets if more than one bit in the source is set; otherwise resets. The math
overflow bit (S:5/0) is not set.
S:0/2 Zero Bit sets if result is zero, otherwise resets
S:0/3 Sign Bit always resets
efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive

Table of Contents

Other manuals for Allen-Bradley MicroLogix 1100

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Allen-Bradley MicroLogix 1100 and is the answer not in the manual?

Allen-Bradley MicroLogix 1100 Specifications

General IconGeneral
Processor32-bit
Programming SoftwareRSLogix 500
MountingDIN rail or panel mount
Power Supply24V DC
TypeCompact PLC
Digital Inputs12
Digital Outputs8
Analog Inputs4 (depending on model)
Analog OutputsOptional with expansion module
Programming LanguageLadder Logic
Operating Temperature0 to 55 °C (32 to 131 °F)
SeriesMicroLogix

Related product manuals