You are on page 1of 71

CONFIGURE S7 1200

PROGRAMMING
TYPE OF CPU COMMUNICATIONS
SOFTWARE
Ranges of MODULES S7 1200

TECHNOLOGY
MODULES

CPU SIGNAL BOARD

POWER SUPPLY

SM MODULES COMMUNICATION
MODULES
OPERATOR CONTROL AND DISPLAY
ELEMENTS OF THE CPU

① 24 V CONNECTION
② PLUG-IN TERMINAL BLOCK FOR
USER WIRING (BEHIND THE
COVER FLAPS)
③ STATUS LEDS FOR THE
INTEGRATED IO AND THE
OPERATING STATE OF THE CPU
④ TCP/IP CONNECTION (ON THE
UNDERSIDE OF THE CPU)
SIMATIC MEMORY CARD (MC)

The optional SIMATIC memory


card (MC) stores a program as
well as data, system data, files
and projects. It can be used for:

• Transferring a program to
multiple CPUs
• Firmware update of CPUs,
signal modules (SMs) and
communication modules
(CMs)
• Easy replacement of the CPU
OPERATING STATES OF THE CPU

The CPU can have the following three operating states:

 In the STOP operating state, the CPU is not executing


the program and you can download a
 project.
 In the STARTUP operating state, the CPU is starting up.
 In the RUN operating state, the program is cyclically
executed.
The CPU does not have a physical switch for changing the
operating state.

You use the button on the operator panel of the STEP 7


Basic software to change the operating state (STOP or
RUN).

The operator panel also contains an MRES button for


performing a
memory reset and displays the status LEDs of the CPU.
STATUS AND ERROR DISPLAYS

The RUN/STOP status LED on the front side of the CPU indicates the
current operating state of the CPU by the color of the display.

There are two additional LEDs here: ERROR LED for indicating errors and MAINT LED for
indicating that maintenance is required
STEP 7 Basic V14 (TIA Portal V14)
programming software

The STEP 7 Basic V14 (TIA Portal V14)


software is the programming tool for the
following STEP 7 Basic V14 provides the following
functions for automation of a system:

automation systems: • Configuration and parameter


assignment of the hardware
• SIMATIC S7-1200/1500 • Specification of the communication
• Basic Panels • Programming
• Testing, commissioning and
servicing with operational/diagnostic
functions
• Documentation
• Creation of visualizations for
SIMATIC Basic Panels using the
integrated WinCC Basic software
• Support is provided for all functions
through detailed online help.
TIA PORTAL – PROJECT VIEW AND PORTAL
VIEW

PORTAL VIEW PROJECT VIEW


SETTING IP FOR COMMUNICATIONS
SETTING IP FOR COMMUNICATIONS
SETTING IP FOR COMMUNICATIONS

Select the desired ® "Local Area Connection" that you want to use to
connect to the
controller and click ® "Properties".
SET THE IP ADDRESS IN THE CPU
SET THE IP ADDRESS IN THE CPU
SET THE IP ADDRESS IN THE CPU
TASK

• Create a project and add the modules of the existing hardware (here:
Trainer Package SIMATIC S7-1200 with CPU 1214C) by using the
automatic hardware detection of the TIA Portal. The
• following modules must be detected:
SIMATIC S7-1200, CPU 1214C AC/DC/Rly
(6ES7 215-1BG40-0XB0)
SM 1223 DI/DQ 16 XRELAY (6ES7 223-1PL32-0XB0)
SM 1234 AI4/AQ2(6ES7234-4HE32-0XB0)
CP 1243-7LTE(6GK7 243-7SX30-0XE0)
STRUCTURED STEP-BY-STEP INSTRUCTIONS

• Create a new project


READ THE HARDWARE OF SIMATIC S7-1200
READ THE HARDWARE OF SIMATIC S7-
1200
READ THE HARDWARE OF SIMATIC S7-1200
READ THE HARDWARE OF SIMATIC S7-
1200
Configure the Ethernet interface of the CPU
CONFIGURE THE ADDRESS AREAS
DOWNLOAD THE HARDWARE
CONFIGURATION TO THE DEVICE
DOWNLOAD THE HARDWARE
CONFIGURATION TO THE DEVICE
DOWNLOAD THE HARDWARE
CONFIGURATION TO THE DEVICE
DOWNLOAD THE HARDWARE
CONFIGURATION TO THE DEVICE
CHECKLIST
STEP 7 MAKES THE WORK EASY
CREATE TAGS FOR THE I/O OF THE CPU

"PLC tags" are the symbolic names for I/O and addresses. After you create a PLC tag,STEP 7 stores the
tag in a tag table. All of the editors in your project (such as the program editor, the device editor, the
visualization editor, and the watch table editor) can access the tag table.
CREATE A SIMPLE NETWORK IN YOUR
USER PROGRAM
CREATE A SIMPLE NETWORK IN YOUR
USER PROGRAM
CREATE A SIMPLE NETWORK IN YOUR
USER PROGRAM
Memory areas, addressing and data types

Data types supported by


the S7-1200
Data types are used to specify both the size of
a data element as well as how the data are to
be interpreted. Each instruction parameter
supports at least one data type, and some
parameters support multiple data types. Hold
the cursor over the parameter field of an
instruction to see which data types are
supported for a given parameter.
ADDRESSING MEMORY AREAS
ADDRESSING MEMORY AREAS

Each different memory location has a unique address. Your user program uses these addresses to access the
information in the memory location. The absolute address consists of the following elements:
● Memory area (such as I, Q, or M)
● Size of the data to be accessed (such as "B" for Byte or "W" for Word)
● Address of the data (such as Byte 3 or Word 3)
When accessing a bit in the address for a Boolean value, you do not enter a mnemonic for the size. You enter only
the memory area, the byte location, and the bit location for the data(such as I0.0, Q0.1, or M3.4).
ACCESSING A "SLICE" OF A TAGGED
DATA TYPE

• A double word-sized tag can be accessed by bits 0 - 31, bytes 0 - 3, or word 0 - 1. A wordsized tag can be accessed by
bits 0 - 15, bytes 0 - 1, or word 0. A byte-sized tag can be accessed by bits 0 - 7, or byte 0. Bit, byte, and word slices can
be used anywhere that bits, bytes, or words are expected operands.
SYSTEM MEMORY AND CLOCK MEMORY
PROVIDE STANDARD FUNCTIONALITY

• System memory configures a byte with bits that turn on (value = 1) for a specific event.
SYSTEM MEMORY AND CLOCK MEMORY
PROVIDE STANDARD FUNCTIONALITY

Clock memory configures a byte that cycles the individual bits on and off at fixed intervals. Each clock bit
generates a square wave pulse on the corresponding M memory bit. These bits can be used as control
bits, especially when combined with edge instructions, to trigger actions in the user code on a cyclic basis.
STRUCTURE OF GRAFCET

Essentially, GRAFCET describes two aspects of a control process in accordance with fixed rules:
• The actions to be executed (commands)
• The sequence in which they are executed
A GRAFCET – which is also referred to as a GRAFCET plan – is subdivided into two parts for this reason. The structure
depicts the process sequence in time, and the process is broken down into consecutive steps.

GRAFCET for a process which separates workpieces and feeds them to a production sequence
THE BASIC PRINCIPLE OF GRAFCET

1. Sequences are subdivided into alternating


• steps and• transitions.
2. Only one step is active at any given time.
3. Any desired number of actions can be linked to the steps.
4. Sequences can be branched out and merged back together as
• alternative branchings or
• parallel branchings.
• Step one must be observed in this case!
Elements of Grafcet

This first example is designed to provide an overview of Grafcet before getting down to details. Grafcet has four basic kinds
of elements:
• 1. Steps, shown graphically as numbered boxes.
• 2. Links, shown as horizontal or vertical lines.
• 3. Transitions, shown as short numbered horizontal lines.
• 4. Statements, text instructions describing control actions and conditions.
FROM GRAFCETT TO PLC PROGRAM

Create 3 Fc block in the program block ;

1.All Condition
2.All Step
3.All Action
ALL CONDITION FC BLOCK

All condition Block will have the basic condition of most machine
commanlly will have 3 basic condition:
1)All stop condition

2)All step Condition

3) All start condition


STEP PROGRAMMING
STEP PROGRAMMING

• Repeat the network for the next sequence step refer to the grafcett for the
Input to activate step
• The next step will be used to reset previous step .
ACTION BLOCK PROGRAMMING

step to activated outputsignal on set(s)


step to deactivated output signal on reset ®
EXERCISE /TASK 18

• The content from a silo will be


transported about three conveyor
belts.
• With the switch S2, the control will be
switched on. Conveyer 3 run. After a
on delay time from 5 seconds the
conveyer 2 switches on. After a
further on delay time from 5 seconds
conveyer 1 switches on. Now, the
valve Y1 opens immediately.
• With the stop button S1, the
emergency stop S0 and the three
overload relays of the conveyers the
a) Select the required contacts process stops immediately.
(from NC / NO)!
b) Complete the wiring diagram
of the automation device!
• The run-up of the silo plant shall be
indicated by P2 flashing (2 Hz) and
c) Create a symbol list! continuous operation through P3 with
d) Create the macro symbolism! continuous light. A fault is indicated
e) Write an S7 program and test! by P1 (1Hz flashing).
EXERCISE /TASK 19

• The content from a silo will be transported about


three conveyor belts.

• With the switch S1, the control will be switched on.


Belt 3 run. After a on delay time from 5 seconds the
Belt 2 switches on. After a further on delay time from
5 seconds belt 1 switches on. Now, the valve Y1
opens immediately.

• The Plant will be switched off by the stop button S2


in a sequence with 3 off delay times from 5
seconds. By pushing S2 the valve Y1 switched off
immediately. Five second later switched off Belt 1,
further 5 five seconds Belt 2 and at last after five
seconds belt 3.

a) Select the required contacts • The process stops immediately by pushing the
(from NC / NO)! emergency stop (S0) or one from the three overload
relays of the belts.
b) Complete the wiring diagram
of the automation device! • The run-up of the silo plant shall be indicated by P2
c) Create a symbol list! flashing (2 Hz), the run-down with P3 flashing (2
Hz). If the system still running compete, both
d) Create the macro symbolism! indicator lights continuous.
e) Write an S7 program and test! • A fault is indicated by P1 (1Hz flashing).
EXERCISE /TASK 20

• The technology diagram shows a simplified


representation of a car wash facility, with the following
functions:
• By pressing the start button “S3” turns on the conveyer
motor “M1”. The car, which is now moving through the
belt, now activated sequentially the proximity sensors
“S4” until “S8”.
• The sensor “S4” switch on the solenoid valve “Y1” one.
• When driving over sensor “S5” the solenoid valve “Y2”
and the two brush motors “M2” and “M3” switched on,
“Y1” is turned off.
• When driving over sensor “S6” the solenoid valve “Y3”
switched on. The brush motors “M2” and “M3” and “Y2”
be shut down.
• When pressing the “S7” is “Y3” turned off and the blower
motor “M4” switched on.
• If the car reached the limit switch “S8”, the blower motor
“M4” turned off. The system can only be restarted if “S8”
has become free again by the driving away of the car.

• The process stops immediately by pushing the


emergency stop (S0) or one from the overload relays.
• If a fault by “Emergency Stop” the indicator flashes with
a frequency of 1 Hz and a pulse-pause ratio of 4:1.
• If a fault by one of the overload relays, an acoustic signal
and the “fault” indicator flashes with a frequency of 1 Hz
• The acoustic signal can be reset with a push button. The
indicator switched of only if the fault is fixed.
EXERCISE /TASK 21

• A plate bending machine work as follow:


The operator gives the plate sheet by
hand in the machine and press the push
button “Start” (S7).
• Cylinder 1 clamp the flat sheet.
• Cylinder 2 bend the flat sheet at 90° .
• Cylinder 3 gives then the flat sheet the
final form.
• The movement of the cylinders 1-2-3 are
finally controlled by solenoid actuated
spring loaded 3/2 way pneumatic valves.
In the closed position (solenoids are not
energised) the cylinders not work. In the
switched (connected) position (solenoids
are energised) the cylinders work.
• Add two signals: P1 should display that
the sheet is benged at 90°; P2 should
display that the sheet is benged
completely. Both signal should be
a)Select the required contacts (from NC / NO)! switched off at the end of the cycle
b)Complete the wiring diagram of the automation device!
c)Create a symbol list!
d)Create the macro symbolism!
e)Write an S7 program and test!
EXERCISE /TASK 22

• The main components of the system are: the


solenoid valve Silo Y1, the conveyor (M1)
and the scale.
• For the orientation of the truck driver is still a
traffic light available.
• The indicator “facility is ready for work” is
switched on by push button S1 Then the
scale is ready and the traffic lights ‘green’.
The buttons S0 (emergency stop) and the
motor protection relay (F1) turns off the
facility.
• If is driving truck on the scale and the limit
switch S4 is switched on, the light turns “red”.
• By pushing button S2 the charging can start.
After pressing S2 at first turn on the conveyor
belt. After 3 seconds opens the valve Y1.
• When the pressure switch S3 from the scale
switched on, Y1 closed and after a delay of 5
seconds, the conveyer (M1) switches off, the
light goes ‘green’. The truck can leave the
scales.
• A new charging process can be initiated with
the same conditions.
EXERCISE /TASK 23

• The mixing machine runs the following cycle.


• If pressed the start button S0 the signal start (P1)
lights, the pump (M2) and the whisk (M1) started.
Valve Y1 open and fluid 1 pumping into the mixing
container.
• If sensor B1 reached, shut the valve Y1, valve Y2
open and fluid 2 pumping into the mixing container.
• If sensor B2 reached, shut the valve Y2, valve Y3
open and fluid 3 pumping into the mixing container.
• If sensor B3 reached, shut the valve Y3, valve Y4
open and fluid 4 pumping into the mixing container.
• If sensor B4 reached, shut the valve Y4 and the
pump (M2) stops. The whisk (M1) continues to turn.
• 4 seconds later the signal start (P1) switches off and
the signal ready (P2) lights. The mixing is finished.
• If pressed the stop button S5 the whisk (M1) stops,
the signal ready (P2) switches off. The container
can be emptied (empty B0 positve edge).
• The process immediately stops, if emergency stop
or one oveload relais switches.
EXERCISE /TASK 24

• The branch road leading into the main road is not


respected in this task!
• Additional push button S1 (I0.0 not pictured) starts the
traffic light system.
• All pedestrian traffic lights are red (Q6.3 and Q6.6). The
car traffic lights are green (Q6.2 and Q7.0).
• Push button S0 (I0.1 not pictured) switches off the traffic
light system.

• If someone press a demand push button of the


pedestrian traffic light (I2.0 or I2.1), the traffic light
system will change its state:
• 5 seconds after using of push button:
• car traffic light green change to yellow state (Q6.2
Q6.1 and Q7.0 Q7.1);
• after 2 seconds yellow-phase, the car traffic light change
from yellow to red (Q6.1 Q6.0 and Q7.1 Q7.2);
• again 2 seconds waiting in car red phase, the pedestrian
traffic light change from red to green (Q6.3 Q6.4 and
Q6.6 Q6.5) for 7 seconds and then back to red;
• after further 2 seconds waiting: car traffic light red, will be
accomplished by yellow and two seconds later to green
alone (Q6.0 Q6.0/Q6.1 Q6.2 and Q7.2 Q7.2/Q7.1
Q7.0).
• Now the cycle is finished and after an additional waiting
time of 15 seconds it is possible to start the cycle again.
EXERCISE /TASK 25

• A plate bending machine work as


follow: The operator gives the plate
sheet by hand in the machine and
press the push button “Start” (S7).
• Cylinder 1 clamp the flat sheet.
• Cylinder 2 bend the flat sheet at
90° .
• Cylinder 3 gives then the flat sheet
the final form.
• The movement of the cylinders 1-2-
3 are finally controlled by solenoid
actuated pneumatic valves.
• Add two signals: P1 should display
that the sheet is benged at 90°; P2
should display that the sheet is
benged completely. Both signal
should be switched off at the end of
the cycle.
EXERCISE /TASK 26

• With an embossing machine shall be


stamped labels on top from workpieces.
• Functional sequence:
• After pressing the start button (S8) pushes
the cylinder 1 (Y1) a workpiece from the
magazine to the embossing place.
• Then the ejector (cylinder 3, Y3) will be
shut down. If the sensor S7 identify a
workpiece, the embossing stamp shut
down. 2 seconds later the stamp shut up
in its normal position.
• Then, the ejector presses the workpiece
out of the form. Is the cylinder 3 (Y3)
complete extended, the valve Y4 start
additional.
• With pressure air the workpiece will be
blown into the container. A light barrier at
the container indentify if a finished
workpiece has fallen into the container.
The Valve Y 4 closed.
• Then it is possible to start the next
program operation by Start button S8.
ORGANIZATION BLOCKS

Organization blocks (OBs) form the interface between the operating system of the controller
(CPU) and the application program. They are called from the operating system and control the
following operations:
- Cyclic program processing (e.g. OB1)
- Startup characteristics of the controller
- Interrupt-driven program processing
- Error handling
A project must have, at a minimum, an organization block for cyclic program processing. An
OB is called by a start event as shown in Figure 1. In addition, the individual OBs have defined
priorities so that, for example, an OB82 for error handling can interrupt the cyclic OB1.
FUNCTIONS(FC)

• Functions (FCs) are logic blocks without memory. They have no data memory in which values of block parameters can be stored.
Therefore, all interface parameters must be connected when a function is called. To store data permanently, global data blocks must
be created beforehand. A function contains a program that is executed whenever the function is called from another logic block.
Functions can be used, for example, for the following purposes:
• - Math functions – that return a result dependent on input values.
• - Technological functions – such as individual controls with binary logic operations.
A function can also be called several times at different points within a program.
Function blocks and instance data blocks
DIAGNOSTIC SYMBOLS FOR MODULES
AND DEVICES IN THE DEVICE OVERVIEW

Color coding of ports and Ethernet cables


® The status of ports and Ethernet cables can be diagnosed in the
network view and topology
view.
® The following table shows the possible colors and their
respective meaning
DIAGNOSTICS VIA WEB SERVER

• The web server enables monitoring and administering of the CPU by


authorized users over a network.
• This permits evaluation and diagnostics over long distances.
Monitoring and evaluation is possible without the TIA Portal; all you
need is a web browser.
• The web server is deactivated in the delivery state of the CPU. This
means that you must load a project in which the web server is
activated to enable access using the web browser.
CONFIGURE THE WEB SERVER

To configure the web server, open the device -Select the CPU and choose the 'Web
configuration of the CPU 1214C DC/DC/DC.
server' menu item in the properties.
(- CPU_1214C [CPU 1214C DC/DC/DC] - Device
configuration) (-CPU_1214C ® Properties ® Web server)
CONFIGURE THE WEB SERVER
CONFIGURE THE WEB SERVER
CONFIGURE THE WEB SERVER
ANALOG SIGNALS

In contrast to a binary signal, which can assume only two signal states (“Voltage present +24 V” and
“Voltage not present 0 V”), analog signals can assume any value within a defined range. A typical example
of an analog sensor is a potentiometer. Depending on the position of the knob,any resistance can be set,
up to the maximum value.

Measuring transducers
These quantities are converted to electrical voltages, currents or
resistances with the help of a
measuring transducer. If, for example, a speed is to be measured, the
speed range of 500 to
1500 rpm can be converted to a voltage range of 0 to +10 V using a
measuring transducer. At a
measured speed of 865 rpm, the measuring transducer would output
a voltage value of +3.65 V.
ANALOG MODULES – A/D CONVERTER

These electrical voltages, currents or resistances are then connected


to an analog module that digitizes this signal for further processing in
the PLC.If analog quantities will be processed with a PLC, the read-in
voltage, current or resistance value must be converted to digital
information. The analog value is converted to a bit pattern. This
conversion is referred to as analog-to-digital conversion (A/D
conversion). This means, for example, that the voltage value of 3.65 V
is stored as information in a series of binary digits.
• The result of this conversion is always a 16-bit word for SIMATIC
products. The integrated ADC
• (analog-to-digital converter) of the analog input module digitizes the
analog signal being acquired
• and approximates its value in the form of a stepped curve. The most
important parameters of an
• ADC are its resolution and conversion rate.
ANALOG MODULES – A/D CONVERTER

The more binary digits the digital representation uses, the finer the
resolution is. For example, if
only 1 bit was available for the voltage range of 0 to +10 V, you
would only know whether the
measured voltage is between 0 and +5 V or between +5 V and
+10 V. With 2 bits, the range can
be divided into 4 individual ranges, i.e., 0 to 2.5 / 2.5 to 5 / 5 to 7.5
/ 7.5 to 10 V. Conventional
A/D converters in control engineering use 8 bits, 11 bits or more for
converting.
With 8 bits you have 256 individual ranges, while 11 bits provide a
resolution of 2048 individual
ranges.
DATA TYPES OF THE SIMATIC S7-1200

• The SIMATIC S7-1200 has many different data types for representing different numerical formats. A list
of some of the elementary data types is given below.

Note: The 'INT' and 'REAL' data types play a large role in analog value processing. This is because read-in analog values exist as 16-
bit integers in the 'INT' format, and in order to ensure exact further processing only 'REAL' floating-point numbers should be used due
to roundingerrors in the case of 'INT'.
Reading/writing analog values

Analog values are read into the PLC or output from the PLC as word
information. These words are accessed, for example, with the
following operands:
• %IW 64 Analog input word 64
• %QW 64 Analog output word 64

Each analog value (“channel”)


occupies one input or output word.
The format is ‘Int’, an integer.
READING/WRITING ANALOG VALUES

You might also like