4: PLC Hardware and the Micrologix 1100 PLC

The Micrologix PLC User Manual

Download the Notes

TOPIC 1: What is a PLC?

A programmable logic controller (PLC) is a digital electronic device with a programmable memory for storing instructions to implement specific functions, such as logic, sequencing, timing, counting, and arithmetic to control machines and processes.

1.  It’s digital (uses binary to operate)

2.  It can interface with analog devices

3.  It’s programmable and has memory

4.  It stores instructions that are used to implement some function

5.  It controls machines and processes

Check out the video below for a basic introduction to PLCs.

TOPIC 2: Inputs and Outputs

PLC inputs and outputs come in many flavors.

1.  Discrete or Analog – Inputs and outputs are sold as either analog or digital/discrete.  Analog inputs and outputs can vary continuously in steps in the same way that a Digital to Analog Converter works.  Digital or Discrete inputs and outputs are either on or off.

2.  Fixed, Expansion, or Modular – Some PLCs come with a set of “fixed” I/O.  They cannot be removed and are not exchangeable.  Some PLCs do not come with fixed I/O and if you want any you need to purchase “expansion” I/O.  Still other PLC modules come with “fixed” I/O and have room for “expansion” I/O.  Many times the I/O is needed to be located away from the PLC and a communication cable is placed between them.  This is called “modular” I/O.  Many PLCs have the ability to accommodate all three types.

3.  DC or AC – Inputs and outputs are sold as either direct current (DC) compatible or alternating current (AC) compatible.  Some inputs and outputs can handle either AC or DC.  Below is a list of available input and output sets available for the MicroLogix 1100 PLC we have in the lab.  The MicroLogix 1100 is capable of handling four I/O expansion modules along with the fixed I/O.

From The MicroLogix 1100 User Manual - Bulletin 1763

4.  Sourcing or Sinking – This one of the most important and overlooked aspect of I/O!  From the MicroLogix 1100 User Manual, below is an image of the fixed I/O supplied with the controller.  To wire the inputs as sourcing the DC COM would be wired to +24Vdc and the inputs would be wired to a switch of some sort.  The other side of the switch would be wired to ground.  To wire the inputs as sinking, the switch is wired to +24Vdc and to an input and the DC COM is wired to ground.  We will use sinking inputs in the lab.  Using conventional current flow, sourcing means that the electrons are flowing out of the input and sinking means the electrons are flowing into the input.  WARNING – if a switch claims to be a sourcing switch your PLC must be sinking and visa versa!

TOPIC 3: PLC Memory (Allen-Bradley MicroLogix)

Memory, at the most basic level,  is broken into groups of bits as follows

1. Byte – 8 bits

2.  Nibble – 4 bits

3. Word – 16 bits

4. Double Word – 32 bits

In the MicroLogix PLC, memory exists on another level – in files

1. Data Files (Outputs, Inputs, Timers Counters, etc.)

2. Functions Files (High Speed Counters, etc.)

3. Program Files (Your program(s))

4. Specialty Files (Data logging, etc.)

Each of these files and words inside the files have their own address so we know where to find them within memory.

For example, the entirety of the external outputs can be addressed at O:0.0.  This means O = output file, 0 = PLC slot 0 (fixed I/O), 0 = word 0.  To address a single bit in the outputs we would say O:0.0/2.  Our outputs will range from O:0.0/0 through O:0.0/5.  When referring to fixed I/O the second 0 can be ignored.  This simplifies the addresses for the outputs to O:0/0 through O:0/5.  When addressing, the (.) dot is referring to a word while the (/) slash is referring to the bit.

The following addresses will be helpful to keep around

1.  Outputs range from O:0/0 through O:0/5

2.  Inputs range from I:0/0 through I:0/9

3.  Timers range from T4:0 through T4:255 (sometimes it is not possible to reach this high)

4.  Counters range from C5:0 through C5:255(sometimes it is not possible to reach this high)

5.  Integers range from N7:0 through N7:255 (sometimes it is not possible to reach this high)

Another piece of memory that can be helpful to the programmer is the Status file.  Inside this file is a large data set that tells the complete story of the current status of the PLC.  See page 470 in the instruction set manual for the PLC for more information on the Status File.  Review page 479, the watchdog scan time as it will come in handy later.  This is the maximum allotted time the PLC has to run through your program once.  It prevents the PLC from getting stuck in infinite loops.  If the watchdog scan time is exceeded the PLC throws a fault and resets.

TOPIC 4: The MicroLogix 1100 PLC Hardware

Here is a quick rundown of the PLC we have in the lab.

MicroLogix 1100 – 1763-L16DWD

1.  Ethernet communication and programming

2.  Secondary Serial Port communication

3.  12-24Vdc power supply required

4.  10 digital DC inputs (sourcing or sinking) (fixed)

5.  2 analog DC inputs (fixed)

6.  6 DC or AC digital outputs (sourcing) (fixed)

You should now be prepared to answer the following questions.

1.  What are fixed I/O?

2.  TRUE or FALSE?  Some I/O can handle either AC or DC?

3.  You need to add 16 DC Inputs to your MicroLogix 1100 PLC.  It must be capable of sinking or sourcing.  Which module do you order?

4.  You are given an inductive proximity switch that, according to its datasheet, is a sourcing switch.  You wire it up to your PLC, what does DC COM need to be wired to?

5.  The MicroLogix 1100 PLC operates on a word of memory at a time.  How many bits does the PLC operate on at a time?

6.  You wired the switch in number 4 to input 4.  What address should you use in your program to read the state of the sensor?

7.  What, in the status file, is located at address S:3H?

8.  The watchdog scan time is set to 220.  How much time does that represent?

4 Responses to “4: PLC Hardware and the Micrologix 1100 PLC”

  1. Garreth Says:

    Hi,

    I am trying to set up a micrologix for quadrature mode to read in A and B pulses from an incremental encoder. I am using the high speed counter for this. The A pulses are connected to the I/O terminal and the B pulses are connected to the I/1 terminal, as specified from the user manual.

    The problem that i am having is that the change in direction is never being picked up by the PLC. Hence regardless of which direction i rotate the encoder, it continually counts in the negative direction.

    Any assistance in this matter would be greatly appreciated…

    Regards
    ________________________________
    Garreth Dold
    GIT (Electronics Department)

    Goodyear Tyre South Africa
    Cell: +2783 656 8863

    Algoa Road, Uitenhage, South Africa
    ________________________________

    • adamwsonu Says:

      There are few different possibilities. Please check that the MOD variable has been set, in configuration, to the correct mode number as this may cause the action you describe. Alternatively, you may switch the A and B inputs at the input terminal block. Depending on what results you encounter here it may be that the hardware you are interfacing to the PLC isn’t acting as required for the PLC. If instead of always counting down, it counts up after the change you may have a bad or incompatible encoder. If it still counts down after the change then it seems to be a software or configuration problem. Another possibility is an input filter. Inputs can be filtered in the configuration and a wrong setting in this could cause one input to be ignored by the PLC, producing this result. Good luck, and let me know if any of these work or if you have further problems.

  2. Shamil Says:

    hi, great website! I’m trying to interface a magnetic line encoder with a micrologix 1100.I also am having the same problem whereas the plc accumulates in negative and never picks the change in direction.I have set the mode for 6 and input filter for 25us. I have the A B wired to a 7407 inverter and the output goes to I0 and I1 of plc. Any suggestions will be grealty appreciated.

    • adamwsonu Says:

      Why the inverter? I am concerned that your inverter is not able to properly drive the input to the PLC to the required voltage. The inverter may be able to only output certain voltage levels that may not be high enough for the PLC. Let me know the reasons for the inverter being included and give me part numbers for everything and I’ll see what I can offer.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: