twincat 3 quick start - itsmaker.it
TRANSCRIPT
TwinCAT 3 Quick Start
Contents
1. Architecture: Engineering (XAE) and Runtime (XAR)
2. Practice:
- Establish a connection
- Hardware test: Online Scan and Freerun Mode
- Create task with I/O image
- Link to the hardware
3. Create PLC program
- Variable declaration
- Link to the hardware
4. Settings for automatic start of XAR
- Activate boot project
- Enable boot project start
- Set TwinCAT autostart for RUN
TwinCAT 3
eXtended
Automation (XA)
eXtended
Automation
Runtime (XAR)
eXtended
Automation
Engineering (XAE)
Modular runtime system
TcC
OM PLC Safety
TcC
OM NC
TcC
OM
C++
modules
TcC
OM …
TcC
OM
TwinCAT 3 development environment
based on Visual Studio® 2010
TwinCAT 3
Standard
Visual Studio®
2010 Shell
TwinCAT 3
Integrated
Visual Studio®
2010
eXtended
Architecture (XAA)
eXtended Automation (XA) - overview
eXtended
Automation
Engineering (XAE)
TwinCAT 3 development environment
Visual Studio® 2010
TwinCAT 3
Standard
Visual Studio®
2010 Shell
TwinCAT 3
Integrated
Visual Studio®
2010
eXtended
Automation
Runtime (XAR)
Notebook XAE –> CX or IPC XAR
eXtended
Automation
Runtime (XAR)
Modular runtime system
TcC
OM PLC Safety
TcC
OM NC
TcC
OM
C++
modules
TcC
OM …
TcC
OM
Ethernet interface used as
programming interface
EtherCAT Master
Notebook XAE –> CX or IPC XAR
Notebook XAE –> CX or IPC XAR
TwinCAT 3 development environment on
notebook
TwinCAT 3
Standard / Integrated
TwinCAT 3 runtime on CX /IPC
TwinCAT Transport Layer - ADS
TwinCAT 3 Runtime
Real-time Kernel
PLCCNC PLCC++
modulesPLCPLCPLCSimulink®
modules
IO
Tw
inC
AT
Tra
nsport
Layer
-A
DS
Notebook XAE –> CX or IPC XAR
TwinCAT 3 runtime on CX /IPC
TwinCAT Transport Layer - ADS
TwinCAT 3 Runtime
Real-time Kernel
PLCCNC PLCC++
modulesPLCPLCPLCSimulink®
modules
IO
TwinCAT 3 development
environment PC
TwinCAT 3
Standard / Integrated
Tw
inC
AT
Tra
nsport
Layer
-A
DS
Config Mode:
to enable communication (programming)
scanning of hardware / IO test in Freerun
Run Mode : PLC NC IO etc. operate in real-timePC
taskbar
XAE status
TwinCAT Real-Time Servers are accessible from high-level applications (System Manager +
PLC Control, SCADAs, HMI programs, …) by means of ADS protocol.
The target system is selected by paramater AmsNetId. Every hardware system with TwinCAT
installed has its own AmsNetId, which must be unique on the Local Area Network.
Within a selected target system, the specific Real-Time Server is selected by parameter
AmsPort. Server AmsPorts are defined by standard.
Notebook XAE –> CX or IPC XAR
I/O-
Server PLC
Server
NC PTP
Server
Real-Time Device Driver
Hardware
TwinCAT Real-Time kernel extension
AmsNetId : 192.168.3.5.1.1
AmsPort : 501
Notebook XAE –> CX or IPC XAR
PC taskbar
TwinCAT XAE displays TwinCAT
state on the target system
TwinCAT on the target computer
(CX / IPC)
The target computer
must be in the RUN
state in order to logon
to the PLCReal-time load in %
Contents
1. Architecture: Engineering (XAE) and Runtime (XAR)
2. Practice:
- Establishment of a connection
- Hardware test: Online Scan and Freerun Mode
- Create task with I/O image
- Link to the hardware
3. Create PLC program
- Variable declaration
- Link to the hardware
4. Settings for automatic start of XAR
- Activate boot project
- Enable boot project start
- Set TwinCAT autostart for RUN
Practice: Requirements
Requirement: TC3 is successfully installed on the programming
computer and the target computer
Hardware with PC (XAE)
Target system CX or IPC
Practice - Requirements
Example hardware
PC with TwinCAT3
XAE, CX or IPC with
EtherCAT adaptor
TwinCAT3 XAE / XAR
on the same computer
(local)
Some EtherCAT
slaves
( a Coupler EK1100 if
required)
Starting Visual Studio shell
Taskbar TwinCAT Visual Studio
2010/2012/2013 symbol
Starting Visual Studio shell
New Project
XAE Project
Setting the target system
Establishment of a connection
To search, first select Local Target System
Establishment of a connection
searches for
TC
controllers
IPC/ CX
Connection
to both
devices
(enter PC
target
system)
Establishment of a connection
Logon information: user name and password for computer.
Training CX 1020 / IPC C63xxCX
training:
Administrator
1
Establishment of a connection
Connection
valid
Establishment of a connection
Status of connection
PC taskbar
TwinCAT XAE displays TwinCAT
state on the target system
TwinCAT on the target computer
(CX / IPC)
State of the TwinCAT symbol
TwinCAT XAE displays TwinCAT
state on the target system The target system must
be in Config Mode for
scanning and freerun test
of the hardware
The target computer must
be in the RUN state in
order to logon to the PLC
laterThe TwinCAT system on the XAE
computer must be in the Config
Mode for logging on.
Run Mode is also possible if the XAE
computer simultaneously represents a control
computer (XAR)
Contents
1. Architecture: Engineering (XAE) and Runtime (XAR)
2. Practice:
- Establishment of a connection
- Hardware test: Online Scan and Freerun Mode
- Create task with I/O image
- Link to the hardware
3. Create PLC program
- Variable declaration
- Link to the hardware
4. Settings for automatic start of XAR
- Activate boot project
- Enable boot project start
- Set TwinCAT autostart for RUN
Scan Hardware
Check Config Mode,
activate Config Mode if
necessary
Scan
Scan Hardware
Scan Hardware
Freerun
In Freerun Mode,
I/O can be tested without PLC
program
Contents
1. Architecture: Engineering (XAE) and Runtime (XAR)
2. Practice:
- Establishment of a connection
- Hardware test: Online Scan and Freerun Mode
- Create task with I/O image
- Link to the hardware
3. Create PLC program
- Variable declaration
- Link to the hardware
4. Settings for automatic start of XAR
- Activate boot project
- Enable boot project start
- Set TwinCAT autostart for RUN
Add a Task with I/O
Create a Task
Add a Task with I/O
Check Auto Start
flag and set cycle
time
Add a Task with I/O
Insert the Inputs
and Outputs
Variables
Link to the hardware
Insert the Inputs
and Outputs
Variables
Link to the hardware
Further links
Activate Configuration
Activating the configuration
Wait for Run Mode
Activate Configuration
If TwinCAT XAR is not
registered, a 7-day
licence can be created
Contents
1. Architecture: Engineering (XAE) and Runtime (XAR)
2. Practice:
- Establishment of a connection
- Hardware test: Online Scan and Freerun Mode
- Create task with I/O image
- Link to the hardware
3. Create PLC program
- Variable declaration
- Link to the hardware
4. Settings for automatic start of XAR
- Activate boot project
- Enable boot project start
- Set TwinCAT autostart for RUN
Add PLC project
Create PLC project
Global Variable List
PLC project from
template
Generate global
variable list
Global Variable List
Name
Global Variable List
Create global variables
Link to the hardware
Link
Link to the hardware
Link
Link to the hardware
Further links
Activate Configuration
Activating the configuration
Wait for Run Mode
Activate Configuration
If TwinCAT XAR is not
registered, a 7-day
licence can be created
Login
Login to PLC project
PLC RUN
Start
PLC
PLC
Online
Login
Online
XAE offline + PLC not in Run Mode
XAE online + PLC not in Run Mode
XAE offline + PLC in Run Mode
XAE online + PLC in Run Mode
TwinCAT in Run Mode
Monitoring
Global variables
online
Write
Values
Extending the program
Logout
Create FB
Extending the program
Create FB
Extending the program
Edit FB
Toolbox: VIEW->TOOLBOX
Extending the program
Edit FB
Adapt connection with
“Set output connection”
Extending the program
Edit FB
Adapt connection with
“Set output connection”
Extending the program
Call block in Main
(ST) with input
assistant and Auto
Declare
Extending the program
Call block in Main
(ST) with input
assistant and Auto
Declare
Extending the program
Call block in Main (ST) with
input assistant and Auto
Declare
Configure input and output
Contents
1. Architecture: Engineering (XAE) and Runtime (XAR)
2. Practice:
- Establishment of a connection
- Hardware test: Online Scan and Freerun Mode
- Create task with I/O image
- Link to the hardware
3. Create PLC program
- Variable declaration
- Link to the hardware
4. Settings for automatic start of XAR
- Activate boot project
- Enable boot project start
- Set TwinCAT autostart for RUN
Autostart
Create Boot project
Enable autostart
Activate boot project
Autostart
TwinCAT autostart
Autostart
User name and password
for the control computer