beckhoff · TwinCAT 2 PLC Control · 341 pp.
Beckhoff TwinCAT 2 PLC Control Manual (EN) — User Guide PDF
Related manuals
Contents
Document text
1.1 Notes on the documentation
Foreword 1 Foreword 1.1 Notes on the documentation This description is only intended for the use of trained specialists in control and automation engineering who are familiar with applicable national standards. It is essential that the documentation and the following notes and explanations are followed when installing and commissioning the components. It is the duty of the technical personnel to use the documentation published at the respective time of each installation and commissioning. The responsible staff must ensure that the application or use of the products described satisfy all the requirements for safety, including all the relevant laws, regulations, guidelines and standards.
Disclaimer The documentation has been prepared with care. The products described are, however, constantly under development. We reserve the right to revise and change the documentation at any time and without prior announcement. No claims for the modification of products that have already been supplied may be made on the basis of the data, diagrams and descriptions in this documentation. Trademarks Beckhoff ® , TwinCAT ® , TwinCAT/BSD ® , TC/BSD ® , EtherCAT ® , EtherCAT G ® , EtherCAT G10 ® , EtherCAT P ® , Safety over EtherCAT ® , TwinSAFE ® , XFC ® , XTS ® and XPlanar ® are registered trademarks of and licensed by Beckhoff Automation GmbH.
Other designations used in this publication may be trademarks whose use by third parties for their own purposes could violate the rights of the owners. Patent Pending The EtherCAT Technology is covered, including but not limited to the following patent applications and patents: EP1590927, EP1789857, EP1456722, EP2137893, DE102015105702 with corresponding applications or registrations in various other countries. EtherCAT ® is a registered trademark and patented technology, licensed by Beckhoff Automation GmbH, Germany Copyright © Beckhoff Automation GmbH & Co. KG, Germany.
The reproduction, distribution and utilization of this document as well as the communication of its contents to others without express authorization are prohibited. Offenders will be held liable for the payment of damages. All rights reserved in the event of the grant of a patent, utility model or design. TwinCAT 2 PLC Control 3 Version: 1.0
1.2 Safety instructions
Foreword 1.2 Safety instructions Safety regulations Please note the following safety instructions and explanations! Product-specific safety instructions can be found on following pages or in the areas mounting, wiring, commissioning etc. Exclusion of liability All the components are supplied in particular hardware and software configurations appropriate for the application. Modifications to hardware or software configurations other than those described in the documentation are not permitted, and nullify the liability of Beckhoff Automation GmbH & Co. KG.
Personnel qualification This description is only intended for trained specialists in control, automation and drive engineering who are familiar with the applicable national standards. Description of symbols In this documentation the following symbols are used with an accompanying safety instruction or note. The safety instructions must be read carefully and followed without fail! DANGER Serious risk of injury! Failure to follow the safety instructions associated with this symbol directly endangers the life and health of persons. WARNING Risk of injury! Failure to follow the safety instructions associated with this symbol endangers the life and health of per- sons. Personal injuries!
CAUTION Failure to follow the safety instructions associated with this symbol can lead to injuries to persons. NOTE Damage to the environment or devices Failure to follow the instructions associated with this symbol can lead to damage to the environment or equipment. Tip or pointer This symbol indicates information that contributes to better understanding. TwinCAT 2 PLC Control 4 Version: 1.0
1.3 Notes on information security
Foreword 1.3 Notes on information security The products of Beckhoff Automation GmbH & Co. KG (Beckhoff), insofar as they can be accessed online, are equipped with security functions that support the secure operation of plants, systems, machines and networks. Despite the security functions, the creation, implementation and constant updating of a holistic security concept for the operation are necessary to protect the respective plant, system, machine and networks against cyber threats. The products sold by Beckhoff are only part of the overall security concept. The customer is responsible for preventing unauthorized access by third parties to its equipment, systems, machines and networks.
The latter should be connected to the corporate network or the Internet only if appropriate protective measures have been set up. In addition, the recommendations from Beckhoff regarding appropriate protective measures should be observed. Further information regarding information security and industrial security can be found in our https://www.beckhoff.com/secguide . Beckhoff products and solutions undergo continuous further development. This also applies to security functions. In light of this continuous further development, Beckhoff expressly recommends that the products are kept up to date at all times and that updates are installed for the products once they have been made available.
Using outdated or unsupported product versions can increase the risk of cyber threats. To stay informed about information security for Beckhoff products, subscribe to the RSS feed at https:// www.beckhoff.com/secinfo . TwinCAT 2 PLC Control 5 Version: 1.0
Table of contents
Table of contents Table of contents 1 Foreword.................................................................................................................................................... 3 1.1 Notes on the documentation ............................................................................................................. 3 1.2 Safety instructions............................................................................................................................. 4 1.3 Notes on information security............................................................................................................
5 2 A Brief Introduction to TwinCAT PLC Control........................................................................................ 9 2.1 Project Components........................................................................................................................ 10 2.2 Languages ...................................................................................................................................... 16 2.2.1 Programming Languages................................................................................................. 16 2.2.2 Instruction List (IL)............................................................................................................
16 2.2.3 Structured Text (ST)......................................................................................................... 18 2.2.4 Sequential Function Chart (SFC)..................................................................................... 24 2.2.5 Function Block Diagram (FBD) ........................................................................................ 28 2.2.6 The Continuous Function Chart Editor (CFC).................................................................. 28 2.2.7 Ladderdiagram (LD).........................................................................................................
29 2.2.8 Debugging, Online Functions........................................................................................... 30 2.2.9 IEC 61131-3..................................................................................................................... 31 3 Sample Program...................................................................................................................................... 33 4 Individual Components...........................................................................................................................
42 4.1 The Main Window ........................................................................................................................... 42 4.2 Options............................................................................................................................................ 44 4.3 Managing Projects .......................................................................................................................... 67 4.4 Objects ............................................................................................................................................
88 4.5 Editing Functions........................................................................................................................... 100 4.6 Online Functions ........................................................................................................................... 104 4.7 Windows........................................................................................................................................ 113 4.8 Help System..................................................................................................................................
114 4.9 Log ................................................................................................................................................ 114 5 Editors.................................................................................................................................................... 116 5.1 Declaration Editor.......................................................................................................................... 117 5.2 Text Editors ...................................................................................................................................
127 5.3 Instruction List Editor..................................................................................................................... 130 5.4 Structured Text Editor ................................................................................................................... 130 5.5 Graphical Editors........................................................................................................................... 131 5.6 Function Block Diagram Editor......................................................................................................
133 5.7 Ladder Diagram Editor .................................................................................................................. 137 5.8 Continuous Function Chart Editor (CFC) ...................................................................................... 142 5.9 Sequential Function Chart Editor .................................................................................................. 153 6 Ressources............................................................................................................................................
162 6.1 Global Variables............................................................................................................................ 162 6.2 Alarm Configuration ...................................................................................................................... 165 6.2.1 Alarm system, Terms ..................................................................................................... 166 6.2.2 Alarm classes.................................................................................................................
167 6.2.3 Alarm groups.................................................................................................................. 170 TwinCAT 2 PLC Control 6 Version: 1.0