Sunteți pe pagina 1din 208

New Automation Technology

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

 To add a Structure, ‘Right-Click’ on the ‘DUTs’ folder


 Then Select ‘Add’ -> ‘DUT’
Beckhoff
Structures

 Change the Name to ST_TemperatureSensor


 Select the Radio button for Structure
 Click the ‘Open’ button
Beckhoff
Structures - Decleration

 This will create the basic framework for a structure


Beckhoff
Structures - Decleration

 Define the elements with the structure


 Initial values can be given
 A structure can also contain other structures
Beckhoff
Structures - Use

 A structure must be instantiated just like a Function Block


Beckhoff
Structures - Use

 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

 The elements in a structure can be written to or read from


New Automation Technology
Beckhoff Training
Beckhoff
Enumerations

 Enumerations can be used to assign a variable name to a number.


 Enumerations can be used in two different ways; with or without being instantiated.
 If the Enumeration is not instantiated then the Enumeration works similar to a list of
constants.
 If the Enumeration is instantiated then the instance of the enumeration will hold the
variable of the current value of the Enumeration
Beckhoff
Enumerations

 To add an Enumeration, ‘Right-Click’ on the ‘DUTs’ folder


 Then Select ‘Add’ -> ‘DUT’
Beckhoff
Enumerations

 Change the Name to E_Mode


 Select the Radio button for Enumeration
 Click the ‘Open’ button
Beckhoff
Enumerations

 The basic framework of an Enumeration looks like the following


Beckhoff
Enumerations

 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

 Using Enumerations in this manner allows for


easier understanding of the code when it is
being read
 In this Case statement the Variables in the
Enumeration are used to represent the number
equivalent of iStep.
 As iStep changes in value the Case statement
will change states
 iStep can be assigned a numerical value or an
Enumeration variable
 The displayed online value of iStep1 will always
be an INT value because iStep1 is declared as
an INT
Beckhoff
Enumerations

 The displayed online value of iStep will always


be an INT value because iStep is declared as
an INT
Beckhoff
Enumerations

 If an instance of the Enumeration is declared


then the instance of the Enumeration holds the
variable name of the value of the Enumeration
Beckhoff
Enumerations

 If eStep is of type E_Mode


then eStep holds either
‘Manual’, ‘Semi_Auto’, or
‘Auto’
New Automation Technology
Beckhoff Training
Beckhoff
Arrays

 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

 The position in the Array is referred to as the index


 The Array name along with an index can be used just like any other variable
Beckhoff
Arrays

 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

 Initializing each index of an array

 Initializing multiple indexes with the same value

 The above 2 examples can be mixed together


Beckhoff
Arrays

 Indexing through an Array with a FOR loop


 A FOR loop can be used to easily fill an Array or read the values in an array
 The following will set all values in the Array to 0
New Automation Technology
Beckhoff Training
Beckhoff
Breakpoints

 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

 Breakpoints can be used to aid in debugging the PLC code


 When the line is selected where the Breakpoint is to happen the PLC code will run
until that line of code is reached
 When the breakpoint is reached the PLC will stop running and the status of
variables can be seen in their current state
 This will allow the checking of the code to determine if the code is executing
properly
Beckhoff
Breakpoints

 To set a breakpoint click on the line, placing


the cursor where you wish the PLC to stop

 From the PLC menu select Toggle Breakpoint

 Note: Breakpoints can only be set on lines that


have the gray circle.
Beckhoff
Breakpoints

 The Breakpoint has now been set on Line 4

 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

 The PLC menu provides the


programmer with a list of options
 The Run (F5) command will start the
PLC again and it will run until it hits a
breakpoint
 The Toggle Breakpoint(F9) command
will remove or add a Breakpoint at the
line where the cursor is currently located
 Step over (F10) will execute the line of code
and go to the next line of code
If a call to another POU is on the line of
code being executed, the POU will run in
its entirety
Beckhoff
Breakpoints

 Step Into (F11) will perform the same


action as Step over with the added
functionality of opening the called POU
and stepping through its code line by line
Note: The Step in command will not
open a POU inside of a library
 Step Out (Shift + F11) will leave the current
POU and return to the calling POU
TwinCAT 3

Beckhoff TwinCAT 3
Multiple PLC Tasks

TWINCAT 3

Beckhoff TwinCAT 3
Multiple PLC Tasks

 Right-Click on POUs, select ‘Add’, then select ‘POU…’

Beckhoff TwinCAT 3
Multiple PLC Tasks

 Give the POU a name


 Set the ‘Type’ to
‘Program’
 Click ‘Open’

Beckhoff TwinCAT 3
Multiple PLC Tasks

 The new Program has been added to the ‘POU’ list

Beckhoff TwinCAT 3
Multiple PLC Tasks

 Under ‘PLC’, Right-Click ‘Untitled1 Project’, select ‘Add’,


select ‘Referenced Task…’

Beckhoff TwinCAT 3
Multiple PLC Tasks

 In the ‘New Task’ section, provide a unique name for the


‘Task’
 Click ‘Create New Task’

Beckhoff TwinCAT 3
Multiple PLC Tasks

 Select the task under the


‘Available Tasks:’ column
 Click ‘Open’

Beckhoff TwinCAT 3
Multiple PLC Tasks

 The new task has been added

Beckhoff TwinCAT 3
Multiple PLC Tasks

 Right-Click on the name of the new task


 Select ‘Add’, ‘Existing Item…’

Beckhoff TwinCAT 3
Multiple PLC Tasks

 Select the desired


POU name from
the ‘Items’
section
 Click ‘OK’

Beckhoff TwinCAT 3
Multiple PLC Tasks

 The ‘POU’ is now called by the ‘Task’

 Double-Click on the Task to view its properties

Beckhoff TwinCAT 3
Multiple PLC Tasks

 The first Task is at


Port 350 with a
Priority of 20
 The second Task is
at Port 351 with a
Priority of 21

Beckhoff TwinCAT 3
Multiple PLC Tasks

 Adjust the ‘Cycle


Ticks’ to change
how often the
task starts its
execution.
 The lower the
priority (closer to
0), the lower the
ticks.

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

1. High Performance Control

2. Scalable Hardware

3. One Software TwinCAT

4. Outstanding Diagnostics

10.01.2013 3
TC3 TwinSAFE
High Performance Control
High Performance expands possibilities

1 controller

50us PLC scan rate

30us I/O update rate

Synchronous Scan

10ns resolution w/
XFC Terminals

100 data point w/


Oversampling
Terminals
11,000 Terminal Demo
250us Motion task 4ms update rate
10.01.2013 4
TC3 TwinSAFE
Safety and standard I/O in one system

1. High Performance Control

2. Scalable Hardware

3. One Software TwinCAT

4. Outstanding Diagnostics

10.01.2013 5
TC3 TwinSAFE
Scalable Hardware
Scalable I/O including TwinSAFE works with any size system

1 Controller

1 EtherCAT NIC(built in)

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

400+ Terminal Types

IP20, 65, 67, IP69K

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

266Mhz Atom CPU

2.1Ghz i7 Quad Core

Multi HD Raid

SSD

Cfast Flash

Fan/Fanless

Integrated PB‘s/LT‘s

All TwinSAFE ready

10.01.2013 9
TC3 TwinSAFE
Scalable Hardware
Scalable Motion

255 Axis

2 axis per drive

Single Cable
Power/Feeback

Linear

Synchronous

Stepper

All TwinSAFE ready

10.01.2013 10
TC3 TwinSAFE
Scalable Hardware
Scalable Safety: TwinSAFE System

•IPC

•TwinCAT Development
Software

•TwinSAFE CPU Logic


Controller Terminal

•TwinSAFE Input Terminal

•TwinSAFE Output Terminal

10.01.2013 11
TC3 TwinSAFE
Scalable Hardware
Scalable Safety: TwinSAFE System

•Certified to SIL 3 according to


IEC 61508, EN 954 Cat. 4 and
and DIN EN ISO 13849 PLe

•Approvals: UL, CE, ATEX

•Enables networks with up to


1,024 TwinSAFE devices

•Safe Motion

•The required functions are


configured via TwinCAT
Development software

•All TwinSAFE data can be sent


to other Network Protocols
ie:Ethernet/IP

•Complete Hardware/Software
diagnostics

10.01.2013 12
TC3 TwinSAFE
Scalable Hardware
Scalable Safety : TwinSAFE EL6900 CPU Logic Controller

•Supports up to 128 TwinSAFE


terminals.

•14 different Safety software


functions available. Can easily
be selected and linked.

•Multiple TwinSAFE Controllers


can co-exist within a network

•255 Function blocks total

•32 Independant TwinSAFE


Groups

•Dip switch on Terminal


required for certification 0-1023.
Diagnostic Lights:
Voltage
Temperature
Communication
Function Block

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

Logic of Channels: Light Curtains


• Single logic
• OSSD signals (two channel)
• asynchronous pulses,
• inactive sensortest
• OSSD signals (two channel)
• any pulse repetition, Laser Scanners
• inactive sensortest
• Cross-circuit detection
• cause no module fault

Safety Mats

10.01.2013 14
TC3 TwinSAFE
Scalable Hardware
Scalable Safety : TwinSAFE Input Terminals

•Fail-safe inputs

•Supports sensor test, short


clock signal every 250hz.

•Diagnostic Lights:
Voltage
Temperature
Sensor Test Dip switches on Terminal required
Cross Wiring for certification 0-65535 EL1904 4ch EL1908 8ch

Dip switches on Terminal required


for certification 0-4095

EP1908 8ch (IP65)


10.01.2013 15
TC3 TwinSAFE
Scalable Hardware
Scalable Safety: TwinSAFE Various Outputs

Standard outputs active: Standard and


•PLC output control is logically Safe output
AND connected with the safety
outputs. SafeState is always
ensured, has priority.

Current measurement active: Common


•Setting allows use of a common Ground wiring
ground for the safety outputs.
Enable/Disable min/max checks
of current measurement.

Testing of outputs active: Solid State


•Test pulses of the safety outputs Devices
can be deactivated.

10.01.2013 16
TC3 TwinSAFE
Scalable Hardware
Scalable Safety : TwinSAFE Output Terminals

• Fail-safe Outputs

• Switches 24 V DC actuators.

• Switches off automatically


(fail stop) if a fault is detected

• 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

Main voltage remains connected

No additional wiring or
switching device required!
10.01.2013 18
TC3 TwinSAFE
Scalable Hardware
Scalable Safety: Fieldbus Gateway

•IPC acts as built in


gateway to other
controllers on network.

•Integrate TwinSAFE
data to EthernetIP via
shared memory map.

•1 CIP connection for


many nodes of I/O.

•IPC can also be


programmed with PLC
IPC is generic E/IP slave
logic and motion logic.
498 bytes Input data
498 bytes Output data

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.

•Input / Output Memory


map connection occurs
as Scheduled Class1
Connection.

10.01.2013 20
TC3 TwinSAFE
Scalable Hardware
Scalable Safety: Field bus Gateway

•Input /Output Shared


Memory Map Data looks
just like any other I/O
Device

•Add 2nd NIC or


multiplex to expand
data xfer.

10.01.2013 21
TC3 TwinSAFE
Safety and standard I/O in one system

1. High Performance Control

2. Scalable Hardware

3. One Software TwinCAT

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.

• Each Estop can


be set for single
or dual contacts

• External Device
Monitoring
Inputs for
ensuring
Contactor is
switching states

• Use AND blocks


for more E-
stops.

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.

External Device Monitoring

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

• Hold down the 2.


left-click button

• 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

• Click and hold


connection and
drag connection
to another FB
connection 2.
point.

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

5. CTRL and Mouse


Wheel zooms
in/out
10.01.2013 40
TC3 TwinSAFE
One Software TwinCAT
Create TwinSAFE Function Block Variables

• 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

1. High Performance Control

2. Scalable Hardware

3. One Software TwinCAT

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

TC3 TwinSAFE Document


Demo

TC3 Diagnostics Runtime


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

 A TwinSAFE Project will consist of one or more TwinSAFE


Groups.
 Each group will have its own set of Safety Application
Variables and Function Blocks

TwinSAFE Project
TwinSAFE Group

FB Safety
Application
Variables

Beckhoff TwinCAT 3
Getting Started

 Each TwinSAFE Project is associated with an EL6900

EL6900 TwinSAFE Project


TwinSAFE Group

FB Safety
Application
Variables

Beckhoff TwinCAT 3
Getting Started

 Each Variable going into or out of the Group must pass


through an Alias

TwinSAFE Project

TwinSAFE Group Alias

FB Safety
Application Alias
Variables

Beckhoff TwinCAT 3
Getting Started

 The Alias is then connected to a PLC variable or to the I/O

Note: The I/O may be Safety I/O or Standard I/O depending on the application

TwinSAFE Project

TwinSAFE Group Alias


PLC

FB Safety
Alias
Application I/O
Variables

Beckhoff TwinCAT 3
TwinSAFE – Estop and Relay

TWINCAT 3

Beckhoff TwinCAT 3
Estop and Relay

 Scan in the Hardware


 Add a PLC Project and create the following Global Variables

Beckhoff TwinCAT 3
Estop and Relay

 In the body of MAIN add the following line of code

Beckhoff TwinCAT 3
Estop and Relay

 Right-Click on the Project and select ‘Rebuild’

Beckhoff TwinCAT 3
Estop and Relay

 Link the PLC Input variable to the first push button

Beckhoff TwinCAT 3
Estop and Relay

 Right-Click on ‘Safety’ and select ‘Add New Item’

Beckhoff TwinCAT 3
Estop and Relay

 Select ‘TwinCAT Default Safety Project’


 Name the project
 Click ‘Add’

Beckhoff TwinCAT 3
Estop and Relay

 The Author and Internal Project Name can be supplied


 Click ‘OK’

Beckhoff TwinCAT 3
Estop and Relay

 Right-Click on the ‘Project’ and select ‘Properties’

Beckhoff TwinCAT 3
Estop and Relay

Beckhoff TwinCAT 3
Estop and Relay

 Click on the ‘Map’ button

Beckhoff TwinCAT 3
Estop and Relay

 Select the EL6900 that this TwinSAFE Project will be


associated with
 Click ‘OK’

Beckhoff TwinCAT 3
Estop and Relay

 The information of the EL6900 that was selected is


displayed

Beckhoff TwinCAT 3
Estop and Relay

 Verify the Dip-Switch address, then click the green Up


arrow. This will copy the Dip-Switch value into the FSoE-
Address

Beckhoff TwinCAT 3
Estop and Relay

 Before moving on, these values need to be saved


 Notice the TAB at the top has an * next to it, this means the
data has not been saved.

Beckhoff TwinCAT 3
Estop and Relay

 Right-Click on the Project Tab and select ‘Save Selected


Items’

Beckhoff TwinCAT 3
Estop and Relay

 Expand each Item in the tree under SAFETY


 Double-Click on the ErrorAcknowledgement.sds

Beckhoff TwinCAT 3
Estop and Relay

 Click the ‘Map’ button

Beckhoff TwinCAT 3
Estop and Relay

 Select the PLC variable for Error Acknowledge and click ‘OK’

Beckhoff TwinCAT 3
Estop and Relay

 Right click on ‘Alias Devices’ and select ‘Import Alias-


Devices from I/O-configuration’

Beckhoff TwinCAT 3
Estop and Relay

 Select All Safety I/O to be associated with this TwinSAFE


Group
 Click ‘OK’

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

 From the ‘View’ menu select


‘Properties Window’

Beckhoff TwinCAT 3
Estop and Relay

 Under the ‘Safety’ Item, Double-Click on


‘TwinSafeGroup1.sal’

Beckhoff TwinCAT 3
Estop and Relay

 Left-Click in the empty area of ‘Network1’

Beckhoff TwinCAT 3
Estop and Relay

 In the ‘Properties’ windows select the down arrow

Beckhoff TwinCAT 3
Estop and Relay

 Select ‘TwinSAFE Safety Application’ from the drop down


list

Beckhoff TwinCAT 3
Estop and Relay

 The properties window now displays the ‘Safety Application


Variables’ that can be connected to an Alias

Beckhoff TwinCAT 3
Estop and Relay

 Click on the Ellipse button to map the Alias

Beckhoff TwinCAT 3
Estop and Relay

 Select ‘Channel 1’ of the ‘ErrorAcknowledgement’ Alias


 Click ‘OK’

Beckhoff TwinCAT 3
Estop and Relay

 It is now possible to expand the ErrAck and se what it is


connected to

Beckhoff TwinCAT 3
Estop and Relay

 From the ‘View’ menu, select ‘Toolbox’

Beckhoff TwinCAT 3
Estop and Relay

 The Safety Toolbox contains items that can be


added to the TwinSafeGroup1.sal file

Beckhoff TwinCAT 3
Estop and Relay

 Under the ‘Function Blocks’ group, select ‘safeEstop’


 Click and drag the item to place it on the network

Beckhoff TwinCAT 3
Estop and Relay

 Left-click on the ‘Restart’ input

Beckhoff TwinCAT 3
Estop and Relay

 The ‘Properties’ window should now display the properties


of the ‘Restart In Port’

Beckhoff TwinCAT 3
Estop and Relay

 In the ‘Assigned Variable Name’ create a unique name for


the Input and pres ‘Enter’
 SafetyRestartPB

Beckhoff TwinCAT 3
Estop and Relay

 The name should now be displayed next to the input of the


Function Block

Beckhoff TwinCAT 3
Estop and Relay

 Repeat these steps to Assign Variable Names to the first 2


Inputs and the Estop Output

Beckhoff TwinCAT 3
Estop and Relay

 From the ‘View’ menu,


select ‘Other Windows’
and then ‘Variable
Mapping’

 This window is typically


opened automatically and
can be found next to the
‘Error’ or ‘Output’
windows

Beckhoff TwinCAT 3
Estop and Relay

 The ‘Variable Mapping’ window contains the variables that


were created in the Safety Networks
 From here these variables can be connected to an Alias

Beckhoff TwinCAT 3
Estop and Relay

 Select the Ellipse button of the Restart

Beckhoff TwinCAT 3
Estop and Relay

 Select the Alias that is connect to the Safety Hardware


Input

Beckhoff TwinCAT 3
Estop and Relay

 The ‘Port Name’ is provided by the ‘Function Block’


 The ‘Assigned Variable’ is created by the programmer
 The ‘Alias Port’ is the connection to an Alias that will then
connect to something outside of the TwinSAFE Group

Beckhoff TwinCAT 3
Estop and Relay

 Select the Ellipse button for EStopInput1


 Select the Alias for Channel 1 of the EL1904

Beckhoff TwinCAT 3
Estop and Relay

 Select the Ellipse button for EStopInput2


 Select the Alias for Channel 3 of the EL1904

Beckhoff TwinCAT 3
Estop and Relay

 Select the Ellipse button for EStopOutput


 Select the Alias for Channel 1 of the EL2904

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

 From the ‘View’ menu,


select ‘Toolbars’, and
then select ‘TwinCAT
Safety Toolbar’

Beckhoff TwinCAT 3
Estop and Relay

 The Safety Toolbar is configured in the order of operation


for the needed commands
 The Toolbar will be grayed out if the active window is not
part of the Safety Project.

Beckhoff TwinCAT 3
Estop and Relay

 Verify Safety Project (Project Level)


 Verify Complete Safety Project (Project and Hardware
Level)
 Download Safety Project

Beckhoff TwinCAT 3
Estop and Relay

 Click on Verify Safety Project (Project Level)

 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

 Click on Verify Complete Safety Project (Project and


Hardware Level)

 In addition to the Safety Project, this will also check the


Safety Hardware Configuration

Beckhoff TwinCAT 3
Estop and Relay

 Before downloading the Safety Project to the EL6900, verify


that the Serial Number is correct
 Right-Click on the Project and select ‘Properties’

Beckhoff TwinCAT 3
Estop and Relay

 Verify the Serial Number matches the serial number


printed on the hardware
 When working with Multiple EL6900s, this will help to
ensure that the correct program is being loaded

Beckhoff TwinCAT 3
Estop and Relay

 Double-click the Serial Number to select it


 Right-click on it, then select ‘Copy’

Beckhoff TwinCAT 3
Estop and Relay

 Click on ‘Download Safety Project’

Beckhoff TwinCAT 3
Estop and Relay

 Provide the Login Information for the EL6900


 This information is CASE senstitive

 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

 Activate the Configuration


 Restart TwinCAT in Run Mode
 Login and start the PLC

Beckhoff TwinCAT 3
Estop and Relay

 The TwinSAFE Group will have a Com Error


 Press the ErrAck Push Button to clear it

 Depress and then twist the Estop push button to ensure


that it is reset
 Press the Restart push button to restart the Safety Function
Block

 The relay should now be pulled in

Beckhoff TwinCAT 3
TwinCAT 3

Beckhoff TwinCAT 3
Changing Fonts

TWINCAT 3

Beckhoff TwinCAT 3
Changing Fonts

 From the ‘Tools’ menu select


‘Options’

Beckhoff TwinCAT 3
Changing Fonts - ST

 TwinCAT – PLC Environment – Text Editor

Beckhoff TwinCAT 3
Changing Fonts - ST

 Select the ‘Text area’ tab


 Click on the ‘Font’ Box at the bottom

Beckhoff TwinCAT 3
Changing Fonts – FBD, LD, IL

 TwinCAT – PLC Environment – FBD, LD and IL Editor

Beckhoff TwinCAT 3
Changing Fonts – FBD, LD, IL

 Select the ‘General’ tab


 Click on the ‘Font’ Box at the bottom

Beckhoff TwinCAT 3
TwinCAT 3

Beckhoff TwinCAT 3
Data Type Comparison

TWINCAT 3

Beckhoff TwinCAT 3
Data Type Comparison

System IEC61131- .Net Type C# Visual


Manager 3 Keyword Basic
Keyword
BIT BOOL System.Boolean bool Boolean

BIT8 BOOL System.Boolean bool Boolean


BITARR8 BYTE System.Byte byte Byte
BITARR16 WORD System.UInt16 ushort -
Data Type Comparison

System IEC61131- .Net Type C# Visual


Manager 3 Keyword Basic
Keyword
INT8 SINT System.SByte sbyte -

INT16 INT System.Int16 short Short


INT32 DINT System.Int32 int Integer
INT64 LINT System.Int64 long Long
Data Type Comparison

System IEC61131- .Net Type C# Visual


Manager 3 Keyword Basic
Keyword
UINT8 USINT System.Byte byte Byte

UINT16 UINT System.UInt16 ushort -


UINT32 UDINT System.UInt32 uint -
UINT64 ULINT System.UInt64 ulong -
Data Type Comparison

System IEC61131- .Net Type C# Visual


Manager 3 Keyword Basic
Keyword
FLOAT Real System.Single float Single

DOUBLE LREAL System.Double double Double


TwinCAT 3

Beckhoff TwinCAT 3
Password Protection

TWINCAT 3

Beckhoff TwinCAT 3
Password Protection

 It is possible to protect parts of the TwinCAT Project and


prevent changes from being made.

Beckhoff TwinCAT 3
Password Protection

 Double-click on the ‘System’

Beckhoff TwinCAT 3
Password Protection

 Select the ‘Protection’ tab

Beckhoff TwinCAT 3
Password Protection

 Press ‘Enter Credentials’

Beckhoff TwinCAT 3
Password Protection

 Supply a ‘User Name’ and ‘Password’


 Click ‘OK’

Note: The User Name and Password are both Case Sensitive

Beckhoff TwinCAT 3
Password Protection

 The Protection has been applied, but you are currently


logged in as the User you created.

Beckhoff TwinCAT 3
Password Protection

 Select ‘File’, then ‘Save All’

Beckhoff TwinCAT 3
Password Protection

 Select ‘File’, then ‘Close Solution’

Beckhoff TwinCAT 3
Password Protection

 Select ‘File’, then ‘Open’, then ‘Project/Solution’

Beckhoff TwinCAT 3
Password Protection

 Select your solution file, then press ‘Open’

Beckhoff TwinCAT 3
Password Protection

 Notice the ‘Activate Configuration’ icon is grayed out


 It is possible to put the system in ‘Config Mode’ and also
‘Restart TwinCAT’
 Although settings can be changed, they can not be
activated

Beckhoff TwinCAT 3
Password Protection

 Double-click on the ‘System’

Beckhoff TwinCAT 3
Password Protection

 Notice the red box, this indicates that the ‘System’ is


protected
 It is still possible to edit
the PLC
 Use the
‘Enter Credentials’
button to login and
access the
‘Activate Configuration’
button

Beckhoff TwinCAT 3
TwinCAT 3

Beckhoff TwinCAT 3
Source code download

TWINCAT 3

Beckhoff TwinCAT 3
Source code download

 By default the source code will be placed in the boot folder


on the target device
 This will allow for the source code to be read and modified
 It is also possible to disable this feature

Beckhoff TwinCAT 3
Source code download

 Double-click the project name under ‘PLC’

Beckhoff TwinCAT 3
Source code download

 Select the ‘Settings’ tab

Beckhoff TwinCAT 3
Source code download

 By default the ‘Project Sources’ are created on the target


device in the boot folder

Beckhoff TwinCAT 3
Source code download

 De-select the ‘Project Sources

Beckhoff TwinCAT 3
Source code download

 Right-Click on the project and select ‘Activate Boot Project’

Beckhoff TwinCAT 3
Source code download

 The boot folder now contains only the compiled libraries

Beckhoff TwinCAT 3

S-ar putea să vă placă și