Transcript
Page 1: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

01 - Úvod do programovania PLC Siemens SIMATIC S7-1200

Ing. Jozef Klus

Page 2: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

Literatúra a zdroje

• TIA Portal Module 010-010 Startup Programming of the SIMATIC S7-1200

Page 3: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

Obsah tematického celku

• Vývojové prostredie STEP 7 – inštalácia a pripojenie PLC (M010 1-4)

• Použitie PLC, proces riadenia, adresovanie I/O, logické operácie (M010 5)

• Konfigurácia a činnosť PLC (M010 6)

• Vytvorenie prvého projektu – riadenie lisu (M010 7-8)

Page 4: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

VÝVOJOVÉ PROSTREDIE STEP 7 – INŠTALÁCIA A PRIPOJENIE PLC

Page 5: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

Programming Software STEP Professional V13 (TIA Portal V13)

• programming tool for the following automation systems

– SIMATIC S7-1200, 1500

– SIMATIC S7-300

– SIMATIC S7-400

– SIMATIC WinAC

Page 6: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

Programming Software STEP Professional V13 (TIA Portal V13)

• Functions – Configuring and parameterizing the hardware

– Defining the communication

– Programming

– Testing, commissioning and service with the operating/diagnostic functions

– Documentation

– Generating the visual displays for the SIMATIC basic panels with the integrated WinCC Basic

– All functions are supported with detailed online help.

Page 7: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

Installing the TIA Portal V13

• medium - DVD, internet

• standard install procedure

• license key is needed on your computer – This license key can be transferred in the course of

installation from a USB stick that is included to your computer. Subsequently it is possible to move this license key to another data carriers using the software ‘Automation License Manager’.

Page 8: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

Installing current Updates for TIA Portal V13

• TIA Portal V13 is updated frequently to optimally integrate new products

• installing current Updates for TIA Portal V13 (last SP1 upd. 5)

• link to the webpage: https://support.industry.siemens.com/cs/products?dtp=Download&pnid=14340&lc=en-WW

Page 9: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

Information about installed software

• Select the item “Installed software” in the TIA Portal

• Detailed information about installed software

• Installation of support packages

Page 10: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

Connecting to the CPU

• To program the SIMATIC S7-1200 from the PC you need a TCP/IP connection – set the computer’s IP address

• Windows (Start - Settings - System control - Network connections - Local Area Connection – Properties - Internet Protocol (TCP/IP)) (IP address: 192.168.0.99 Subnet mask: 255.255.255.0)

– set the SIMATIC S7-1200 IP address • TIA Portal (Online & Diagnosis - Project view - Online

accesses - … Network Connection - Update accessible devices - MAC= ….. - Online & diagnostics) (under Functions - Assign IP address - IP address: 192.168.0.1 - Subnet mask: 255.255.255.0 - Assign IP address)

Page 11: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

Reset CPU to factory settings

• TIA Portal (Online & Diagnosis - Project view - Online accesses - … Network Connection - Update accessible devices - MAC= ….. - Online & diagnostics)

– Under ’Functions’, select ’Reset to factory settings’ (Functions - Reset to factory settings - Keep IP address - Reset)

Page 12: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

POUŽITIE PLC, PROCES RIADENIA, ADRESOVANIE I/O, LOGICKÉ OPERÁCIE

Page 13: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

What is a PLC and what are PLCs Used For?

• PLC - Programmable Logic Controller

• device that controls a process

– printing press for printing newspapers, a filling plant for filling cement in bags, a press for forming plastic shapes, etc....

– instructions of a program that is located in the memory of the device

Page 14: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block
Page 15: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

How does the PLC Control the Process?

• through the PLC connections called outputs (actuators)

– control voltage of 24V

– switching motors on and off, opening and closing valves, turning lamps on and off

Page 16: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

How does the PLC Get the Information about the Process States?

• from the so-called signal transmitters that are wired to the inputs of the PLC

– sensors that recognize whether a work piece is in a certain position, or they can be simple switches and pushbuttons that may be open or closed

Page 17: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

Break Contact Elements and Make Contact Elements

• break contacts

• make contacts

Page 18: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

Address Individual Input/Output Signals

6

Page 19: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

How is the Program Processed in the PLC?

process image of the inputs (PII) process image of the outputs (PIQ)

Page 20: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

Logic Operations in the PLC Program

• Logic operations are used to specify conditions for switching an output.

• Programming languages

– Ladder Diagram (LAD)

– Function Block Diagram (FBD)

Page 21: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

AND Operation

Page 22: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

AND Operation

AND logic in the FBD

Page 23: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

OR Operation

Page 24: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

OR Operation

OR operation in the FBD

Page 25: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

Negation

Page 26: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

How is the PLC Program generated?

• PLC program is generated on a PC using the software STEP 7

• PC is connected with the TCP/IP interface of the PLC

• program can be transferred with a load function to the PLC’s memory

• PC is no longer needed for further program processing in the PLC

Page 27: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

How is the PLC Program generated?

Page 28: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

KONFIGURÁCIA A ČINNOSŤ PLC

Page 29: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

Module Spectrum

• SIMATIC S7-1200 is a modular automation system

• Central modules CPU with different capacity, integrated inputs/outputs and PROFINET interface

Page 30: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

Module Spectrum

• Power supply PM

• Signal boards SB for adding analog or digital inputs/outputs (CPU 1211, 1212, 1214)

Page 31: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

Module Spectrum

• Signal modules SM for digital and analog inputs and outputs

• Communication modules CM for serial communication RS 232/RS 485

Page 32: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

Module Spectrum

• Compact Switch Module CSM with 4x RJ45 socket connectors 10/100 Mbps

• SIMATIC memory cards 2MB or 24MB for storing program data

Page 33: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

Operating Modes of the CPU

• Operating Modes – STOP - CPU does not execute the program, and

you can load a project

– STARTUP - CPU performs a startup

– RUN - program is executed cyclically, projects cannot be loaded in the CPU’s RUN mode

• CPU does not have a physical switch for changing the operating mode

Page 34: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

Operating Modes of the CPU

• The operating mode (STOP or RUN) is changed on the operator panel of the software STEP7

– button MRES to perform a general memory reset and displays the status LEDs of the CPU.

Page 35: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

Operating Modes of the CPU

LEDs for ERROR to indicate errors and MAINT to indicate that maintenance

Page 36: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

VYTVORENIE PRVÉHO PROJEKTU – RIADENIE LISU

Page 37: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

Riadenie lisu - zadanie

Page 38: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

Riadenie lisu - zadanie

• Lis je vybavený bezpečnostnou klietkou • Tlačidlo ŠTART S3 aktivuje lis ak je uzavretý klietkou • Poloha klietky je sledovaná senzorom uzatvorenia

bezpečnostnej klietky B1 • Lis je riadený cez 5/2-cestný hydraulický ventil M0 (privádza

tlakové médium na lisovaciu matricu, ktorá vylisuje výrobok)

• Lis sa automaticky zdvihne ak je splnená niektorá z podmienok: – je stlačené Havarijne STOP tlačidlo EMERGENCI OFF – snímač klietky je rozpojený B1 – lis sa dostal to krajnej polohy vysunutia, čo signalizuje senzor

polohy B2

Page 39: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

Riadenie lisu - zadanie

Page 40: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

Riadenie lisu - zadanie

Page 41: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

Riadenie lisu - riešenie

1. Vytvorenie nového projektu „Riadenie lisu“

2. Konfigurácia CPU

3. Konfigurácia PROFINET rozhrania

4. Spojiť CPU s TIA portálom

5. Nadefinovať symbolické mená pre vstupy a výstupy (tag)

Page 42: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

Riadenie lisu - riešenie

Page 43: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

Riadenie lisu - riešenie

• Program je napísaný v blokoch

• Organizačné blok OB1 sa generuje automaticky – predstavuje rozhranie operačného systému CPU

– spracováva sa cyklicky

• Z OB1 sa môžu volať ďalšie bloky - štruktúrované programovanie (funkcia FC1)

• Účelom je rozdeliť celkovú úlohu do čiastkových úloh – umožňuje to zjednodušiť riešenie a testovanie

funkčnosti

Page 44: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

Riadenie lisu - riešenie

• Logika riadenia lisu bude uložená vo funkcii FC1 – program lisu

• Deklarujeme premenné funkcie (block interface)

Page 45: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

Riadenie lisu - riešenie

Page 46: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

Riadenie lisu - riešenie

• Deklarujeme premenné pre FC1

Page 47: PLC Siemens SIMATIC S7-1200 - files.jozefklus.webnode.skfiles.jozefklus.webnode.sk/200000199-250382552b/01 - Úvod do... · –SIMATIC S7-300 –SIMATIC S7-400 ... –Function Block

Riadenie lisu - riešenie

• Vytvoríme logiku pre FC1

• Prostredníctvom S a R operácie priraďujeme hodnotu do premennej cylinder_out_in

• FC1 vložíme do OB1 a vstupy a výstup prepojíme na pomenované vstupy CPU

• uložíme projekt

• vložíme aplikácie do CPU

• otestujeme aplikáciu


Top Related