0% found this document useful (0 votes)
92 views33 pages

002 TwinCAT3 QuickStart SampleProject

Uploaded by

Shubham Patil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
92 views33 pages

002 TwinCAT3 QuickStart SampleProject

Uploaded by

Shubham Patil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 33

Quick Start Tc3

Create New Project

Create a New Project, about the


Start Page or the New Project
Icon

Choose a Location and a Project


Name

2
User Surface

Menu bar Toolbars

Solution Toolbox
Explorer Window

Editor
Properties
Window

Runtime
Modus
Information and Status line Message
Window

3
TC3 configuration for PC based Control System
TC3 configuration for PC based Control System

The real-time Ethernet Miniport driver of TwinCAT


works with all Ethernet adapters of the Intel 8255x
series and as well with the integrated Ethernet adapter
inside the Intel I/O Hub

2
TC3 configuration for PC based Control System

The devices connected to system


can be scanned.

In the Solution Explorer, right-click


on “Devices” under I/O and select
“Scan”.

A device scan is only


3 possible from a target
system that is in Config
mode.

4
TC3 configuration for PC based Control System

7
Free Run Modus

Switch off Free Run


Modus

Runtime is running
in Free Run

8
Test inputs in Free Run mode

After selecting a
terminal, the online
status of the variables
is displayed in the
overview window.

9
Write outputs in Free Run Mode

To write the Output , select the terminal and click on the


output in the overview with the right mouse button .
About the menu you can write the Output directly.
Online Write `0` or `1`
Online Write… Dialog

1
4

10
Test outputs in Free Run Mode

After selecting an
output Terminal, the
status of the variables
can be written in the
overview window.

11
Creating a standard PLC project

One or several PLC projects


can be created via the PLC
folder in the Solution Explorer.

1 2

5
4
Local PLC variable declaration & Creating Instance

Fill the created Local


Variable List in MAIN
POU to be linked
with the I/O. Static and
Automatic addressing is
used here
Create Global Variable List

The created Global Variable List, must be filled with Variables


which should be associated with the I / O . Here the automatic
addressing is used .

14
Linking variables via the PLC instance

2 Right-click on the
respective variable in
the PLC instance and
select “Change Link”
to select the link
target in the device
tree (connection
point).

3 4
Build, rebuild and clean

Build (compile)
This command starts the compile process for the active
application. This means that the syntax of all objects of
this application are checked. The compile process runs
automatically before each login when the program has
changed. If the program was not changed since the last
error-free compile process, it is not recompiled.

Rebuild (recompile)
This command starts the compile process for the active
application, even if it was already compiled without error.

Clean
This command deletes the compile information for the
active application.
Activation of the configuration

The configuration can be set to RUN mode via


the “Activate Configuration” button.

1
2

The response is indicated via the green


TwinCAT icon in the status bar in TwinCAT
XAE.
Login PLC and Start

About the Login button, can the PLC Project be downloaded and
switched to Online Mode:

PLC Login
1

After logging in , the PLC must if necessary be started :

PLC Start
2

The other Buttons are to Stop or Logout of the PLC:

PLC Logout

PLC Stop
18
Create FB_Blinker in FBD

 To the already created POU MAIN a functional block


FB_Blinker is added
 By " right-click " on POU you can add another Function
Block in FBD

4
1
2 3
5

6
19
Insert Box

Depending on the selected language , the " Toolbox " contains


elements for insertion into the module :

Simply by drag and drop the first box is drawn in the first
network . Total 3 boxes are needed , which are inserted one
by one.
20
Setup of the FBs

The indicators should be realized by an AND condition and


two time blocks of type TON. Which in the next step, are
each assigned an instance name .

21
Instantiation

 Tapping the Implementation - name


for a timer ( TON ) , opens the
Selection Guide .
 Now, if the instance name
fbTimer1 by selecting the ???
awarded above the box, so the
Auto Declare window open to
create the instance .
 If you confirmed the entries here,
the instance of the selected Object
FB_Blinker is created in the lokal
Declartion area under VAR.
 Similarly, the second box is
instantiated .

22
Instantiation

 The first Box in the network, is an


AND block . Since it is a function,
no instantiation is necessary.
 On the first Input of the AND Box, a
Variable bStart is connected.
 Once this, in place of ??? is
entered , the Auto Declare window
will open.
 As location (Scope ) here
VAR_INPUT is selected.
 The variable type ( Type ) is
automatically detected based on
the block .

23
Insert Negation

 The second input of the AND gate


is linked to the Q output of the
second timer fbTimer2 by Name. A 1

negation must be entered.


2
 Via the inputs PT, of the fbTimer1
and 2, the flashing time is
choosen. For this reason two
Variables will be created.
 When you create the variables
„tSwitchOnDelay“ and
„tSwitchOffDelay“ the Auto Declare
Window again. As location(Scope),
here VAR_INPUT is also selected.

24
Insert Assignment
1
 About right-click a Assignment is
connected behind fbTimer1.
2
 A Variable bLed must be created.
 The Variable must be declared
as VAR_OUTPUT.
 On unused Signals, of functions
or function blocks , the " ??? "
must be deleted .

25
The Function Block

The Function Block FB_Blinker is now ready. He contains


all the necessary components and can now be instantiated
and accessed

26
Create Program Digital
1

 The instance of the Function 2


Block “FB_Blinker” can be
called in a Program.
3
 This is applied in this example
as a Program Digital .

27 4
Create instance of FB_Blinker

 Insert Box
 By tapping the Implementation
name FB_Blinker, opens the
Selection Guide .
 Insert now, the Instance name
fbBlinker1 on the ??? . The Auto
Declare window will opens.
 By pressing the OK Button, the
Instance will be inserted in the
Declaration area.

28
Connect Variables to fbBlinker1

 The inputs and outputs of the function block must now be


linked to variables. Here the global variables bSwitch10
and bLed10 should be used.
 The variables can be inserted easily manually
programmed, or by use of the input help ( F2 ) .
 For the switching ON and OFF delay, a value of 1
second is used .

29
Call the Program Digital in Main

 The Program Digital needs to be


called in the Main Program, for cyclic
processing.
 The variables can be inserted easily
manually programmed, or by
use of the input help ( F2 ) .

30
Onlinechange

 About the login button the change


PLC Login
of the PLC Project, can be
1
downloaded, via online change

31
Online View fbBlinker1

 By double click, on the


FB_Blinker in the Solution
Explorer, you can get the
online view.

32
Contact

Beckhoff Automation Pvt. Ltd.


Suite 4, Level 6, Muttha Towers, Phone: + 91 20 / 4000 4800
Don Bosco Marg Fax: + 91 20 / 4000 4999
Pune – 411006  E-Mail: [email protected]
India Support: [email protected]
Service: [email protected]
Web: www.beckhoff.com

All images are protected by copyright. The use and transfer to third parties is not permitted.

Beckhoff®, TwinCAT®, EtherCAT®, Safety over EtherCAT®, TwinSAFE®, XFC® and XTS® are registered
trademarks of and licensed by Beckhoff Automation GmbH. Other designations used in this presentation may
be trademarks whose use by third parties for their own purposes could violate the rights of the owners.

The information provided in this presentation contains merely general descriptions or characteristics of
performance which in case of actual application do not always apply as described or which may change as a
result of further development of the products. An obligation to provide the respective characteristics shall only
exist if expressively agreed in the terms of contract.

You might also like