Professional Documents
Culture Documents
PROGRAMMING
TYPE OF CPU COMMUNICATIONS
SOFTWARE
Ranges of MODULES S7 1200
TECHNOLOGY
MODULES
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)
• 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 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
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
"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
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
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
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
• 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
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
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
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
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