plc siemens simatic s7-1200 -...

Post on 24-Jun-2018

357 Views

Category:

Documents

16 Downloads

Preview:

Click to see full reader

TRANSCRIPT

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

Ing. Jozef Klus

Literatúra a zdroje

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

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)

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

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

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.

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’.

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

Information about installed software

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

• Detailed information about installed software

• Installation of support packages

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)

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)

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

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

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

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

Break Contact Elements and Make Contact Elements

• break contacts

• make contacts

Address Individual Input/Output Signals

6

How is the Program Processed in the PLC?

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

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)

AND Operation

AND Operation

AND logic in the FBD

OR Operation

OR Operation

OR operation in the FBD

Negation

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

How is the PLC Program generated?

KONFIGURÁCIA A ČINNOSŤ PLC

Module Spectrum

• SIMATIC S7-1200 is a modular automation system

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

Module Spectrum

• Power supply PM

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

Module Spectrum

• Signal modules SM for digital and analog inputs and outputs

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

Module Spectrum

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

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

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

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.

Operating Modes of the CPU

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

VYTVORENIE PRVÉHO PROJEKTU – RIADENIE LISU

Riadenie lisu - zadanie

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

Riadenie lisu - zadanie

Riadenie lisu - zadanie

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)

Riadenie lisu - riešenie

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

Riadenie lisu - riešenie

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

• Deklarujeme premenné funkcie (block interface)

Riadenie lisu - riešenie

Riadenie lisu - riešenie

• Deklarujeme premenné pre FC1

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