s7-1212c Course Training
s7-1212c Course Training
s7-1212c Course Training
The CPU combines a microprocessor, an integrated power supply, input and output circuits,
built-in PROFINET, high-speed motion control I/O, and on-board analog inputs in a compact
housing to create a powerful controller. After you download your program, the CPU contains
the logic required to monitor and control the devices in your application. The CPU monitors
the inputs and changes the outputs according to the logic of your user program, which can
include Boolean logic, counting, timing, complex math operations, motion control, and
communications with other intelligent devices.
The CPU provides a PROFINET port for communication over a PROFINET network.
Additional modules are available for communicating over PROFIBUS, GPRS, RS485,
RS232, RS422, IEC, DNP3, and WDC (Wideband Data Communication) networks.
Slot Rules
• CM left of the CPU (number depends on the CPU)
• Signal modules (digital, analog) right of the CPU (number depends on the CPU)
Signal Modules
• Digital input, output or mixed modules (24VDC, relay)
• Analog input, output or mixed modules (voltage, current, resistance, thermocouple)
These boards are used for application-specific adaptation of the CPU to the requirements of the
plant. The physical size of the CPU remains unchanged.
Signal Board (SB)
• Digital signal board
− only inputs
− only outputs
− inputs and outputs
• Analog signal board
− only inputs
− only outputs
Communication Board (CB)
• RS485 interface
Battery Board (BB)
A battery board (housing for CR1025 battery) ensures the long-term battery backup (buffering) of
the real-time clock.
• Buffering time without battery board typically 20 days / minimum 12 days at 40°C
• Buffering time with battery board approximately 1 year
Installation
The modules are mounted on a standard mounting rail or alternatively screwed into the control
cabinet.
S7-1200 Expansion Cable
It offers additional flexibility in configuring the S7-1200 system. One expansion cable can be used
for each CPU system.
• Either between the CPU and the first SM or between two SMs
Bus Connector
It is located as a mechanical slide on the left side of the SM modules.
It is mechanically attached on the right side of the CMs/CPs.
Mounting Positions
A horizontal or vertical mounting is possible.
Caution!
With a vertical mounting, the maximum allowed ambient temperature is 10 °C lower.
The CPU provides several options for storing data during the execution of the user program:
● Global memory: The CPU provides a variety of specialized memory areas, including
inputs (I), outputs (Q) and bit memory (M). This memory is accessible by all code blocks
without restriction.
● PLC tag table: You can enter symbolic names in the STEP 7 PLC tag table for specific
memory locations. These tags are global to the STEP 7 program and allow programming
with names that are meaningful for your application.
● Data block (DB): You can include DBs in your user program to store data for the code
blocks. The data stored persists when the execution of the associated code block comes
to an end. A "global" DB stores data that can be used by all code blocks, while an
instance DB stores data for a specific FB and is structured by the parameters for the FB.
● Temp memory: Whenever a code block is called, the operating system of the CPU
allocates the temporary, or local, memory (L) to be used during the execution of the
block. When the execution of the code block finishes, the CPU reallocates the local
memory for the execution of other code blocks.
8 BIT= 1 BYTE
IB0,QB0,MB0
16 BIT= 2 BYTE=1WORD
IW0,QW0,MW0
Eng Ahmad Yousef 0799189997 engahmadyahmad@yahoo.com
32 BIT= 4 BYTE=2 WORD
ID0,QD0,MD0
# Decimal :
1,2,3,4,5,5.5,6.6
# Binary :
Conversion steps:
1.Divide the number by 2.
2.Get the integer quotient for the next iteration.
3.Get the remainder for the binary digit.
4.Repeat the steps until the quotient is equal to 0
● Load memory is non-volatile storage for the user program, data and configuration. When
a project is downloaded to the CPU, it is first stored in the Load memory area. This area
is located either in a memory card (if present) or in the CPU. This non-volatile memory
area is maintained through a power loss. The memory card supports a larger storage
space than that built-in to the CPU.
● Work memory is volatile storage for some elements of the user project while executing
the user program. The CPU copies some elements of the project from load memory into
work memory. This volatile area is lost when power is removed, and is restored by the
CPU when power is restored.
● Retentive memory is non-volatile storage for a limited quantity of work memory values.
The retentive memory area is used to store the values of selected user memory locations
during power loss. When a power down or power loss occurs, the CPU restores these
retentive values upon power up.
Eng Ahmad Yousef 0799189997 engahmadyahmad@yahoo.com
Inserting a memory card in the CPU
When you copy a program to a transfer card or a program card, the program includes the
startup parameter for the CPU. Before copying the program to the memory card, always
ensure that you have configured the operating mode for the CPU following a power-cycle.
Select whether the CPU starts in STOP mode, RUN mode, or in the previous mode (prior to
the power cycle).
When used as a program card, the memory card is the external load memory of the CPU. If
you remove the program card, the internal load memory of the CPU is empty.
Firmware update
https://www.youtube.com/watch?v=UiZjYvDb-nA
You use "watch tables" for monitoring and modifying the values of a user program being
executed by the online CPU. You can create and save different watch tables in your project
to support a variety of test environments. This allows you to reproduce tests during
commissioning or for service and maintenance purposes.
· OB (organization block):
OBs are called by the operating system cyclically and are the interface between the user program and
the operating system. In this OB, the PLC’s control unit is informed by means of block call commands as
to which program blocks it has to process.
· FB (function block):
For each call (instance), the FB needs an assigned memory area. When an FB is called, a data block
(DB) for example can be assigned to it as instance DB.
The data in this instance DB is then accessed by means of the variables of the FB.
Different memory areas have to be assigned to an FB if it called several times.
Additional FBs and FCs can be called in a function block in turn.
· DB (data block):
DBs are used to provide memory for the data variables. There are two types of data blocks: global
DBs where all OBs, FBs and FCs can read the stored data or themselves can write data into the DB,
and instance DBs that are assigned to a certain FB.
MW0
Analog input modules convert the analog process signal to a digital format.
The digitized analog value applies to input and output values of the same rated range.
Analog values are output as fixed point numbers with two's complement. The resultant
assignment:
Sign
Project 1
I need 3 pumps in a system and 2 start P.B (N.O) and 1 stop P.B(N.C)
• If you press on START P.B 1 the pump 1and 2 is working, and after pull out
your hand on the p.b start the pump1 stop and pump 2 continue in the work.
* Then press on the START P.B 2 the pump 3 is working if the pump 2 is working.
When a part is placed on the conveyor at position 1, and when a start button is
pressed it moves to position 2. Upon reaching position 2, it stops for the stamping
operation to take place. After stamping it automatically moves to position 3. It stops
at position 3, where the part is removed manually from the conveyor. Assume only
one part is on the conveyor at a time. Add limit switches, interlocks, push buttons,
etc. as required.