83
TwinCAT 3 16.04.2013 1 引领自动化发展新方向 TwinCAT 3 TwinCAT3

TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

  • Upload
    lamtruc

  • View
    249

  • Download
    13

Embed Size (px)

Citation preview

Page 1: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinCAT 3 16.04.2013 1

引领自动化发展新方向TwinCAT 3

TwinCAT3

Page 2: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

产品概览 2013/4/16 2

Beckhoff 产品概览

现场总线

• EtherCAT• LightBus• …

自动化软件

• TwinCAT 2• TwinCAT 3…

运动控制

• AX 5000• AM 3000• …

PC控制

• 工控机

• 嵌入式PC

TwinCAT 3

Page 3: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

1986

S1000PLC/NC on PC

PC-based Control – 历程

PC ControlPC-compatible machine control

1988 1989 1995 1996 2003 2008 2011

Lightbus Bus Terminal通用的总线端子模块

TwinCATIEC 61131 实时软PLC

EtherCAT实时以太网总线

XFC技术控制技术

1993

S2000PLC/NC/CNCon PC

TwinCAT3

2013/4/16 3

TwinCAT 3

Page 4: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

Information Technology (IT)Information Technology (IT)Automation Technology (AT)Automation Technology (AT) PC- based ControlPC- based Control

技术的整合19

8619

8619

9619

9620

0320

0320

1120

11

Special RTOS

+

+

+

2013/4/16 4

TwinCAT 3

TwinCAT 3+Automation Engineering Tools

Standard IDE

Page 5: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

PC 实时控制技术

TwinCAT 3

PC 控制技术概述

Page 6: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

产品概览 2013/4/16 6

结构比较: 传统方式与PC控制技术

DUDU... ...

32   \ 32   \

IPC可视化界面

控制

PLC NCSteuerung

DUDU

SPS NC

...

I/O                  驱动单元

现场总线

IPC

可视化界面

PLC NC

IPC

I/Ofor PLC

伺服, FI,继电器

位置测量 3 相电机

v

s

可视化界面

驱动单元

IEC61131-3 PLC NC运动控制

IO

在自动化结构中, IPC• 实现操作员界面• 处理 HMI 程序并完成通信任务• 在三个系统中它的CPU功能最强

PLC和NC运行在PC上• 充分利用CPU计算能力• 结构集中,接口少,效率高• 现场部件通常是非智能型的,不用设置即可被容易地更换

TwinCAT 3

Page 7: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

产品概览 2013/4/16 7

TwinCAT 3

WINDOWS 的时钟

Page 8: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

产品概览 2013/4/16 8

TwinCAT 3

TWINCAT 的时钟

Page 9: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

产品概览 2013/4/16 9

TwinCAT 3

TWINCAT 测试图表

Page 10: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

产品概览 2013/4/16 10

比较: 传统 PLC与软PLC的运行模式

标准 PLC上 一个程序的实时运行

PLC 周期 PLC 周期

读输

程序

运算

写输

读输

程序

运算

写输

t

PC 上 一个 PLC 程序的实时运行

PLC 周期 PLC 周期

读输

程序

运算

写输

Win

dow

s N

T和

HM

I 程序

读输

程序

运算

程序

运算

读输

写输

t

Win

dow

s N

T和H

MI程

TwinCAT 3

Page 11: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

产品概览 2013/4/16 11

在PC上运行PLC和NC

PLC 任务 和 NC 任务定时地通过多任务去运行 周期性地获取操作系统的计算时间

Windows NT和 HMI程序

NC 服务PLC 服务

在PC 上 一个 PLC 程序和 NC 控制的实时运行

PLC 周期 (例如. 2ms) PLC 周期 t

t

NC 周期 (例如. 1ms) NC 周期 NC 周期 NC 周期

1ms 2ms 3ms 4ms 5ms例如.

TwinCAT 3

Page 12: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

产品概览 2013/4/16 12

The Windows Control and Automation Technology

特点:• 不改变 Windows• 无需PC外的其他硬件• 将标准Windows变成实时操作系统• 循环时间可短至50微秒、强制优先排序• 完全支持浮点单元 (FPU)�

硬件平台• PC� 高性能、高精度的控制任务• CX� 适用于中大型复杂控制任务• BX� 适用于中等规模控制任务• BC� 适用于小规模控制任务

软件平台• XP/XPE/WIN�7/WES7/CE6/CE7等

通讯• 可通过OCX,�Dll 访问 Windows用户界面• 可通过TCP/IP�\OPC等实现远程访问

TwinCAT 3

Page 13: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

通过ADS和第三方软件通信

多轴的点对点运动控制

带插补的轴运算

标准和快速PLC控制,达到50微秒级控制精度

安全系统的控制

远程监控和控制

人机

界面

和数

据传

Twincat 2的简单回顾TwinCAT 3

Page 14: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinCAT 3 功能介绍

TwinCAT 3

TwinCAT 3 功能介绍

Page 15: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

实时和非实时的程序统一开发

对第三方软件和硬件设备的良好支持

更多编程语言的支持

最先进的IT技术和硬件技术的支持

项目的移植和并行开发

减少硬件和软件接口

一个

软件

/一个

工具

功能的延伸TwinCAT 3

Page 16: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

倍福PC控制技术: 在自动化控制行业树立新的标准

PC-Hardware

Feldbus

TwinCAT-Software

I/O TwinSAFE PLC Control Control(PID)

Connectivity

NC PTP CNC Robotics MeasurementTechnology

NC I

Base

Motion

倍福PC控制系统TwinCAT 3

Page 17: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinCAT 3:新解决方案TwinCAT 3

Page 18: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

架构 (XAA)

23.05.2012TwinCAT 3 | Overview 18

TwinCAT 3eXtended

Automation (XA)

eXtendedAutomation

Runtime (XAR)

eXtendedAutomation

Engineering (XAE)

Modular runtime system

TcC

OM PLC Safety

TcC

OM NC

TcC

OM

C++Module

TcC

OM …

TcC

OM

TwinCAT 3 development environment based on Visual Studio® 2010

TwinCAT 3Standard

Visual Studio®

2010 Shell

TwinCAT 3Integrated

Visual Studio®

2010

eXtendedArchitecture (XAA)

TwinCAT 3

Page 19: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinCAT 3 19

软件架构

eXtendedAutomation�Engineering�(XAE)把所有的工具集成在 VS�2010这个框架中

TwinCAT 3 Engineering Environment based on Visual Studio®

TwinCAT Transport Layer - ADS

TwinCAT 3 Runtime

Real-time Kernel

TcC

OM PLCPLC PLCSafety

TcC

OM PLCNC

TcC

OM PLCC

Module

TcC

OM

PLCCNC

TcC

OM PLCC++

Module

TcC

OM

TcC

OM PLCPLC

TwinCAT Automation Device Driver - ADD

PC System

Fieldbus

System Manager- Configuration

Programming- IEC 61131-3- objectoriented extensions- C/C++

PLC

TcC

OM Simulink®

Module

Windows 32/64 bit

eXtendedAutomation�Runtime�(XAR)

TwinCAT 3

Page 20: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

eXtended Automation Engineering (工程管理)

eXtended Automation Runtime (XAR)

System�Manager� IEC�61131-3 Motion�Control C/C++�programming� Matlab® integration C#/.NET�programming Visual Studio�Shell

实时核的运行

运行相关的控制模块

支持多核系统

支持32�/�64位 操作系统

TwinCAT 3�组件

TwinCAT 3 组件TwinCAT 3

Page 21: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

Architecture (XAA) - notebook example (XAE) CX 

23.05.2012TwinCAT 3 | Overview

eXtendedAutomation

Engineering (XAE)

TwinCAT 3 development environment Visual Studio® 2010

TwinCAT 3Standard

Visual Studio®

2010 Shell

TwinCAT 3Integrated

Visual Studio®

2010

eXtendedAutomation

Runtime (XAR)

TwinCAT 3

Page 22: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinCAT 3

TwinCAT 3 对 IT技术的支持

• 多核CPU的支持

• 大内存的利用(无限的任务分配)

• 第三方硬件设备的支持

• 64位操作系统的支持

Page 23: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinCAT 3 23

TwinCAT 3 – 多核系统的支持TwinCAT 3

Page 24: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

eXtended Automation Runtime (XAR)

Support of multi-core systems

把不同的任务分配到不同的核中 (�PLC,�NC,�运动控制,人机界面)�每个核的时基可以分别设置每个任务的周期可以分别设置

2013/4/16 24

TwinCAT 3

Page 25: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinCAT 3 25

Runtime (XAR)

Enables cores for real-time usage

Defines the base time for a core

Defines the CPU-usage limit

Assignment of a task to a CPU

TwinCAT 3

Page 26: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinCAT 3 26

测试报告

Testcase hardware: Intel® Core i7 950 4 physical core CPU at 3.07 GHz Nvidia 9800 graphic adapter

Testcase software: 4 PLC runtime systems each PLC runtime mapped to one CPU core all PLC runtimes execute identical

benchmark software

Execution time for 1000 PLC commands (µs)

Result: TwinCAT Multicore technology increases PLC power, linear

related to the number of CPU cores PC Control enables future CPU development for automation

applications

Core0 Core1 Core2 Core3bool 0.887 0.894 0.898 0.895byte 0.672 0.682 0.681 0.688word 0.613 0.614 0.626 0.617

dword 0.575 0.583 0.583 0.583sint 3.463 3.472 3.473 3.474int 3.473 3.484 3.482 3.482

dint 3.487 3.497 3.491 3.496real 1.813 1.822 1.818 1.820lreal 4.761 4.769 4.770 4.769

TwinCAT 3

Page 27: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinCAT 3 27

TwinCAT 3 强大的硬件支持

Multiple PLC projects:• number�of�possible�tasks:�65,000�(instead�of�4�x�4�in�TwinCAT 2)

多达65000个TASK分配

• number�of�PLC�projects:�only�limited�by�memory�(instead�of�4�in�TwinCAT 2)无限的PLC项目分配,只是受限于内存大小

• 支持64位操作系统

TwinCAT 3

Page 28: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

eXtended Automation Runtime (XAR)

ADS-communicationcaption:

communication

Automation Device Driver (ADD)扩展设备底层驱动(Automation Device Drivers – ADD)

-Drivers for- 新的现场总线- 特殊的协议- 特殊的硬件

-完全集成到TwinCAT 中-可以由用户自己编写

例如: 客户需要集成自己的PCI-E卡到TwinCAT中

16.04.2013 28

TwinCAT 3

Page 29: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinCAT 3

TwinCAT 3 统一的开发平台

• 满足客户精简开发环境需要

• 支持客户多语言编程需求

• 对面向对象编程的支持

• 支持人机界面同一个平台开发

• 支持项目并行开发

• 更多的功能库

• 支持系统仿真

Page 30: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

Visual StudioWindows

TwinCAT 3

实时核

+

一个工具/一个平台TwinCAT 3

Page 31: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

一个工具/一个平台TwinCAT 3

Page 32: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

选择VS的理由

TwinCAT 3 framework = Microsoft Visual Studio 2010

使用最流行的编程环境

可扩展的插件

Link�to�流行的控制软件

支持高级语言工程师利用 C�和 C++�来进行自动化编程

利用 .NET�编写非实时应用程序 (e.g.�HMI)

2013/4/16 32

TwinCAT 3

Page 33: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinCAT 3 33

TwinCAT 系统配置预览

系统配置

运动控制配置

PLC编程和配置

安全PLC的编程和配置

C/�C++�程序的编程和配置

组态配置

TwinCAT 3

Page 34: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinCAT 3 Engineering Environment based on Visual Studio®

System�ManagerConfiguration– I/O– PLC– C/C++– MC– NC– CNC– Safety– others

Programming

IEC�61131 Object-orientedextensions

IEC�Compiler

TwinCAT 3 Runtime

TwinCAT�Transport�Layer�– ADS

Nonreal-time

C#.NET

Real-time

C/C++

Matlab®/Simulink

Real-timeWorkshop

Microsoft�C�Compiler

Third-party�programming�tool

C/C++

整体架构TwinCAT 3

Page 35: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinCAT 3 PLC – IEC61131-3 增加面向对象编程

增加面向对象编程的优势增加程序可读性,把算法封装到方法中 增加可维护性

模块化,结构化 增加重复利用性

使用接口进行抽象编程 提升扩展性能和适应性能

继承性在一个已经存在的类的基础之上来进行

使用面向对象编程:提升软件质量减少编程和维护时间

16.04.2013 35

TwinCAT 3

Page 36: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

OOP = intellectual manageability

Object Oriented Programming

16.04.2013 36

TwinCAT 3

Page 37: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

Object1

Data1+Procedures1

DataObject3

Data3 + Procedures3

Object2

Data2 + Procedures2

Object4

Data4 + Procedures4

Object Oriented Programming

16.04.2013 37

TwinCAT 3

Page 38: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

Seven new keywords: METHOD : Action on FB with own variables

PROPERTY: POE-Pair for Set/Get of attribute

THIS, SUPER : in Method/Property for the current FB-instance

EXTENDS : Inheritance between FBs

INTERFACE : defines abstract object-type (FB without implementation)

IMPLEMENTS in the FB: Instances over named interface callable

Call-syntax for methods:

Object.Methodname(…)

Special methods:

FB_Init, FB_Exit, FB_Reinit

Object Oriented Extensions to IEC61131

16.04.2013 38

TwinCAT 3

Page 39: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinCAT 3 39

Object-orientation by the IEC 61131-3 3rd edition

Multi-language support + + - - -

Classes ~ (FB) + + + +

Interfaces - + - + +

Polymorphism - + +/- + +

Constructor/destructor - + + + +

Visibility ~ (variables) ~ (variables) + + +

Language features 2nd editionIEC 61131-3

3rd editionIEC 61131-3

C++ Java C#

Mixed programming OO/proc. - + + - -

Methods ~ (actions) + + + +

Partial abstract classes - - + + +

Reference semantics - + (interfaces) - + +

Properties - + - - +

Dyn.�memory�(“new”) - - (in TwinCAT 3) + + +

TwinCAT 3

Page 40: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

Object Oriented Extensions to IEC61131

Object oriented extensions of the IEC 61131-3 3rd edition:

Concept of the function blocks was extended by Classes Interfaces Methods Inheritance Properties Key words THIS, SUPER

Usage of the extensions Is possible in all IEC languages Independent from the used hardware Not mandatory

16.04.2013 40

TwinCAT 3

Page 41: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

Object-orientation with the IEC61131-3 3rd edition

Example: Cylinder

Definition of an method in ICylinder:

16.04.2013 41

TwinCAT 3

Page 42: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

Object-orientation with the IEC61131-3 3rd edition

Example: Cylinder

Definition of an abstract upper-class (interface) ICylinder:

Neither data nor implementation will be defined in this step!

16.04.2013 42

TwinCAT 3

Page 43: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

Object-orientation with the IEC61131-3 3rd edition

Example: Cylinder

Definition of a basic function block:

16.04.2013 43

TwinCAT 3

Language of Method

Language of Body

Page 44: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

Object-orientation with the IEC61131-3 3rd edition

Example: Cylinder

Definition of a function block, which implements the interface

Basic function block for a cylinder with all of the necessary functions.

16.04.2013 44

TwinCAT 3

Page 45: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

Example: Cylinder

Tasks:- Cylinder FB should have same look and feel- Same behavior- Special: Cylinder with diagnosis

OOA Example

16.04.2013 45

TwinCAT 3

retracted

Moves in

extended

Moves out

bMoveIN := TRUE

bMoveOut := TRUE

bSensFront := TRUEbMoveOut := FALSE

bSensBack := TRUEbMoveIn := FALSE

Page 46: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

运动控制的应用

TwinCAT 3

运动控制的应用

Page 47: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinCAT 3 47

TwinCAT 3 运动控制系统

可扩展的解决方案(从步进到伺服驱动) 分层的控制理念,硬件,总线和软件独立

从机械到电子的转变(飞锯,电子凸轮,电子齿轮,电子离合)

优点: 技术选择上更加灵活 产品选型上更加方便 减少系统交货和开发周期 降低系统调试难度和时间 降低系统成本

TwinCAT 3

Page 48: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinCAT 3 MC – Abstraction layer

16.04.2013 48

Sof

t-SP

SLa

yer

LIGHTBUSLIGHTBUS

Pos Ctrl Limit

Velo Preset Scale & Limit

Pos Meas.

SP

+++-

Sof

t-Mot

ion

Laye

rFi

eldb

usLa

yer

Driv

esLa

yer

PLCC/C++

NC PTPNC ICNC

IO

TwinCAT 3

Page 49: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinCAT 3 49

TwinCAT 3 运动控制– 从 PTP 到 机器人

NC PTP CNC RoboticsNC I

Point-to-Point-movement

– gearing– camming– superposition– flying saw

Interpolated motion with 3 axes and 5 additional axes

– programming according to DIN 66025

– technological features– straightforward

utilisation through function blocks from the PLC

Complete CNC functionality

– interpolated movement for up to 32 axesper channel

– various transformations

Interpolated motion for robotic control

– support for a wide rande of kinematic systems

– optional torque pre-control

Functionality

TwinCAT 3

Page 50: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinCAT�3�Example: AX5203 | Online menu of the axes

16.04.2013TwinCAT 3 | Training for new users | Motion NC

PTP 50

ACTUAL position

SETPOINT position

SETPOINT velocity

ACTUAL velocity

Axis error

Axis enable

Following error

Output restrictionController

interventionStatus/diagnosis

Jog neg. fast

Jog neg. slow

Jog pos. slow

Jog pos. fast

Controller KV

Target position

Start Stop

Target velocity

Home

Reset

Page 51: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinCAT�Example: AX5203 | Set NC parameters

16.04.2013TwinCAT 3 | Training for new users | Motion NC

PTP 51

Automatic adoption into the NC

Page 52: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinCAT�3�Example: AX5203 | Axis X_Enc | Parameters

16.04.2013TwinCAT 3 | Training for new users | Motion NC

PTP 52

mm/INC 6-40625e9,536743161048576

10_ INC

mmfactorScaling

Page 53: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinCAT�Library Manager

All�libraries�necessary�for�controlling�the�NC-PTP�axes�from�the�PLC�are�located�in�the�Motion�PTP�subfolder.

16.04.2013TwinCAT 3 | Training for new users | Motion NC

PTP 53

Page 54: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinCAT�3�Library Manager | View

16.04.2013TwinCAT 3 | Training for new users | Motion NC

PTP 54

Page 55: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinCAT 3 55

C/C++ 实时控制程序编程

已开发代码的直接使用 可以在项目中和PLC代码互相交互 在不同控制平台满足实时控制需求 客户可独立开发设备驱动 倍福公司提供大量的功能函数

标准PLC

C/C++程序

硬件

TwinCAT 3

Page 56: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinCAT 3 56

C/C++ Programming Languages

Method CycleUpdate: – is called cyclically Pointer to logical input/output image

TwinCAT 3

Page 57: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

eXtended Automation Engineering (XAE)

IEC�61131�和 C++�在同一个环境里面编程

包含了系统配置

16.04.2013 57

TwinCAT 3

Page 58: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinCAT 3 58

支持Matlab®/Simulink

为什么选择 Matlab®/Simulink® Integration 在科学测量领域有广泛的应用 大量现成的工具箱和数据库,免去重复编程 可以仿真和优化控制系统

使用方式 在Matlab®/Simulink®�环境编程并通过WORKSHOP产生C代码

(需要安装 Matlab/Simulink�+�Realtime�Workshop�) 用Visual�Studio®�C�Compiler进行编译,产生二进制文件 TwinCAT�生成描述文件tmc 可在TC3下面进行参数整定和运行

TwinCAT 3

Page 59: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinCAT 3 59

• 直接在TwinCAT�3��中调用模块• tmc文件中定义了接口参数• 由Task进行实时调用

SampleTwinCAT 3

Page 60: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

PLCC/C++

PLCC/C++

Matlab /�SimulinkModul

Matlab /�SimulinkModul

I/OMotion

I/OMotion

SampleTwinCAT 3

Page 61: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

16.04.2013 61

• 在实时运行环境中集成仿真模型和PLC�

Process model (Matlab/Simulink) Controller (PLC or C/C++ or Matlab/Simulink)

Sample: Process simulationTwinCAT 3

Page 62: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinCAT 3 62

.NET Programming Languages (e.g. C#)

优点: 高效的开发工具 美观的界面开发 简易的编程方法

可以利用Visual�Studio�平台 整合到同一个解决方案

TwinCAT 3

Page 63: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinCAT 3 63

C#/.NET programming

PLC module

C++ module

Real-time Code

HMI/No-Realtime Code

TwinCAT 3

Page 64: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

Microsoft Silverlight:

16.04.2013 64

C#/ .NET programmingTwinCAT 3

Page 65: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

PLCPLC C++C++

I/OI/O NCNC

C#C# Matlab/SimulinkMatlab/Simulink

各种模块之间的交互TwinCAT 3

Page 66: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinCAT 3 66

硬件和总线配置

Mapping of process images 支持市场通用的总线 支持所有PC硬件接口 易调试和诊断 分配逻辑和物理过程数据映射 更换总线产品无需更改PLC代码

Inputs Outputs Inputs Outputs

InputsInputs Outputs InputsInputs Outputs InputsInputs Outputs

i.e. PLC or C/C++ i.e. Matlab/Simulink Module

TwinCAT 3

Page 67: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

• 安全控制方案的融入

硬件安全PLC方案

纯软件安全PLC方案

TwinCAT 3

TwinCAT 3 模块的交互和诊断

Page 68: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinSAFE

TwinSAFE KL TwinSAFE ELTwinCAT

Safety PLC

Safety PLC in Software on a PC

TwinCAT 3 – enables configuration and programming of all TwinSAFE solutions

16.04.2013 68

TwinCAT 3

Page 69: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

16.04.2013 69

安全PLC配置——安全解决方案和标准控制系统的结合

Part of the TwinCAT 3 System

Communication with:- EL6900- TwinCAT Safety

PLC

TwinCAT 3 Runtime

TwinCAT 3 Engineering Environment (based on the MS Visual Studio 2010)

System‐Manager: IO PLCMotion Control C/C++ Safety others

programming environment

Safety Editor

TwinCAT  Transport Layer ‐ ADS

Safety Runtime

code generation

debugging

upload of TC modules

caption:

Microsoft C Compiler

EL6900

TwinCAT 3

Page 70: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

Safety PLC ControlTwinCAT 3

16.04.2013 70

Page 71: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

Reatim

ekernel

TwinCAT  Automation Device Driver – ADD

Task

Task

Task

Call

TwinCAT Object Manager

Fieldbus Layer

PLC

TcCO

M

Safety

TcCO

M

Simulink

TcCO

M

C

TcCO

M

CNCTcCO

M

NC

TcCO

M

PLC

TcCO

M

PLC

TcCO

M

C++

TcCO

M

TwinCAT transport layer – ADS 

TwinCAT Safety PLC-纯软件安全解决方案

TwinCAT Safety PLC includes A safety configuration A safety logic (PLC)

Pure software, Runs on regular PC hardware and standard operating systems

16.04.2013 71

S

TwinCAT 3

Page 72: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

• 强大的通讯接口(内部和外部)

• 模块化的程序单元

• 安全的代码保护

• 良好的移植性

TwinCAT 3 通讯接口设计

TwinCAT 3

Page 73: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

eXtended Automation Runtime (XAR)

模块的接口 标准化 易于使用 包含状态机

2013/4/16 73

TwinCAT 3

Page 74: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinCAT

TwinCAT

AutomationDeviceSpecification(ADS)

AutomationProtocols

OPC UA, ModbusTCP, Modbus RTU3964R/RK512

IndustryProtocols

IEC 61850, IEC 61400-25,IEC 60870-5-10x,BACnet, FIAS, Crestron

ITProtocols

WLAN, Bluetooth,TCP, UDP, RAS,FTP, VPN, SNMP, SNTP,SMS, SMTP

WebServer Ils

XML, AJAX,ASP, DPWS/WSD

TwinCAT ADS Router

TwinCAT

TwinCAT ADS Router

TwinCAT

AutomationDeviceSpecification(ADS)

通信 – 多种解决方案, 都基于ADS

PLC 1

AcyclicTCP, UDP, Serial,

Fieldbus

cyclicEtherCAT Automation

Protocol (EAP)Network variables

PLC 2

2013/4/16 74

J

TwinCAT 3

Page 75: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

通讯 | ADS (Automation Device Specification)

轮询/事件驱动 交换数据 /传递指令 协议开放 支持所有的Windows系统 可通过PLC�功能块进行访问 本地及网络都可传输 OCX/DLL/.NET/

Script/Webservice

ADS via HTTP

ADS via TCP/IP

ADS via serialconnection

ADS via fieldbus

2013/4/16 75

TwinCAT 3

Page 76: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinCAT 3 76

TwinCAT 2 项目的移植

TwinCAT 2�项目可以迁移到TwinCAT 3�的平台中开发和运行

Microsoft Windows Operating System

TwinCAT�Transport�Layer�– ADS-Router

Multi-core PC System

TwinCAT 2.11 PLCEngineering

TwinCAT 3 –eXtended Automation Engineering

TwinCAT 2.11 PLCRuntime

TwinCAT 3 –eXtended Automation Runtime

Fieldbus�Drivers

TwinCAT 3

Page 77: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

产品概览 2013/4/16 77

TwinCAT 3

TwinCAT 3�+�EtherCAT +�XFC�=�

超级性能

TwinCAT 3 + EtherCAT + XFC 

Page 78: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

78

EtherCAT :世界上最快的现场总线

传输速率:�2�x�100�Mbaud (全双工)

刷新时间: 256�开关量 I/O�:11�µs 1000�开关量 I/O�分布于 100�节点 :30�µs�=�0.03�ms 200�模拟量 I/O�(16�位)�:50�µs,�20�kHz�采样频率 100�伺服轴 (每 8�字节 IN+OUT)�: 100�µs�=�0.1�ms 12000�开关量 I/O�: 350�µs

TwinCAT3

Page 79: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

XFC | 极速控制技术 2013/4/16 79

XFC | 全方位提升控制系统性能

TwinCAT3

Page 80: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

XFC | 极速控制技术 2013/4/16 80

XFC 性能数据

系统性能 周期时间: 100�µs(最小 50�µs) I/O�响应时间: 85�µs(185�µs)

分布式时钟 分辨率: 10�ns 精度: <�100�ns

信号超采样 采样率: 1�MHz� 时间分辨率: 1�µs� 精度: <�100�ns

时间戳 分辨率: 10�ns 精度: <�100�ns

TwinCAT3

Page 81: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

Vision

Robotics

Simulation

Modeling�&�Advanced�Control

Instrumentation�&�Measurement

Advanced��Diagnostics

开放且模块化的平台

TwinCAT 把自动化扩展到新的应用领域

测试设备 &�测量 先进控制

快速控制模型

实时仿真

数据分析

自动化测试平台

科技自动化

2013/4/16 81

TwinCAT3

Page 82: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

TwinCAT 3.1

支持64位操作系统

支持CE系统/ Win8系统

支持Visual Studio® 2012

支持Automation Interface

支持独占CPU功能

2013/4/16 82

TwinCAT 3

最新版TwinCAT 3.1在德国工业展发布

Page 83: TwinCAT 3 引领自动化发展新方向 - beckhoff.com.cn · Architecture (XAA) - notebook example (XAE) CX TwinCAT 3 | Overview 23.05.2012 eXtended Automation Engineering (XAE)

Thank you!

2013/4/16 83