You are on page 1of 10

Driver-Addendum

Driver
Beckhoff TwinCAT
recording of TwinCAT-variables

PLC-ANALYZER pro 5

www.autem.de

The logic analyzer for


programmable
logic controls

Driver-Addendum
Beckhoff TwinCAT
Copyright 1995 - 2011 AUTEM GmbH. All rights reserved. No part of this user manual, including excerpts,
may be reproduced, photocopied, or electronically stored without express written permission by AUTEM.

The software described in this manual is subject of a software licensing agreement and may be used only according
to the terms of this agreement.

AUTEM GmbH
Dithmarscher Strae 29
D - 26723 Emden
Germany
Telefon
Telefax
eMail
http://

+49-4921-9610-0
+49-4921-9610-96
info@autem.de
www.autem.de

AUTEM makes no guarantee for this manual. This includes both expressly given or tacit guarantees for commercially accepted quality and suitability for a particular use. AUTEM accepts no liability for errors in the manual or
for damages that may occur as a result of using or applying this material.
The names of particular software and hardware products mentioned in this book are mostly registered trademarks
whose usage is subject to the terms of appropriate law.
We are thankful for any comments, suggestions, or ideas you may be willing to write us.

1st Edition 2011

Table of Contents

iii

Table of contents

INSTALLATION
1.1

Installation of TwinCAT driver


1.1.1 Installing additional hardware
1.1.2 Installing additional software
1.2
Configuration of TwinCAT driver

DATA ACQUISITION
2.1
2.2
2.3

Recordable addresses
Number of simultaneously recordable addresses
Timing behaviour and particularities during data acquisition

INTRODUCTION TO TWINCAT I/O


3.1
3.2
3.3
3.4
3.5

Definition of I/O devices


Task definition
Set up variables
Export list of variables
Start TwinCAT

1-1
1-1
1-1
1-1
1-2

2-1
2-1
2-1
2-1

3-1
3-1
3-1
3-2
3-3
3-3

Table of figures
Fig. 1-1
Fig. 3-2
Fig. 3-3
Fig. 3-4
Fig. 3-5
Fig. 3-6

Configuration of TwinCAT driver


Definition of I/O devices
Task definition
Set up variables
Link variables
Export variables

1-2
3-1
3-1
3-2
3-2
3-3

Configuration of the driver

1-1

1 Installation
This driver addendum is additional to the PLC-ANALYZER pro handbook and explains particularities and provides important information for the use of the following driver:
Beckhoff TwinCAT
The listed driver enables very fast recording of variables, which were defined by the software
TwinCAT from Beckhoff. TwinCAT-variables depict a lot of different process variables from
different automation networks (PROFIBUS, INTERBUS-S, CAN, DeviceNet, Ethernet, USB...)
or from TwinCAT PLC Control. Up to 1000 process variables with a scan interval of 1 ms can
be recorded.

1.1 Installation of TwinCAT driver


You can install the Beckhoff TwinCAT driver when PLC-ANALYZER pro is running. Select
PLC driver in the menu Extras. In the window PLC driver click the button Add. If the desired
driver is not in the list, then you have to install a new driver by activation via the License-Key
management (s. user manual PLC-ANALYZER pro 5 chapter 2-2 Installation).
PLC-ANALYZER pro also allows loading several equivalent or different PLC drivers. E.g., it is
possible to record signals with the TwinCAT driver and signal files via the MPI/PROFIBUSdriver for SIMATIC S7-PLC at the same time.

WARNING
Errors that may occur in the automated facility endangering humans or causing
large-scale material damage must be prevented by additional external precautions.
These precautions (e.g. independent limit monitors, mechanical interlocks) must
guarantee a safe operation even in the case of dangerous errors.

1.1.1 Installing additional hardware


For using the Beckhoff TwinCAT driver no further hardware is needed
1.1.2 Installing additional software
Besides PLC-ANALYZER pro base module and the TwinCAT-driver, an installation of TwinCAT-software from Beckhoff is necessary. The latter software is used to define variables, which
can be recorded by PLC-ANALYZER pro 5 via the TwinCAT-driver.

Configuration of the driver

1-2

1.2 Configuration of TwinCAT driver


After installing the driver you can change important parameters under Properties. If you have
loaded several drivers, you can set the properties for each driver individually.

Fig. 1-1 Configuration of TwinCAT driver

First enter a meaningful name. Under Port you select the port of your task defined in TwinCAT
software (s. section 3.2 Task definition). Its also possible to enter a port of a TwinCAT-PLC
(e.g. 801). Select an Index group of the selected task. Select Default, if you want to record
only inputs and outputs, resp. if you want to read available variables directly from the selected
port (Symbolic).
With TwinCAT it is possible to make a remote access of variables. The remote computer is
specified by AMS Net-ID. By selection of Local PC the driver accesses TwinCAT tasks from
local PC.
Choose the Acquition mode. TwinCAT variables can be recorded event controlled or synchronous (polling). If you choose event controlled recording, all variables are transmitted to the
driver with the cycle time set in TwinCAT. In synchronous mode the driver polls the variables
to be recorded cyclically.
Use Time stamp to specify, if the time stamps should be entered into the signal file continually
(at every scan point) or only for signal changes. For a continuous time stamp the exact scan
points are documented even for a signal which does not change. The signal files are therefore
larger.

Configuration of the driver

1-3

Under Scan interval enter the length of time between read-out of data from the PLC. A longer
scan interval may be chosen for non-critical time signals, e.g. temperature. The signal files thus
created become smaller.
Under Symbolic you can assign a symbol file to the loaded driver. Therefore use Add. If variables within the choosen tasks are found, these will be selected automatically by confirmation
and saved in a list of variables. Otherwise it is possible to assign a TwinCAT export list of variables (s. chapter 3.4 Export list of variables). Especially if variables from TwinCAT PLC tasks
(e.g. port 801) should be recorded, the direct reading of all available variables is useful.
This makes the use of a symbolic identifier for the address definition possible (s. user manual
PLC-ANALYZER pro 5 - chapter 4.1 Address selection). Besides the absolute addresses, the
symbolic identifier and the comments will be shown and stored in a signal- or project-file.

Data acquisition

2-1

2 Data acquisition
2.1 Recordable addresses
Variables from TwinCAT PLC and with TwinCAT defined input- and output variables (see 3.3
Set up variables) can be recorded. The format will be bit or byte, word or double word. The
following table shows a list with examples of recordable addresses and their appropriate syntax:
Syntax

Address type

Example

Ex.y;BOOL
Ax.0;BYTE
Varx;WORD
Ax.0;INT
Vary:x;DINT
Ex.0;REAL

Bit y from input byte x


Output byte x
Variable word of selected index-group (offset x)
Signed output integer x
Variable double word (index-group y, offset x)
Input double word x in real format

E4.6;BOOL
A23.0;BYTE
Var52;WORD
A23.0;INT
Var4040:30;DINT
E60.0;REAL

Tab. 2-1 Variables and syntax

HINWEIS
It is more comfortable to use an exported variable table (see chapter 3.4 Export
list of variables) than entering single variables. The exported variable table contains the correct size and a symbolic name, which makes it easier to assign the
variables.

2.2 Number of simultaneously recordable addresses


With Beckhoff TwinCAT-driver you can record up to 1000 addresses simultaneously.

2.3 Timing behaviour and particularities during data acquisition


The interval between scans depends on the realtime settings made in the TwinCAT software.
The variable values will be updated in this time interval and shown in PLC-ANALYZER.
Depending on the PC-hardware you can record up to 1000 variables with a scan interval of
1 ms.

Introduction in TwinCAT I/O

3-1

3 Introduction to TwinCAT I/O


You must install TwinCAT I/O from Beckhoff and define the process variables you want to
record before using the Beckhoff TwinCAT driver. This chapter gives a short overview how to
define the variables in TwinCAT I/O.

3.1 Definition of I/O devices


After starting TwinCAT System Manager first add a
new I/O device to I/O configuration. Select I/O Device with the right mouse button. Then choose one
of the following menu items to add a device.
If you have already connected devices to your PC,
select Search device... Then mark and select the
desired devices in the list of found devices.
Choose Append device, if the devices are not yet
connected to the PC.
Fig. 3-2 Definition of I/O devices

3.2 Task definition


After adding the right devices create a new task. Therefore click
Additional Tasks with the right
mouse button and choose Append
Task. Give this task a meaningful
name.
Activate the control field Auto
start and enter the task update interval at Cycle ticks.

Fig. 3-3 Task definition

Set the task Port. The port number


clearly identifies the task. This
assignment will be needed for recording the TwinCAT-variables
with TwinCAT driver (see chapter
1.2 configuration of the TwinCATdriver).

Introduction in TwinCAT I/O

3-2

3.3 Set up variables


By creation of the task also the variable areas Inputs and Outputs are made. You can define your
variables here. Click with the right mouse button on Inputs and choose Insert Variable.

Fig. 3-4 Set up variables

Enter a meaningful name for the variable and choose a Variable Type. Press OK to apply these
settings.

Fig. 3-5 Link variables

Thereafter you have to assign the variable to a device component. Select Linked to... and select
an according linkage.

Introduction in TwinCAT I/O

3-3

3.4 Export list of variables


After you have created all desired variables, you have to export the list of variables for loading
it as symbol file in PLC-ANALYZER pro 5 later on (s. chapter 1.2 Configuration of TwinCAT
driver).

Fig. 3-6 Export variables

Activate Inputs of your task at the left side. The defined variables will be listed at the right side.
Press right mouse button in this window area and choose Export list. Enter the path where the
list of variables shall be saved.

3.5 Start TwinCAT


After you finished the definition of variables you have to update the configuration. Choose Activate Configuration in the menu Actions. After successful configuration you will be asked to
start the TwinCAT-system. Confirm with OK.
TwinCAT is now in the Run-Mode and PLC-ANALYZER is enabled to record the defined variables.

You might also like