beckhoff · TwinCAT 3 · 266 pp.

Beckhoff TwinCAT 3 Basics Manual — Real-Time, Tasks & ADS — Operation manual

Руководство по основам TwinCAT 3: реальное время и задачи, целевые системы, маршрутизация (ADS, AmsNAT, ADS-over-MQTT, Secure ADS), типы файлов и проектов, система типов и TcCOM-модули.

Related manuals

Contents

Document text

Table of contents

Table of contents Table of contents 1 Foreword.................................................................................................................................................... 5 1.1 Notes on the documentation ............................................................................................................. 5 1.2 For your safety .................................................................................................................................. 6 1.3 Notes on information security............................................................................................................

7 2 Real-Time ................................................................................................................................................... 8 2.1 Tasks............................................................................................................................................... 12 2.1.1 TwinCAT Task.................................................................................................................. 12 2.1.2 TwinCAT Task with Image ...............................................................................................

13 2.1.3 TwinCAT Job Task (Worker Task)................................................................................... 13 2.1.4 I/O Idle Task..................................................................................................................... 14 2.1.5 PLC-AuxTask................................................................................................................... 14 2.2 Core Boost ......................................................................................................................................

15 2.3 Core Memory .................................................................................................................................. 16 3 Target systems........................................................................................................................................ 18 3.1 Boot directory .................................................................................................................................. 18 3.2 Routing............................................................................................................................................

18 3.2.1 ADS.................................................................................................................................. 19 3.2.2 AmsNAT......................................................................................................................... 175 3.2.3 ADS-over-MQTT ............................................................................................................ 179 3.2.4 Secure ADS ................................................................................................................... 191 3.3 Folder and file types......................................................................................................................

203 3.3.1 TwinCAT PLC project files ............................................................................................. 203 3.3.2 TwinCAT C++ project files ............................................................................................. 209 3.3.3 TwinCAT project files ..................................................................................................... 212 3.3.4 PLC HMI files ................................................................................................................. 212 3.3.5 PLC HMI files (Target Visualization) ..............................................................................

213 3.3.6 PLC HMI Web files......................................................................................................... 213 3.4 Machine update at file level........................................................................................................... 214 3.4.1 Overview ........................................................................................................................ 214 3.4.2 Performing a PLC update............................................................................................... 215 3.4.3 Performing a C++ Update ..............................................................................................

215 3.4.4 Performing an update of the complete machine ............................................................ 216 3.4.5 Cloning a machine ......................................................................................................... 216 3.5 Starting the program automatically ............................................................................................... 216 3.6 Corrected time stamps .................................................................................................................. 217 3.6.1 Overview ........................................................................................................................

217 3.6.2 System requirements ..................................................................................................... 218 3.6.3 Limitations...................................................................................................................... 218 3.6.4 Technical introduction .................................................................................................... 219 3.6.5 Real-time API................................................................................................................. 227 3.6.6 ADS API.........................................................................................................................

231 3.6.7 Samples ......................................................................................................................... 232 3.6.8 FAQ................................................................................................................................ 235 3.7 TcRTeInstall .................................................................................................................................. 236 TwinCAT 3 3 Version: 1.3.2

Page 3

Table of contents

Table of contents 4 Type system .......................................................................................................................................... 241 4.1 Project-based type system............................................................................................................ 241 4.2 Data types ..................................................................................................................................... 241 4.3 Handling of data types ..................................................................................................................

242 4.4 Management and identification of data types................................................................................ 244 4.5 Alignment of data types................................................................................................................. 245 4.6 Files in connection with the type system....................................................................................... 246 5 TcCom modules .................................................................................................................................... 248 5.1 The TwinCAT Component Object Model (TcCOM) concept .........................................................

248 5.1.1 TwinCAT module properties........................................................................................... 250 5.1.2 TwinCAT module state machine .................................................................................... 257 5.2 Handling TcCom modules............................................................................................................. 259 5.2.1 Object tab....................................................................................................................... 259 5.2.2 Context tab.....................................................................................................................

260 5.2.3 Parameter (Init) tab ........................................................................................................ 261 5.2.4 Parameter (Online) tab................................................................................................... 261 5.2.5 Data Area tab................................................................................................................. 262 5.2.6 Interfaces tab ................................................................................................................. 263 6 Support and Service .............................................................................................................................

264 TwinCAT 3 4 Version: 1.3.2

Page 4

1.1 Notes on the documentation

Foreword | Notes on the documentation 1 Foreword | Foreword 1.1 Notes on the documentation | Notes on the documentation This description is intended exclusively for trained specialists in control and automation technology who are familiar with the applicable national standards. The documentation and the following notes and explanations must be complied with when installing and commissioning the components. The trained specialists must always use the current valid documentation. The trained specialists must ensure that the application and use of the products described is in line with all safety requirements, including all relevant laws, regulations, guidelines, and standards.

Disclaimer The documentation has been compiled 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 notice. Claims to modify products that have already been supplied may not be made on the basis of the data, diagrams, and descriptions in this documentation. Trademarks Beckhoff ® , ATRO ® , EtherCAT ® , EtherCAT G ® , EtherCAT G10 ® , EtherCAT P ® , MX-System ® , Safety over EtherCAT ® , TC/BSD ® , TwinCAT ® , TwinCAT/BSD ® , TwinSAFE ® , XFC ® , XPlanar ® , and XTS ® are registered and licensed trademarks of Beckhoff Automation GmbH.

If third parties make use of the designations or trademarks contained in this publication for their own purposes, this could infringe upon the rights of the owners of the said designations. EtherCAT ® is a registered trademark and patented technology, licensed by Beckhoff Automation GmbH, Germany. Copyright © Beckhoff Automation GmbH & Co. KG, Germany. The distribution and reproduction of this document, as well as the use and communication of its contents without express authorization, are prohibited. Offenders will be held liable for the payment of damages. All rights reserved in the event that a patent, utility model, or design are registered.

Third-party trademarks Trademarks of third parties may be used in this documentation. You can find the trademark notices here: https://www.beckhoff.com/trademarks . TwinCAT 3 5 Version: 1.3.2

Page 5

1.2 For your safety

Foreword | For your safety 1.2 For your safety | For your safety Safety regulations Read the following explanations for your safety. Always observe and follow product-specific safety instructions, which you may find at the appropriate places in this document. Exclusion of liability All the components are supplied in particular hardware and software configurations which are 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 technology who are familiar with the applicable national standards. Signal words The signal words used in the documentation are classified below. In order to prevent injury and damage to persons and property, read and follow the safety and warning notices. Personal injury warnings Hazard with high risk of death or serious injury. DANGER Hazard with medium risk of death or serious injury. WARNING There is a low-risk hazard that could result in medium or minor injury. CAUTION Warning of damage to property or environment NOTICE The environment, equipment, or data may be damaged.

Information on handling the product This information includes, for example: recommendations for action, assistance or further information on the product. TwinCAT 3 6 Version: 1.3.2

Page 6