PLC Homework
Ch 3 PLCs and Processing I/O 1
Chapter 3 PLCs and Processing I/O
Introduction
After an introduction of PLCs in chapter one, various characteristics of the PLC need to be
discussed. The purpose now is to discuss what parts constitute a modern PLC and how these
parts interface. The topology of a PLC system is also discussed as to how PLCs are distributed
in a manufacturing environment to best control a process efficiently.
Since each is electronic and operates using one or more microprocessors, a 5 volt power supply
and CPU (central processing unit) are the core of the PLC. Included in the CPU is a computer
with memory and communications hardware to communicate to a programming panel, the I/O,
and to a network which is either peer-to-peer or a multimode network.
Many PLC vendors divide the work of the PLC between multiple microprocessors with
coordination handled by a master microprocessor. One processor may be assigned to handle the
I/O. Another may handle the networking and communication to the programming panel. A
supervisory microprocessor handles the logic, scan, arithmetic, and other instructions solution of
the program.
Inputs and outputs complete the PLC with inputs reporting the status of the system and outputs
controlling the sequencing of the process. Inputs and outputs are of many types and forms. A
simple switch can be an input. Also, a high-speed pulse input can be an input providing speed
information from a motor. Inputs and outputs alike can be simple or complex in nature. Both
the simple I/O as well as the more complex will be discussed in the chapter and through the rest
of the book.
Overview of the PLC
Inputs form the portion of the PLC connecting switches, sensors, transducers and other devices
to the processor. Typically, the input is tied to a screw terminal. The PLC program reads the
status of the inputs and solves logic based on this status.
The CPU stores the program and controls communication with all peripherals including
programming devices as well as the I/O. The CPU executes the programs in an orderly manner
and guarantee that I/O responds per the program. The guarantee is not trivial if one is
experienced with most computer operating systems.
Outputs are connected to devices that control the process. Relays, motors, solenoids and other
outputs are some examples. A pulse wave PWM is one that controls stepper motors and
positional movement. The PLC program can control the status of this output and thus control the
motor speed and movement.
In the figures below, the simplified PLC is shown first followed by an expanded view of the
PLC. Each view shows the importance of the CPU (Central Processing Unit) as well as the
interconnection of the CPU to I/O (Inputs and Outputs). Other devices interact in such a way
that the program executes and solves logic in a timely manner.
Ch 3 PLCs and Processing I/O 2
Inputs Central
Processing
Unit
Outputs
Fig. 3-1a Simplified View of the PLC
Central Processing Unit
Arithmetic Logic Unit
Logic Operations
Math Operations
Operating Data
Input Image Table
Output Image Table
Timers/Counters
Datablocks
Program Memory
User Program
System OS
Interrupts
Task Scheduling
Peripheral
Devices
Real Time Clock
Run/Stop Switch
etc
Bus for Data, Control, Power Supply
Input Modules
Output Modules
Communication
Modules
Specialty
Modules
Programming
Terminal (PC)
HMI (Human
Machine Interface)
Process
Process
Process
Process
Operator
You
Fig. 3-1b Expanded View of the PLC
The second view gives a greater detail of data flow into and out of the PLC. As the devices and
programs become more involved, the flow of data must both increase while being as secure as
with simple systems. All systems may not use communication modules or specialty modules.
Some may use a great number. All will use some kind of programming terminal and “you” will
be responsible for providing the program to run it.
Most PLCs also have a table reserved for health status of the cpu, the I/O, and the software. This
table can be monitored to find if processor errors have occurred. Status tables may be ignored
for the most part until something goes wrong. When an error occurs, their use is extremely
important to the programmer and to the recovery of the processor. The programmer must
monitor the status table in order to determine what went wrong and to restore the processor to
running condition again.
Also along-side the PLC's cpu is a watch dog timer (WDT). The WDT monitors health
throughout the PLC and shuts down the I/O and program if there is a danger that the program or
hardware has caused a major breakdown of the PLC's integrity to process the program and
control the process. The WDT is helpless to shut down the machine being controlled if the
program in the PLC is not functioning correctly due to poor programming. Care must be taken
to consider all possible conditions of a program. The proper control of the machine or process
under all conditions and circumstances is critical.
Ch 3 PLCs and Processing I/O 3
The following Figure shows the Lab Trainer used at the Engineering Technology lab at the
University of Toledo. It is an old Modicon trainer with the pushbutton and pilot lights mounted
together with switches and two modern PLCs at the left. Also, a thumbwheel switch assembly
can be found. The hole is for an LED readout that was never implemented.
The two PLCs are the Allen Bradley 1769-L23E-QBFC1B processor and the Siemens S7-1200 (CPU 1200 DCDCDC.
Allen Bradley 1769-L23E-QBFC1B
Siemens S7-1200 (CPU 1200 DCDCDC Pushbutton-Pilot Light Assembly Selector Switches
Thumbwheel Switch Assembly
Fig. 3-2 The Trainer at U of Toledo
An Ethernet switch is located in the Siemens rack. The Allen-Bradley Ethernet switch could
have been used as well but only one was needed. The network is to be established with both
PLCs having full access to the programming panels in the lab, the 16 workstations that are
available for use.
Ch 3 PLCs and Processing I/O 4
How is the Program Processed in the Siemens PLC?
The program is processed in the PLC cyclically, in the following sequence:
1. First, the status is transferred from the process image of the outputs (PIQ) to the outputs, and switched on or off.
2. Then the processor -which is practically the PLC’s brain- inquires whether the individual inputs are carrying voltage. This status of the inputs is stored in the
process image of the inputs (PII). For the inputs that carry voltage, the information
1 or "High“ is stored, for those that don’t the information 0 or "Low“.
3. This processor then processes the program stored in the program memory. The program consists of a list of logic operations and instructions that are processed
one after the other. For the required input information, the processor accesses the
PII that was entered previously, and the result of the logic operation (RLO) is
written into a process image of the outputs (PIQ). If necessary, the processor also
accesses other memory areas during program processing; for example, for local
data of sub-programs, data blocks and flags.
4. Then, internal operating system tasks such as self-tests and communication are performed Then we continue with Item 1.
Note: The time the processor needs for this sequence is called cycle time. In turn, the cycle
time depends on the number and type of instructions and the processor capacity.
PLC’s program in the program memory 1st instruction 2nd instruction 3rd instruction 4th instruction ... Last instruction
1. Transfer the status from the PIQ to the outputs.
2. Store the status of the inputs in the PII.
3. Processing the program instruction by instruction with access to PII and PIQ
4. Perform internal operating system tasks (communication, self-test, etc…)
PII
Local data
Flags
Data blocks
PIQ
Ch 3 PLCs and Processing I/O 5
What Happens Electrically
Figure 3-3 demonstrates the flow of current in a simple circuit. The battery provides power to
the lamp but is blocked in Fig. 3-3b because the switch is open. With an open switch, no current
flows and the circuit is incomplete. When the switch closes, however, current flows and the
lamp is illuminated (Fig. 3-3c). As simple as this circuit is, it contains the fundamental principle
of input and output flow in a control circuit and the PLC.
- +
battery
switch
lamp
Fig. 3-3a Simple Electrical Components
- +
battery
switch
lamp
no flow
Fig. 3-3b Simple Electrical Circuit (Open, No Flow)
- +
battery
switch
lamp
flow
Fig. 3-3c Simple Electrical Circuit (Closed, Flow)
Ch 3 PLCs and Processing I/O 6
The schematic for these circuits resembles the circuit below (Fig. 3-3d). Symbols have replaced
their physical devices but the functionality remains the same.
-
Fig. 3-3d Simple Electrical Schematic
Fig. 3-4 shows the PLC solving logic in a similar manner to the simple circuit above. The
complication of additional circuits solving logic adds to the sophistication of the circuit. This
allows much more sophistication in the defining of how a circuit will perform under all
conditions.
P L
C I n
p u
ts
PLC CPU
Logic solved:
If Input = 1 then...
P L
C O
u tp
u ts
Electric Motor
Conveyor
Centrifugal pump
Lamp
Fig. 3-4 Simple PLC Circuit with Real-World Devices
Ch 3 PLCs and Processing I/O 7
In addition to simple PLC networks such as that above, the PLC may contain network I/O
allowing inputs and outputs to be communicated with at remote locations. Fig. 3-5 demonstrates
this type of system.
L o
c a
l In
p u
ts
PLC CPU
Logic solved:
If Input = 1 then...
L o
c a
l O
u tp
u ts
Electric Motor
Conveyor
Centrifugal pump
Lamp
PLC Network (for Inputs, Outputs, Operator Information)
Human
Machine
Interface
Human
Machine
Interface
R e
m o
te I n
p u
ts
R e
m o
te I n
p u
ts
Conveyor
Conveyor
Fan
Fig. 3-5 PLC Circuit with Remote I/O
Inputs and outputs may even be communicated over wireless networks and this type of network
is becoming increasingly more popular as wiring costs continue to rise and the equipment is
designed for safe operation in all environments. Safe wireless networks are the latest advances
in PLC equipment and offer expansion of logic into areas formerly off-limits to the PLC.
The PLC program is generated on a PC using the manufacturer’s software, and temporarily
stored there.
After the PC is connected with the TCP/IP interface of the PLC, the program can be transferred
with a load function to the PLC’s memory.
The PC is no longer needed for further program processing in the PLC.
Ch 3 PLCs and Processing I/O 8
The Generic PLC
How does the PLC replace relay logic from a ladder logic diagram? Consider the following
example. Pictured below is a simple generic PLC with four inputs and four outputs. One input
is wired to a push button and one output is wired to an indicator light. While not exactly the
same as our PLC processor, the steps of installing a program and wiring the PLC are the same.
Run
I0
I1
I2
I3
Q0
Q1
Q2
Q3
+ -
Fault
Input
+24 VDC
Inputs Outputs Indicator
Light
0 VDC
Fig. 3-6 Generic PLC Layout
Notice when wiring an input and energizing the button that the green indicator light for the input
comes on:
I0
Input Not Pushed
I0
Input Pushed
Fig. 3-7 PLC Inputs
In the program, contacts referring to the input conduct as shown below:
I0
Fig. 3-8a Internal Logic
Ch 3 PLCs and Processing I/O 9
If a program exists in the PLC similar to the following:
I0 Q0
Fig. 3-8b Internal Logic
and the Run light is on: Run
then the output will turn on and the light will turn on.
When the program shows the output on, the output LED turns on and the output terminal
energizes the light as shown:
Q0
Indicator
Light
Fig. 3-9a Output Power On
When the program is turned from Run to Program, the output LED turns off and the output turns
off. The outputs also turn off and the Run light goes off if a fault occurs.
Q0
Indicator
Light
Fig. 3-9b Output Power Off
From Liptak’s Process Control: “Input Systems
Inputs are defined as real-world signals giving the controller real-time status of process variables.
These signals can be analog or digital, low or high frequency, maintained or momentary.
Typically they are presented to the programmable controller as a varying voltage, current, or
resistance value.”
Analog signals include thermocouple and resistance temperature devices. Digital signals include
on-off signals from relay contacts or push buttons. Signals such as flowmeters provide
frequency input with the frequency varying with the flow.
Signals to the programmable controller are input from single wire devices or from parallel
signals. A thumb-wheel switch or scale system can input a four-digit number from four BCD
parallel digits. Many signals such as the scale system also require a synchronization signal before
Ch 3 PLCs and Processing I/O 10
data can be read.
Inputs include the following types or attributes:
DC voltage
AC voltage, ranges of 50 Hz or 60 Hz available
True High or True Low DC voltages
Analog inputs, ranges 0-10V or 4-20 ma most popular
BCD, Binary Coded Decimal
Thermocouple
Scale/load cells/LVDT, weight and force sensors
RTD, Resistance Temperature Detector
Latching
Isolated or Common Neutral
Intelligent (Smart with own CPU on board I/O card)
Resolver
Encoder
Serial Communications Port
An example is the limit switch shown below:
Fig. 3-10 Picture of Limit Switch (Input)
From Liptak’s Process Control:
“Outputs
There are three common categories of outputs: discrete, register, and analog. Discrete outputs
can be pilot lights, solenoid valves, or annunciator windows (lamp box). Register outputs can
drive panel meters or displays; analog outputs can drive signals to variable speed drives or to I/P
(current to air) converters and thus to control valves.”
Output signals are similar to input signals in that signals can be either analog or digital. Digital
signals can be either single data or a parallel arrangement of bits. Most modules are ordered in
arrangements of 4, 8, 16, or 32 devices per card.
Both input and output signals are optically isolated in designs for the US market. This protects
signals from entering the interior of the PLC and allows the designer to wire circuits less
carefully than in circuits without optical isolation. One main design difference between US and
Ch 3 PLCs and Processing I/O 11
European PLC design is the lack of optical isolation in the European design.
Outputs include the following types or attributes:
DC voltage
AC voltage, ranges of 50 Hz or 60 Hz available
Isolated or Common Source
True High or True Low DC voltages
Analog Output
Serial Communications Port
Intelligent (Smart with own CPU on board I/O card)
Servo Controller
While I/O modules vary in type and number, recent developments have caused even these
general rules to change. Distributed I/O is an example of a small number of inputs and outputs
isolated at a machine that control a portion of a machine remotely from the PLC. Typical remote
I/O requires a rack, power supply and a large number of cards while distributed I/O is
pre-configured for only a small number of inputs and outputs. A number of advantages occur
with the use of distributed I/O in that the machine can be wired and tested in one facility, broken
down and shipped to a second facility, and re-connected with very little change in the wiring.
This leads to quicker start-ups and cheaper overall wiring costs. Typical distributed I/O is
controlled over a communications network that is daisy-chained from device to device.
Some examples of PLC outputs include:
Fig. 3-11a Picture of Solenoid Valve (Output)
Ch 3 PLCs and Processing I/O 12
Fig. 3-11b Picture of Relay (Output)
The relay pictured may provide input contacts but is primarily used to turn on or off various
other signals from the PLC and is connected to a PLC output to accomplish this task.
Linking to the SIMATIC S7-1200
Fig. 3-12 Siemens S7-1200
Ch 3 PLCs and Processing I/O 13
Pictured below is a S7-1200 PLC from Siemens. It is a powerful new controller with many
capabilities only available in more expensive models until recently.
Power
Connector
User Wiring
Connectors
Status LEDs PROFINET
connector
Fig. 3-13 New S7-1200 PLC from Siemens
The S7-1200 is referred to as a micro PLC and is programmed in STEP 7 Basic, the newest
software offering from Siemens. The processor has capabilities of adding additional I/O to the
basic unit shown above. The processor communicates to a programming panel through an
Ethernet port referred to as the PROFINET interface found on the bottom of the unit. This port
offers access to other controllers, a programmer’s console and various HMI (Human Machine
Interface) units.
Capabilities of this model – the CPU 1214C - include:
User Memory - Work memory 50 Kbytes
Load memory 2 Mbytes Retentive memory 2 Kbytes
On-board digital I/O 14 inputs 10 outputs
On-board analog I/O 2 inputs Process image size Inputs 1024 bytes
Outputs 1024 bytes Bit memory (M) 8192 bytes SM modules expansion 8 SMs max SB expansion 1 SB max CM expansion 3 CMs max High-speed counters 6 total
Single phase 3 at 100 kHz and 3 at 30 kHz Quadrature phase 3 at 80 kHz and 3 at 20 kHz
Pulse outputs 2 Pulse catch inputs 14 Timedelay/cyclic interrupts 4 total with 1 ms resolution Edge interrupts 12 rising and 12 falling Real time clock accuracy +/- 60 sec/mon
Ch 3 PLCs and Processing I/O 14
Execution speed boolean 0.1 microsec/instruction Move Word 12 µsec/instruction Real Math 18 µsec/instruction
Communication 1 Ethernet port Data rate 10/100Mb/s Isolation xfmr isolated Cable type CAT5e shielded
Connections HMI 3 PG 1 User program 8 CPU to CPU 3
Sample wiring for the S7-1200 CPU is provided below (refer to the S7-1200 Systems Manual for
additional details):
L+ M G L+ M 1M .0 .1 .2 .3 .4 .5 .6 .7 .0 .1 .2 .3 .4 .5 24VDC 24 VDC DI a DI b
Input Output
24
VDC
24
VDC
0
VDC -
+
-
+
2M 0 1
Analog
Inputs
24
VDC
DQ a DQ b
L+ M .0 .1 .2 .3 .4 .5 .6 .7 .0 .1
AQ 1x12 bit +/- 10 VDC/0-20 mA
QM 0 G - - -
Specifications of the PLC include:
Digital Inputs Number of inputs 14 Type Sink/Source Rated voltage 24 VDC at 4 mA, nominal Continuous permissible 30 VDC, max Surge voltage 35 VDC for 0.5 sec Logic 1 min. 15 VDC Logic 0 max. 5 VDC Isolation 500 VAC for 1 min. High Speed Clock Single phase rate 100 kHz and 30 kHz Analog Inputs Number 2 Voltage (single-ended) Range 0 to 10 V Full-scale range 0 to 27648 Overshoot range 27649 to 32511 Overflow 32512 to 32767 Resolution 10 bits Max withstand voltage 35 VDC Smoothing None, weak, medium or strong Noise rejection 10, 50, or 60 Hz Impedance >= 100 KΩ Isolation None Accuracy 3.0% - 3.5%
Fig. 3-14 Wiring Layout
of S7-1200 (CPU 1214C)
Ch 3 PLCs and Processing I/O 15
Common mode rejection 40 dB, DC to 60 Hz Operational signal range Signal plus common mode voltage less than 12V and
greater than -12 V Cable length 100 m, twisted and shielded
Descriptions of S7-1200 Modules:
- Central modules CPU with different capacity, integrated inputs/outputs and
PROFINET interface (for example, CPU1214C)
- Power supply PM with input AC 120/230V, 50Hz/60Hz, 1.2A/0.7A, and output
DC 24V/2.5A
- Signal boards SB for adding analog or digital inputs/outputs; whereby the size of
the CPU does not change
(signal boards can be used with the CPUs 1211C/1212C and 1214C)
- Signal modules SM for digital and analog inputs and outputs
(for CPUs 1212C a maximum of 2 SMs can be used, for 1214C a maximum of 8)
Fig. 3-15a S7-1200 (CPU 1214C)
Fig. 3-15b Power Supply
of S7-1200 (CPU 1214C)
Fig. 3-15c Signal Board
of S7-1200 (Analog I/O)
Ch 3 PLCs and Processing I/O 16
- Communication modules CM for serial communication RS 232/RS 485
(for CPUs 1211C/1212C and 1214C, up to 3 CMs can be used)
- Compact Switch Module CSM with 4x RJ45 socket connectors 10/100 MBit/s
- SIMATIC memory cards 2MB or 24MB for storing program data and simple CPU
replacement for maintenance
Note: For this module M01, any CPU with integrated digital inputs and digital outputs
Fig. 3-15d Signal Module
of S7-1200 (Analog I/O)
Fig. 3-15e Communication
Module of S7-1200
Fig. 3-15f Switch Module
of S7-1200
Fig. 3-15g Memory Card
of S7-1200
Ch 3 PLCs and Processing I/O 17
is sufficient.
The SIMATIC Memory Card (MC) stores the program, data, system data, files and projects. It
can be used for the following:
- Transferring a program to several CPUs
- Firmware update of CPUs, signal modules SM and communication modules CM
The part number for this memory card is PN# 6ES57954-8LF00-0AA0. You may want to have
this card on hand when you upgrade your software since the version of firmware onboard the
PLC must be upgraded at the same time or you may be unable to properly link the PLC to the
software in the programming terminal. At present, the version of firmware is 2.2 and the Portal
software is V11, SP 2.
Operating Modes of the CPU
The CPU has the following operating modes:
● In the operating mode STOP, the CPU does not execute the program, and you can
load a project
● In the operating mode STARTUP, the CPU performs a startup.
● In the operating mode RUN, the program is executed cyclically. Projects can not be
loaded in the CPU’s RUN mode.
The CPU does not have a physical switch for changing the operating mode. The
operating mode (STOP or RUN) is changed by using the button on the operator panel of
the software STEP7 Basic. In addition, the operator panel is provided with the button
MRES to perform a general memory reset and displays the status LEDs of the CPU.
Fig. 3-15h Memory Card
being installed
Fig. 3-16a Controlling
Run/Stop Mode of CPU
Ch 3 PLCs and Processing I/O 18
The color of the status LED RUN/STOP on the front of the CPU indicates its current
operating mode.
In addition, there are the LEDs ERROR to indicate errors and MAINT to indicate that maintenance
is required.
Network
Connecting to the CPU by means of TCP/IP, and Resetting to Factory Setting or other IP
address:
To program the SIMATIC S7-1200 from the PC, the PG or a laptop, you need a TCP/IP
connection.
For the PC and the SIMATIC S7-1200 to communicate with each other, it is important also that
the IP addresses of both devices match.
First, we show you how to set the computer’s IP address.
1. From the System control, call the Network connections. Then, select the Properties of the
LAN connection ( Start Settings System control Network connections Local Area
Connection Properties)
2. Select the Properties from the Internet Protocol (TCP/IP) ( Internet Protocol (TCP/IP) Properties)
3. You can now set the IP address and the Subnet screen form, and accept with OK ( Use the
following IP address IP address: 192.168.0.99 Subnet screen form 255.255.255.0 OK
Close)
MAC address:
The MAC address consists of a permanent and a variable part. The permanent part ("Basic MAC
Address") identifies the manufacturer (Siemens, 3COM, ...). The variable part of the MAC
address differentiates the various Ethernet stations and should be assigned uniquely world-wide.
On each module, a MAC address is imprinted specified by the factory.
● Yellow light indicates the STOP mode. ● Green light indicates the RUN mode.
● Blinking light indicates the STARTUP mode.
Fig. 3-16b Location of
Run/Stop LEDs
Ch 3 PLCs and Processing I/O 19
Value range for the IP-address:
The IP address consists of 4 decimal numbers from the value range 0 to 255, separated by a
period. For example, 141.80.0.16
Value range for the subnet screen form:
This screen form is used to recognize whether a station or its IP address belongs to the local
subnetwork, or can be accessed only by means of a router.
The subnet screen form consists of four decimal numbers from the value range 0 to 255,
separated by a period. For example, 255.255.0.0
In their binary representation, the 4 decimal numbers of the subnet screen form have to contain -
from the left- a series of gapless values "1" and from the right a series of gapless values "0".
The values "1" specify the area of the IP address for the network number. The values "0" specify
the area of the IP address for the station address.
Example:
Correct values: 255.255.0.0 Decimal = 1111 1111.1111 1111.0000 0000.0000 0000 binary 255.255.128.0 Decimal = 1111 1111.1111 1111.1000 0000.0000 0000 binary 255.254.0.0 Decimal = 1111 1111.1111 1110.0000 0000.0000.0000 binary
Wrong value: 255.255.1.0 Decimal = 1111 1111.1111 1111.0000 0001.0000 0000 binary
Value range for the address of the gateway (Router):
The address consists of 4 decimal numbers from the value range 0 to 255, separated by a period.
For example, 141.80.0.1.
Relationship of IP addresses, router address, and subnet screen form:
The IP address and the gateway address are to differ only at positions where a "0" is located in
the subnet screen form.
Example:
You entered the following: for the subnet screen form 255.255.255.0, for the IP address 141.30.0.5
and for the router address 141.30.128.1.
The IP address and the gateway address must have a different value only in the 4th decimal
number. However, in the example, the 3rd position already differs.
That means, in the example you have to change alternatively:
- the subnet screen form to: 255.255.0.0 or
- the IP address to: 141.30.128.5 or
- the gateway address to: 141.30.0.1
Ch 3 PLCs and Processing I/O 20
Starting a Project and Logging onto the S7-1200
First, find the TIA V11 Button and click:
View the following:
Fig. 3-17a The Siemens Portal
Select a name of your project. Be aware that you will need to address the project from the H
drive or from a stick drive.
Fig. 3-17b Continuation of the Portal Screen
Choose Configure a device and then Add new device. This will allow the establishment of
communication over the Ethernet with the PLC in your rack.
Ch 3 PLCs and Processing I/O 21
Fig. 3-18 The Siemens Project
Then choose Configure a device (see above). If versions of firmware are the same, you may attach
using the following: Unspecified CPU 1200
Fig. 3-19 Add a Device (Unspecified CPU 1200)
Ch 3 PLCs and Processing I/O 22
Double Click on the unspecified CPU 1200 as shown below:
Fig. 3-20 Use Unspecified CPU 1200
Click Detect:
Fig. 3-21 Using “detect” to Find the CPU
Ch 3 PLCs and Processing I/O 23
Find your processor and click on this processor and again click Detect:
Fig. 3-22 Fine Our PLC from the List
You should then be able to see the following screen:
Fig. 3-23 Resultant Screen for Specific CPU
Ch 3 PLCs and Processing I/O 24
Expand the PLC to see the device under the Project Tree.
Click Go Online:
Fig. 3-24
Project Tree for PLC_1
Fig. 3-25
Online Choice Tree
Ch 3 PLCs and Processing I/O 25
The following should be seen:
Fig. 3-26 Shows Online Status
Under Online Tools, find the box and check Run. Notice that the PLC’s Run light turns green.
Then select Stop and notice the Run light turn yellow. Notice also that the light may blink for a
time period when the processor is first starting up.
If the above method does not succeed in attaching to the PLC, the following procedure may also
be used. From the Project View, click Add new device.
Fig. 3-27 Add New Device
Ch 3 PLCs and Processing I/O 26
In the Add new device screen, make sure the version is compatible with your machine. Today, the version of firmware in the machine is V2.2 and the software on the computers is 11 SP2. These
are compatible.
Fig. 3-28 Add new device – Checking Version
Fig. 3-29 Also Add a Signal Board
There is also an analog signal board installed on these PLCs. This board must be added to the
configuration prior to attaching. This board identification may be seen above.
Ch 3 PLCs and Processing I/O 27
Next, double click on the green Profinet port on the PLC.
Fig. 3-30 Setting the Profinet Port Correctly
Double clicking on the Ethernet port on the picture of the PLC below will bring the Ethernet
address page shown at the bottom of the screen.
Change the address to the static IP address and Subnet mask shown on the sticker on the PLC.
Then right click on the PLC again and choose Compile.
Fig. 3-31 Changing IP and Subnet
Ch 3 PLCs and Processing I/O 28
Fig. 3-32 Compiling and Downloading
Right click on the gray area of the PLC. Then compile the PLC’s program and configuration.
Then choose Download to device and then all. From the Download screen, choose PN/IE and the
interface card in your computer as shown below. If your device does not show on the screen at
bottom, click the Show all accessible devices and try again. If you still are not able to connect, look
at each device in the list and check for MAC address to determine if you can connect using the
MAC address. If still there is no connection, disconnect from the network and show only the
device attached to the PLC from the computer. This is the device. Then click Load.
Ch 3 PLCs and Processing I/O 29
Fig. 3-33 Downloading to Device
Choose the type of PG/PC interface as well as the card in the interface as shown above first:
The above has been used to connect to a number of PLCs in the lab and change the IP addresses
to their proper static addresses. This method seems to work well across the board when coming
at the problem of connecting to the PLC without having each device properly set prior to starting
the project.
It is important that the student practice the programming steps outlined above to be able to start a
new project, download a project to the Siemens 1200 PLC and start and stop the processor. The
ability to do this will pay dividends in later labs.
Make sure the PLC is properly named. The name is not PLC_1 but rather the name on the label
along with the IP address. Change the name to this name before downloading.
Also, learn to PING a device. Under the Command prompt from your computer, type:
Ping 131.183.20.175
(changes depending on IP address) and see if the device responds. A correct response would
show a number of tries and responses from the device being pinged.
Example of Wiring to Siemens PLC:
Given the wiring diagram of Figure 3-14, draw the wiring necessary to attach a normally open
pushbutton to the input I0.2, an output to a lite at Q0.5.
Ch 3 PLCs and Processing I/O 30
L+ M G L+ M 1M .0 .1 .2 .3 .4 .5 .6 .7 .0 .1 .2 .3 .4 .5 24VDC 24 VDC DI a DI b
Input Output
24
VDC
0
VDC
2M 0 1
Analog
Inputs
DQ a DQ b
L+ M .0 .1 .2 .3 .4 .5 .6 .7 .0 .1
AQ 1x12 bit +/- 10 VDC/0-20 mA
QM 0 G - - -
L+ M G L+ M 1M .0 .1 .2 .3 .4 .5 .6 .7 .0 .1 .2 .3 .4 .5 24VDC 24 VDC DI a DI b
Input Output
24
VDC
0
VDC
2M 0 1
Analog
Inputs
Wire PB input to I0.2
PB
DQ a DQ b
L+ M .0 .1 .2 .3 .4 .5 .6 .7 .0 .1
24
VDC
0
VDC
Wire Lite to output Q0.5
Fig. 3-34 Wiring Layout of Siemens PLC
Ch 3 PLCs and Processing I/O 31
Allen-Bradley’s CompactLogix L23E Programmable Automation Controllers
Integrated Architecture for Smaller Applications
1769-L23E-QBFC1B:
Fig. 3-36 Front View of CompactLogix L23E
Fig. 3-37 View of CompactLogix L23E with
Wiring Exposed
Ch 3 PLCs and Processing I/O 32
Benefits
• Extends benefits of the Logix Control Platform into smaller applications
• Three packaged controller forms lower costs and simplify configuration
• Integrated EtherNet/IP ports offer cost-effective connectivity
• Pre-configured, embedded I/O simplifies use, reducing development and start-up costs
• High functionality supports advanced Integrated Architecture features including Alarms
and Events, drive integration and PhaseManager™
• Use of a common database between FactoryTalk View and PanelView Plus offers easy
HMI integration to reduce development and start-up costs
CompactLogix programmable automation controllers (PACs) offer you the benefits of the Logix
Control Platform—common programming environment, common networks, and common control
engine—in a smaller footprint for machine-level control applications. The new CompactLogix
L23 extends these benefits into even smaller applications. The CompactLogix L23 controllers
include the Logix control engine, power supply and two of the most common I/O configurations,
lowering costs and simplifying configuration. Each CompactLogix L23 PAC offers 512Kb of
memory, up to three tasks, four programs and embedded EtherNet/IP capabilities for ease of use.
Up to two local Compact I/O or communication cards can also be added for additional flexibility.
1769-L23E-QBFC1B
Embedded Communication Ports Isolated Serial (DF1 or ASCII) Ethernet/IP with (MSG + I/O)
EtherNet/IP Connections 8 TCP/IP – 32 CIP
Memory 512 KB
Embedded I/O 16 DC in, 16 DC out, 4 Analog in, 2 Analog out, 4 High-Speed Counters (250 kHz)
Expansion 2 Additional 1769 I/O Modules or 1 1769 Communication Module
Tasks 3-Continuous, Periodic or Event
Programs 4
Routines Unlimited
Languages LD, FBD, ST, and SFC
Alarms & Events Supported
PhaseManager Supported
Add-on Instructions Supported
Dimension 130x293x90mm
Power Requirements 19.2 – 31.2 VDC – 50VA
Table 3-1 CompactLogix L23E Capabilities
Ch 3 PLCs and Processing I/O 33
In 0
In 1
In 2
In 3
In 4
In 5
In 6
In 7 DC
Com 1 In 9
In 8
In 11
In 10
In 13
In 12
In 15
In 14 DC
Com 2
24 V DC
24 V DC
+24 VDC
0 VDC+24 VDC
0 VDC
Fig. 3-38 A-B Sample Input Wiring
+VDC
OUT 1
+24 VDC
OUT 3
OUT 5
OUT 7
OUT 9
OUT 11
OUT 13
OUT 15
Out 0
OUT 2
OUT 4
OUT 6
OUT 8
OUT 10
OUT 12
OUT 14
DC COM
CR
CR
CR
CR
CR
CR
CR
CR
CR
CR
0 VDC
24 V DC (source)
Fig. 3-39 A-B Sample Output Wiring
Ch 3 PLCs and Processing I/O 34
V in 0+
V in 0-
I in 0+
V in 2+
V/I in 2-
I in 2+
AoutCOM
V out 0+
I out 0+
V in 1+
V/I in 1-
I in 1+
V in 3+
V/I in 3-
I in 3+
Ain COM
V out 1+
I out 1+
Analog IN/OUT
Out 1
Out 3
A 0+
B 0+
Z 0+
A 1+
B 1+
Z 1+
Out 0
Out 2
Out
DC Com
A 0-
B 0-
Z 0-
A 1-
B 1-
Z 1-
Counter
Out DC
+5/24DC
Fig. 3-40 A-B Analog In/Out and Counter Interface
Two programs are used to set up and program the A-B CompactLogix processor. First is
RSLinx. On the next page is an explanation of setting up RSLinx to establish the network
connection between the computer and the PLC. Once this connection is in place, programming
can begin. RSLogix 5000 is used for this function. On the pages following are examples of
starting RSLogix 5000 and samples of beginning a program for the PLC and downloading to the
PLC. Explanations of programming both the Siemens and the A-B processors continue in the
next chapter.
Ch 3 PLCs and Processing I/O 35
Use RSLinx to configure the EtherNet/IP Driver:
Choose ‘Communications’, then
‘Configure Drivers’.
From the list of Available Driver Types,
choose ‘Ethernet/IP’
Click ‘Add New…’ and then ‘OK’
Check ‘Browse Local Subnet’ and then
click ‘OK’
Verify that the driver is ‘Running’.
Close the ‘Configure Drivers’ window.
Verify that Ethernet/IIP is ‘seeing’ the
PLC by clicking ‘RSWho’
and expanding the Ethernet link to see
the specific CompactLogix processor
Ch 3 PLCs and Processing I/O 36
When launching RSLogix 5000 , have the icon on your desktop or launch using
Rockwell Software, RSLogix 5000 Enterprise Series , RSLogix 5000 .
When launched , the following will appear :
When starting with no program , choose New from the File menu . The New Controller
dialog appears . Choose our controller ,
the 1769 -L23E-QBFC1 controller , add the revision level , 19 at present , add a name
(text) in this example and click ‘OK’
Fig. 3-41 First Screen for RSLogix 5000
Fig. 3-42 Configuring a Program Name
Ch 3 PLCs and Processing I/O 37
Congratulations ! You have a PLC that can do absolutely nothing . There is no tag database and no program
stored yet .
There is , however, an I/O Configuration prepared . It includes the L23E, an Ethernet Port and some
Embedded I /O. Note that there is also room for expansion I /O to the right of the processor .
Fig. 3-43 Basic Programming Page of RSLogix 5000
Fig. 3-44 I/O Configuration for L23E
On the left is a tree of folders. These show the controller, its tasks, any trends, data tables and
the I/O configuration.
Ch 3 PLCs and Processing I/O 38
Click MainProgram and then MainRoutine to show the figure below. You are ready to program a
rung of logic. Above the MainRoutine logic is the Ladder Instruction toolbar. From this toolbar,
you can choose the type of contact to place in the rung of logic.
Fig. 3-45 Programming Area for RSLogix 5000
Ch 3 PLCs and Processing I/O 39
The embedded I /O may need to be configured . For instance, the 16 point input section has the following
configuration screens :
Fig. 3-46 Imbedded I/O Configuration Screen
Fig. 3-47 Filter Times for Imbedded Input Group
It is important that the student practice the programming steps outlined above to be able to start a
new project, download a project to the Siemens 1200 PLC and start and stop the processor. The
ability to do this will pay dividends in later labs.
Ch 3 PLCs and Processing I/O 40
The embedded I/O is addressed automatically in the ‘Controller Tags’ entry. This resembles the following:
The 16 inputs from the input card section are addressed as follows: Local:1:I.Data.0 (bit 0) ...
Fig. 3-48 Embedded I/O Addressing
Fig. 3-49 Embedded I/O Addressing
Expanded
Ch 3 PLCs and Processing I/O 41
In 0
In 1
In 2
In 3
In 4
In 5
In 6
In 7 DC
Com 1 In 9
In 8
In 11
In 10
In 13
In 12
In 15
In 14 DC
Com 2
+VDC
OUT 1
OUT 3
OUT 5
OUT 7
OUT 9
OUT 11
OUT 13
OUT 15
Out 0
OUT 2
OUT 4
OUT 6
OUT 8
OUT 10
OUT 12
OUT 14
DC COM
Local:1:I.Data.0
Local:1:I.Data.1
Local:1:I.Data.15 Local:1:I.Data.14
Addresses of
Inputs
Addresses of
Outputs
Local:2:O.Data.0
Local:2:O.Data.1
Local:2:O.Data.14
Local:2:O.Data.15
Fig. 3-50 Tying I/O Addresses to Wiring Points
It is important that the student practice the programming steps outlined above to be able to start a
new project, download a project to the Allen-Bradley L23 PLC and start and stop the processor.
The ability to do this will pay dividends in later labs.
Ch 3 PLCs and Processing I/O 42
Exercises
1 For the Siemens 1200 processor below, draw the wires to connect a NO limit switch to input
I1.4. Draw the wires to connect a solenoid to output Q1.0.
L+ M G L+ M 1M .0 .1 .2 .3 .4 .5 .6 .7 .0 .1 .2 .3 .4 .5 24VDC 24 VDC DI a DI b
Input Output
24
VDC
0
VDC
2M 0 1
Analog
Inputs
DQ a DQ b
L+ M .0 .1 .2 .3 .4 .5 .6 .7 .0 .1
AQ 1x12 bit +/- 10 VDC/0-20 mA
QM 0 G - - -
Fig. 3-51 Siemens Wiring Diagram
2 For the Allen-Bradley L23E processor below, draw the wires to connect a NO limit switch to
input Local:1:I.Data.3. Draw the wires to connect a solenoid to output Local:2:O.Data.2.
In 0
In 1
In 2
In 3
In 4
In 5
In 6
In 7 DC
Com 1 In 9
In 8
In 11
In 10
In 13
In 12
In 15
In 14 DC
Com 2
+VDC
OUT 1
OUT 3
OUT 5
OUT 7
OUT 9
OUT 11
OUT 13
OUT 15
Out 0
OUT 2
OUT 4
OUT 6
OUT 8
OUT 10
OUT 12
OUT 14
DC COM
Fig. 3-52 A-B Wiring Diagram
Ch 3 PLCs and Processing I/O 43
3. Watch a portion of the following three videos:
http://www.youtube.com/watch?v=-Au6m45GIvA&feature=related
Siemens SIMATIC S7-1200 Part 1 - Getting Started
Getting started with your first SIMATIC S7-1200 Compact Controller and Step 7 Basic Software. See how easy it
is to configure, program, and test your first S7-1200 in less than 8 minutes. This is part one of a four part series
showcasing the time and cost saving benefits of the new S7-1200.
http://www.youtube.com/watch?v=zvS_BuQlSXo&feature=related
Introduction to PLC ladder logic programming training video. This educational video is an
introduction to what ladder logic is and how it works. (Part 1 of 2)
More videos are available on http://www.PLCMentor.com by http://www.AutomationNC.com