Documente Academic
Documente Profesional
Documente Cultură
Beckhoff Training
Beckhoff
Structures
Structures are used to define elements of a larger item and are commonly referred
to as custom data types or data unit types
A temperature sensor; for example, is more than just the temperature value
The status of the Analog input card, the scaling parameters, and the offset are all
possible elements that are directly related to the temperature sensor
In order to keep these elements together and make the code more re-useable a
structure of these elements can be created
Beckhoff
Structures
After typing the instance name of the structure place a ‘.’ immediately after it and
the intellisense window will appear, showing what elements exist inside of the
structure
Beckhoff
Structures - Use
When the Enumeration is defined the first variable in the list will be assigned a
value of 0, the variables following will be assigned their values in ascending order
Manual = 0
Semi_Auto = 1
Auto = 2
Beckhoff
Enumerations
If a variable in the list is explicitly assigned a value then the following variables will
be incremented from this value
Manual = 1
Semi_Auto = 2
Auto = 3
Manual = 1
Semi_Auto = 2
Auto = 3
Maintenance = 10
Unknown = 11
Beckhoff
Enumerations
An Array is a list of data, the data in the Array can be of any type
An Array can contain more than one dimension
Think of a Notebook of graph paper
The column on a single sheet of paper would be a 1 dimensional array
The entire sheet with its rows and columns would be a 2 dimensional array
The Notebook with all of its sheets would be a 3 dimensional array
Beckhoff
Arrays
1 Dimensional Array
The Array is defined from 1 to 10 of type INT
This Array will hold 10 integer values
2 Dimensional Array
The Array is defined from 1 to 10 and 1 to 3 of type String
This Array will hold 30 (3*10) String values
The comma ‘,’ is used to denote the multiple dimensions of the array
Beckhoff
Arrays
3 Dimensional Array
Beckhoff
Arrays - Initialization
WARNING!
A Breakpoint will stop the PLC
Note: Logging out of the PLC will remove all breakpoints, and allow the code to
start running again.
Beckhoff
Breakpoints
When the PLC reaches this line of code the PLC will halt before running Line 4
You can also see that the Run command for the PLC is enabled.
Beckhoff
Breakpoints
Beckhoff TwinCAT 3
Multiple PLC Tasks
TWINCAT 3
Beckhoff TwinCAT 3
Multiple PLC Tasks
Beckhoff TwinCAT 3
Multiple PLC Tasks
Beckhoff TwinCAT 3
Multiple PLC Tasks
Beckhoff TwinCAT 3
Multiple PLC Tasks
Beckhoff TwinCAT 3
Multiple PLC Tasks
Beckhoff TwinCAT 3
Multiple PLC Tasks
Beckhoff TwinCAT 3
Multiple PLC Tasks
Beckhoff TwinCAT 3
Multiple PLC Tasks
Beckhoff TwinCAT 3
Multiple PLC Tasks
Beckhoff TwinCAT 3
Multiple PLC Tasks
Beckhoff TwinCAT 3
Multiple PLC Tasks
Beckhoff TwinCAT 3
Multiple PLC Tasks
Beckhoff TwinCAT 3
TC3 TwinSAFE
TwinCAT 3
Software
10.01.2013 1
TC3 TwinSAFE
Safety and standard I/O in one system
10.01.2013 2
TC3 TwinSAFE
Safety and standard I/O in one system
2. Scalable Hardware
4. Outstanding Diagnostics
10.01.2013 3
TC3 TwinSAFE
High Performance Control
High Performance expands possibilities
1 controller
Synchronous Scan
10ns resolution w/
XFC Terminals
2. Scalable Hardware
4. Outstanding Diagnostics
10.01.2013 5
TC3 TwinSAFE
Scalable Hardware
Scalable I/O including TwinSAFE works with any size system
1 Controller
0 switches
0 IP addresses
0 I/O configuration
Auto Scan
Software sends config info
Redundancy(Ring)
65,535 Devices
11,000 Terminal Demo
255 Axes
10.01.2013 6
TC3 TwinSAFE
Scalable Hardware
Scalable I/O works with any field bus protocol
25+ protocols
TwinSAFE Variables
can be tied to these
other systems
10.01.2013 7
TC3 TwinSAFE
Scalable Hardware
Scalable I/O does not require racks or backplane chassis
100 Oversampling
Power Monitoring
LoadCell
AC/DC Motor
Stepper
Servo
10.01.2013 8
TC3 TwinSAFE
Scalable Hardware
Scalable Controllers work with all of the I/O Devices
Multi HD Raid
SSD
Cfast Flash
Fan/Fanless
Integrated PB‘s/LT‘s
10.01.2013 9
TC3 TwinSAFE
Scalable Hardware
Scalable Motion
255 Axis
Single Cable
Power/Feeback
Linear
Synchronous
Stepper
10.01.2013 10
TC3 TwinSAFE
Scalable Hardware
Scalable Safety: TwinSAFE System
•IPC
•TwinCAT Development
Software
10.01.2013 11
TC3 TwinSAFE
Scalable Hardware
Scalable Safety: TwinSAFE System
•Safe Motion
•Complete Hardware/Software
diagnostics
10.01.2013 12
TC3 TwinSAFE
Scalable Hardware
Scalable Safety : TwinSAFE EL6900 CPU Logic Controller
10.01.2013 13
TC3 TwinSAFE
Scalable Hardware
Scalable Safety: TwinSAFE Various Input Devices
Operation Mode:
• Standstill monitoring 1 Standstill
• Standstill monitoring 2 Monitoring
• Digital
Safety Mats
10.01.2013 14
TC3 TwinSAFE
Scalable Hardware
Scalable Safety : TwinSAFE Input Terminals
•Fail-safe inputs
•Diagnostic Lights:
Voltage
Temperature
Sensor Test Dip switches on Terminal required
Cross Wiring for certification 0-65535 EL1904 4ch EL1908 8ch
10.01.2013 16
TC3 TwinSAFE
Scalable Hardware
Scalable Safety : TwinSAFE Output Terminals
• Fail-safe Outputs
• Switches 24 V DC actuators.
• Diagnostic Lights:
Voltage Dip switches on Terminal EL1904 4ch EL1902 2ch EL1901 1ch
Temperature required for certification 0-1023.
0.5Amp 2.3Amp 10Amp
Output Current
Cross Wiring
EL2964 1ch
3 simultaneously N.O. contacts
10.01.2013 17
TC3 TwinSAFE
Scalable Hardware
Scalable Safety : TwinSAFE AX5805 Safety Card
Meets requirements for: Stop Functions:
PL e / SIL 3 STO: Safe Torque Off
SS1: Safe Stop 1 → STO
SS2: Safe Stop 2 → SOS
Limiting Functions:
SOS: Safe Operating Stop
SSM: Safe Speed Monitor
SLS: Safe Limited Speed
SLP: Safe Limited Position
SAR: Safe Acceleration
Range
SSR: Safe Speed Range
SMA: Safe Maximum
Acceleration
SMS: Safe Maximum Speed
SDI: Safe Direction
No additional wiring or
switching device required!
10.01.2013 18
TC3 TwinSAFE
Scalable Hardware
Scalable Safety: Fieldbus Gateway
•Integrate TwinSAFE
data to EthernetIP via
shared memory map.
10.01.2013 19
TC3 TwinSAFE
Scalable Hardware
Scalable Safety: Fieldbus Gateway
•Uplink/Downlink values
for Generic CIP
connection to AB is
auto calculated . These
are the values which
would be typed into the
RSLogix5000 side.
10.01.2013 20
TC3 TwinSAFE
Scalable Hardware
Scalable Safety: Field bus Gateway
10.01.2013 21
TC3 TwinSAFE
Safety and standard I/O in one system
2. Scalable Hardware
4. Outstanding Diagnostics
10.01.2013 22
TC3 TwinSAFE
One Software TwinCAT
TwinCAT: Development Overview
1. All Software
Elements in
One Location
(Safety)
2.
2. All Code Writing
in One Location 2.
3. All Parameters
in One Location
1. 3.
4. All Code
feedback in one
location
4.
10.01.2013 23
TC3 TwinSAFE
One Software TwinCAT
TwinCAT: Add Target TwinSAFE Controller Terminal
• Add Target
TwinSAFE
Controller
Terminal
2.
10.01.2013 24
TC3 TwinSAFE
One Software TwinCAT
TwinCAT: Attach to Target PLC Terminal Controller
• User
Administration
can be
performed
2.
10.01.2013 25
TC3 TwinSAFE
One Software TwinCAT
TwinCAT: TwinSAFE Function Blocks
• EL6900 has 14
total pre-defined
FB available
• Safety functions 2.
can easily be
selected and
linked.
• All FB can be
freely connected
and are
complemented
with operators
such as AND,
OR, etc.
10.01.2013 26
TC3 TwinSAFE
One Software TwinCAT
TwinCAT: TwinSAFE Function Blocks
• 8 EstopPB or 4
DualContact
EstopPB can be
connected to
each Estop FB 2.
• External Device
Monitoring
Inputs for
ensuring
Contactor is
switching states
10.01.2013 27
TC3 TwinSAFE
One Software TwinCAT
TwinCAT: TwinSAFE Function Blocks
• Add variables to
each input and
output of the FB
2.
10.01.2013 28
TC3 TwinSAFE
One Software TwinCAT
TwinCAT: TwinSAFE Function Blocks
• Configurable
Delay Time
2.
10.01.2013 29
TC3 TwinSAFE
One Software TwinCAT
TwinCAT: TwinSAFE Function Blocks
2.
10.01.2013 30
TC3 TwinSAFE
One Software TwinCAT
TwinCAT: TwinSAFE Function Blocks
2.
10.01.2013 31
TC3 TwinSAFE
One Software TwinCAT
TwinCAT: TwinSAFE Function Blocks
• Raw Material
additions
• Automatic Roll
Changes 2.
10.01.2013 32
TC3 TwinSAFE
One Software TwinCAT
TwinCAT: TwinSAFE Function Blocks
2.
10.01.2013 33
TC3 TwinSAFE
One Software TwinCAT
TwinCAT: TwinSAFE Function Blocks
2.
10.01.2013 34
TC3 TwinSAFE
One Software TwinCAT
TwinCAT: TwinSAFE Function Blocks
2.
10.01.2013 35
TC3 TwinSAFE
One Software TwinCAT
TwinSAFE: Add Function Blocks to Group1 Network
• Point at the
SafeEstop
function block
• Drag the
safeEstop block
onto the code
writing area.
10.01.2013 36
TC3 TwinSAFE
One Software TwinCAT
TwinCAT: Create TwinSAFE Function Block Variables
1. Click on the
Restart input
connection point
2. In the properties 1. 2.
windows you
can alter the
2.
properties or
parameters of
the “In Port”
• Single or Two
Channel
operation
• Discrepancy
time
• Select input as
N.C or N.O
3. Assign Variable
3.
Name
10.01.2013 37
TC3 TwinSAFE
One Software TwinCAT
TwinCAT: Connection between FB’s
10.01.2013 38
TC3 TwinSAFE
One Software TwinCAT
TwinCAT: Create TwinSAFE Function Block Variables
• Click on
Comment and
add a comment
to a FB
2.
10.01.2013 39
TC3 TwinSAFE
One Software TwinCAT
TwinCAT: Create TwinSAFE Function Block Variables
1. Selecting
magnifying glass
icon will zoom in
on workspace
2.
2. Selecting
magnifying glass
icon will auto scale
workspace to fit all
FB’s
3. Selecting
magnifying glass
icon will zoom out
on workspace
4. Selecting
and moving the
move icon will
show a zoomed in
popup window of
workspace
• Example of
several FB on
one network.
2.
10.01.2013 41
TC3 TwinSAFE
One Software TwinCAT
TwinCAT: TwinSAFE Download Safety Project, Start Safety Project
• Click Download
Icon
2.
Username:
Administrator
Serial Number:
nnnnnnnn
Password:
TwinSAFE
10.01.2013 42
TC3 TwinSAFE
One Software TwinCAT
TwinCAT: TwinSAFE Version History
• Click Version
Icon
2.
10.01.2013 43
TC3 TwinSAFE
Safety and standard I/O in one system
2. Scalable Hardware
4. Outstanding Diagnostics
10.01.2013 44
TC3 TwinSAFE
Outstanding Diagnostics
Diagnostics: Online Monitoring
• Green indicates
Input is
High/True
2.
10.01.2013 45
TC3 TwinSAFE
Outstanding Diagnostics
Diagnostics: Online Monitoring
• Online status is
shown as Green
when ON.
2.
10.01.2013 46
TC3 TwinSAFE
Outstanding Diagnostics
Diagnostics: Online Monitoring
• Each channel of
the connection
can be mapped
back to variable
tag for use in 2.
the PLC.
• Live online
update of a
TwinSAFE or
any input/output
is available
10.01.2013 47
TC3 TwinSAFE
Outstanding Diagnostics
Diagnostics: Variable Tags
• TwinSAFE Group
and FB Variable
Tags available to
be aliased to
PLC project. 2.
10.01.2013 48
TC3 TwinSAFE
Outstanding Diagnostics
Diagnostics: Variable Tags
• Estop FB
Variable Tags
available to be
aliased to PLC
project. 2.
10.01.2013 49
TC3 TwinSAFE
Outstanding Diagnostics
Diagnostics: Document
• Right-click on
the “Project”
level of the
safety tree view
in the Solution 2.
Explorer
• Add Extra
company
specific data as
needed, notice
logo file jpg file
attached in
example.
10.01.2013 50
TC3 TwinSAFE
Outstanding Diagnostics
Diagnostics: Document
• Detailed information
about devices and
parameters
10.01.2013 51
TC3 TwinSAFE
Outstanding Diagnostics
Diagnostics: Demo
10.01.2013 52
TC3 TwinSAFE
I/O Configuration
I/O Configuration: Demo
TC3 TwinSAFE
I/O Auto Configuration Demo
10.01.2013 57
TC3 TwinSAFE
Questions
Questions?
10.01.2013 61
TwinCAT 3
Beckhoff TwinCAT 3
TwinSAFE – Getting Started
TWINCAT 3
Beckhoff TwinCAT 3
Getting Started
TwinSAFE Project
TwinSAFE Group
FB Safety
Application
Variables
Beckhoff TwinCAT 3
Getting Started
FB Safety
Application
Variables
Beckhoff TwinCAT 3
Getting Started
TwinSAFE Project
FB Safety
Application Alias
Variables
Beckhoff TwinCAT 3
Getting Started
Note: The I/O may be Safety I/O or Standard I/O depending on the application
TwinSAFE Project
FB Safety
Alias
Application I/O
Variables
Beckhoff TwinCAT 3
TwinSAFE – Estop and Relay
TWINCAT 3
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Select the PLC variable for Error Acknowledge and click ‘OK’
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
The Aliases for the Safety I/O have now been added and
are already mapped to the I/O
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
At this point the project has been created, the last step is to
verify it and load it into the EL6900
Beckhoff TwinCAT 3
Estop and Relay
At this point the project has been created, the last step is to
verify it and load it into the EL6900
Before continuing select ‘Save All’ from the ‘File’ menu
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
This will check for any errors within the Safety Project
If any errors are found they will be shown in the ‘Error’
window
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Username: Administrator
Serial Number: Ctrl+V to paste
Password: TwinSAFE
Beckhoff TwinCAT 3
Estop and Relay
Click ‘OK’
If the information was correct you will be asked for the
password one more time
Enter the same password and click ‘OK’
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
Estop and Relay
Beckhoff TwinCAT 3
TwinCAT 3
Beckhoff TwinCAT 3
Changing Fonts
TWINCAT 3
Beckhoff TwinCAT 3
Changing Fonts
Beckhoff TwinCAT 3
Changing Fonts - ST
Beckhoff TwinCAT 3
Changing Fonts - ST
Beckhoff TwinCAT 3
Changing Fonts – FBD, LD, IL
Beckhoff TwinCAT 3
Changing Fonts – FBD, LD, IL
Beckhoff TwinCAT 3
TwinCAT 3
Beckhoff TwinCAT 3
Data Type Comparison
TWINCAT 3
Beckhoff TwinCAT 3
Data Type Comparison
Beckhoff TwinCAT 3
Password Protection
TWINCAT 3
Beckhoff TwinCAT 3
Password Protection
Beckhoff TwinCAT 3
Password Protection
Beckhoff TwinCAT 3
Password Protection
Beckhoff TwinCAT 3
Password Protection
Beckhoff TwinCAT 3
Password Protection
Note: The User Name and Password are both Case Sensitive
Beckhoff TwinCAT 3
Password Protection
Beckhoff TwinCAT 3
Password Protection
Beckhoff TwinCAT 3
Password Protection
Beckhoff TwinCAT 3
Password Protection
Beckhoff TwinCAT 3
Password Protection
Beckhoff TwinCAT 3
Password Protection
Beckhoff TwinCAT 3
Password Protection
Beckhoff TwinCAT 3
Password Protection
Beckhoff TwinCAT 3
TwinCAT 3
Beckhoff TwinCAT 3
Source code download
TWINCAT 3
Beckhoff TwinCAT 3
Source code download
Beckhoff TwinCAT 3
Source code download
Beckhoff TwinCAT 3
Source code download
Beckhoff TwinCAT 3
Source code download
Beckhoff TwinCAT 3
Source code download
Beckhoff TwinCAT 3
Source code download
Beckhoff TwinCAT 3
Source code download
Beckhoff TwinCAT 3