Posted on

Addressing in RSLogix 5000

Before you can program any PLC system, you have to understand how the addressing is done in that particular PLC. I have included a actual screenshot from RSLogix 5000 below that shows examples of addressing in RSLogix 5000.

INSTRUCTION – RSLogix 5000’s Relay Ladder Logic command language is comprised of “instructions”. An XIC (it looks like a normally open contact –] [– ) is an instruction. A timer is an instruction. A few of the most common instructions are described below.

BIT – an address within the PLC. It can be an input, output or internal coil, among others.

RUNG – A section of the PLC ladder program that terminates in an output function of some type. Just like in an electrical ladder diagram, a rung has some type of output that is turned on or turned off by the preceding entities in the rung. The first rung in a ladder program is always 0.

HARDWIRED INPUT – a physical connection to the PLC from an input device (switch or sensor, etc.).

RSLogix 5000 defines the address of the input, based on the input cards that you configure.

We’ll see how this works later on, but here is an example of a hardwired input:


Here is what each part of the address means:

“Local” means that the module is connected to a controller across a backplane or with a parallel link, keeping the module within a few inches of the controller.

“4” means that the module is module 4 (located in the 5th slot in the rack).

“I” means the bit is an input

“Data” indicates the type of data (this is the default for I/O)

“3” indicates that the bit is 4th input on the card (the bits start with 0).

By the way, don’t get the capital “I’s” confused with ones.

So, in evaluating our example, we would describe the bit as “Module 4, bit 3”.

Here is where some confusion comes in. Because the Rockwell numbering system starts with 0, and the processor resides in Slot 0, our example bit is actually in slot 5. Our bit 3 is actually the 4th bit. We could also describe the bit as “Slot 5, position 4”.

You will have to learn to transpose these ways of describing a bit back and forth in your head. If you are troubleshooting a problem, and you want someone to look for a signal on our example bit, you might have to tell him to look at the 4th position on the 5th slot. That will lead him to the physical point on the PLC.

However, you need to keep in mind that the corresponding bit in your program will be labeled Local:4:I.Data.3.

It can be confusing, but you will get used to it.

HARDWIRED OUTPUT – a physical connection from the PLC to an output device (relay or pilot light, etc.)

Outputs are addressed the same way.

“Local” means that the module is connected to a controller across a backplane or with a parallel link, keeping the module within a few inches of the controller.

“5” means that the module is module 5 (located in the 6th slot in the rack).

“O” means the bit is an output

“Data” indicates the type of data (this is the default for I/O)

“4” indicates that the bit is 5th output on the card (the bits start with 0).

This is a programmable bit used to simulate a relay within the PLC. The internal coil has no connection to the outside world. It does not connect to an output card. Internal coils are used to store information. The “contacts” of this “relay” can then be used multiple times in other parts of the program.

RSLogix 5000 has greatly simplified the process of describing an internal coil. We can simply give it a name, known as a tag.

For example, if you have an internal coil that is the result of, say, three hardwired safety gate limit switches, we could label the coil “SafetyGatesClosed”.
Note the lack of spaces in the tag name. RSLogix 5000 does not allow spaces, or other special characters, in the tag name.

Some people use underscores, so the tag might be “Safety_Gates_Closed”. Either way is fine; it just depends on what your company or your client prefers.

A timer is a programmable instruction that lets you turn on or turn off bits after a preset time.

The two primary types of timers are TON for “timer on delay” and TOF for “timer off delay”.

Timers in RSLogix 5000 use tag names for identification.

A counter is a programmable instruction that lets you turn on or turn off bits after a preset count has been reached.

There are different types of counters available in the RSLogix, but the CTU (counter up) instruction covers everything we will talk about here.

Counters in RSLogix 5000 use tag names for identification.

–] [–    Normally Open Contact
When used with a hardwired input, this instruction is off until there is a voltage applied to the input. The bit address then goes high, or on, and the instruction becomes “true.” It works the same way when it has the same address as an internal coil, except that the coil must be turned on by logic in the program.

Allen-Bradley calls these normally open contacts “XIC”, or “eXamine If Closed” instruction.

An XIC instruction can reference a hardwired input, a hardwired output, an internal coil or a timer done bit, among others.

–]/[–    Normally Closed Contact
This is an inverted normally open contact.

When used with a hardwired input, this instruction is “true” until there is a voltage applied to the input. It then goes low, or off, and becomes “false.”

It also can be used with an internal coil, becoming true when the coil is off and becoming false when the coil is on.

Allen-Bradley calls these normally closed contacts “XIO”, or “eXamine If Open” instructions.

-( )-    Output Coil
When used with a hardwired output, this function is off until the logic in the program allows it to turn on. It then becomes “true”, and will energize the device that is wired to the respective output.

If it is used as an internal coil, it will toggle the instructions associated with it. That is, it will close a normally open instruction and open a normally closed instruction.

Allen-Bradley calls these outputs “OTE”, or “OutpuT Energize”.

An OTE may be used with a hardwired output or an internal coil.

TRUE – A state that indicates an instruction is allowing logic to “flow” through it.

Also, if the logic in a rung turns on the output of the rung, then the rung is said to be true.

FALSE – Without stating the obvious, this is the opposite of true.

Excerpted from PLC Programming with RSLogix 5000

Posted on

RSLogix 5000 “Serial” Logic

RSLogix 5000 allows the use of “serial” logic that does not conform to traditional, electrical ladder logic.

For example, both of the rungs shown below are valid in RSLogix 5000.

Clearly, the second version would not work if wired that way in an equivalent electrical circuit. It would not be allowed in RSLogix 500, either.

The main advantage, in my opinion, to writing the code as it is shown in the second version is that you can get more instructions on the screen, and that involves less scrolling. And, the logic is slightly different; if something turns off the “SystemReady” bit somewhere else in the program, PL1 would not come on.

The main disadvantage, in my experience, is that the second version will drive electricians and maintenance people crazy, if they are not familiar with RSLogix 5000. Their managers will most likely request that you re-write the rung in “traditional” ladder logic.

Posted on

Equivalent Logic in PLC Programming

If you understand basic electrical diagrams, it is much easier to understand ladder logic.

In fact, that was the whole idea behind ladder logic. It was supposed to look, and work, like real electrical circuits

Excerpted from “The Beginner’s Guide to PLC Programming”

In its elementary form, PLC logic is very similar to the hard-wired logic you would find in an electrical ladder diagram.

For example, if you wanted to turn on a light with a momentary pushbutton, you would wire it like the circuit below.

When you press PB1, the pilot light PL1 lights up.

Now let’s do the same thing in a PLC. To duplicate the hardwired circuit on a PLC, you would wire the switch PB1 to an input and wire the light PL1 to an output. Each PLC manufacturer gives you the details of wiring their particular modules. The I/O (hardwired inputs and outputs) is set up like this:

– There is a “PB1” pushbutton switch wired to INPUT1 of the PLC.
– There is a “PL1” pilot light wired to OUTPUT1 of the PLC.

Now let’s examine the sequence of events. When you first turn on the PLC, the PB1 pushbutton is off, or false.  Therefore, the PL1 output is off. Pressing PB1 will make INPUT1 true, OUTPUT1 will come on and the light will be energized. It will stay on only as long as you hold the button in. Just like electrical current has to flow through the switch to turn on the light in the hardwired circuit, the logic has to “flow” through the normally open instruction (which is closed when you press the switch) of INPUT1 to energize the output that turns on PL1.

The programming terminal display will look something like this as you hold in PB1. The yellow highlight indicates the bit, or address, is “on” or “true”.

Posted on

Setting up the Analog Input Card in RSLogix 5000

Let’s assume that the output of our scales has been calibrated for 0-10 VDC. Zero volts equals 0 pounds, and 10 volts equals 2000 pounds.

Now we know the signal type is DC voltage, the range is 0-10 and the engineering units are pounds.

Right-click on the 1756-IF8 card in the Controller Organizer and choose “Properties”. Click on the “Configuration” tab and you will see this.

You’ll see that Channel 0, which is our Scales channel, is selected.

Click on the dropdown menu for “Input Range” and select “0V to 10V”.

Change the “Low Signal” field to 0.

Change the “High Engineering” field to 2000.

Change the “Low Engineering” field to 0.

That is all we really need to do. However, we are going to take advantage of the fact that there is a filter available. This filter smooths input transitions.

Set the “Digital Filter” field to 1000 ms.

Click “Apply” and we are done with the scales.