10
PLC-ANALYZER pro 5 The logic analyzer for programmable logic controls www.autem.de Driver-Addendum Driver Beckhoff TwinCAT recording of TwinCAT-variables

Download-En_-manuals-Driver Beckhoff TwinCAT - Recording of TwinCAT-Variables

Embed Size (px)

DESCRIPTION

Download-En_-manuals-Driver Beckhoff TwinCAT - Recording of TwinCAT-Variables

Citation preview

Page 1: Download-En_-manuals-Driver Beckhoff TwinCAT - Recording of TwinCAT-Variables

PLC-ANALYZER pro 5

The logic analyzer forprogrammable

logic controls

AUTEM GmbHDithmarscher Str. 29D-26723 Emden

Tel. +49-(0)4921-9610-0Fax +49-(0)4921-9610-96E-Mail [email protected] www.autem.de

Driver-Addendum

Driver

Beckhoff TwinCATrecording of TwinCAT-variables

Page 2: Download-En_-manuals-Driver Beckhoff TwinCAT - Recording of TwinCAT-Variables

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 Straße 29

D - 26723 Emden Germany

Telefon +49-4921-9610-0

Telefax +49-4921-9610-96

eMail [email protected]

http:// www.autem.de

AUTEM makes no guarantee for this manual. This includes both expressly given or tacit guarantees for commer-

cially 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

Page 3: Download-En_-manuals-Driver Beckhoff TwinCAT - Recording of TwinCAT-Variables

Table of Contents

iii

Table of contents

1 INSTALLATION 1-1

1.1 Installation of TwinCAT driver 1-1 1.1.1 Installing additional hardware 1-1 1.1.2 Installing additional software 1-1

1.2 Configuration of TwinCAT driver 1-2

2 DATA ACQUISITION 2-1

2.1 Recordable addresses 2-1 2.2 Number of simultaneously recordable addresses 2-1 2.3 Timing behaviour and particularities during data acquisition 2-1

3 INTRODUCTION TO TWINCAT I/O 3-1

3.1 Definition of I/O devices 3-1 3.2 Task definition 3-1 3.3 Set up variables 3-2 3.4 Export list of variables 3-3 3.5 Start TwinCAT 3-3

Table of figures

Fig. 1-1 Configuration of TwinCAT driver 1-2 Fig. 3-2 Definition of I/O devices 3-1 Fig. 3-3 Task definition 3-1 Fig. 3-4 Set up variables 3-2 Fig. 3-5 Link variables 3-2 Fig. 3-6 Export variables 3-3

Page 4: Download-En_-manuals-Driver Beckhoff TwinCAT - Recording of TwinCAT-Variables

Configuration of the driver

1-1

1 Installation

This driver addendum is additional to the PLC-ANALYZER pro handbook and explains par-

ticularities 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/PROFIBUS-

driver 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 Twin-

CAT-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.

Page 5: Download-En_-manuals-Driver Beckhoff TwinCAT - Recording of TwinCAT-Variables

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). It’s 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 synchro-

nous (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.

Page 6: Download-En_-manuals-Driver Beckhoff TwinCAT - Recording of TwinCAT-Variables

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 varia-

bles 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 vari-

ables (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.

Page 7: Download-En_-manuals-Driver Beckhoff TwinCAT - Recording of TwinCAT-Variables

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 Bit y from input byte x E4.6;BOOL

Ax.0;BYTE Output byte x A23.0;BYTE

Varx;WORD Variable word of selected index-group (offset x) Var52;WORD

Ax.0;INT Signed output integer x A23.0;INT

Vary:x;DINT Variable double word (index-group y, offset x) Var4040:30;DINT

Ex.0;REAL Input double word x in real format 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 con-

tains 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.

Page 8: Download-En_-manuals-Driver Beckhoff TwinCAT - Recording of TwinCAT-Variables

Introduction in TwinCAT I/O

3-1

Fig. 3-2 Definition of I/O devices

Fig. 3-3 Task definition

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 De-

vice 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.

3.2 Task definition

After adding the right devices cre-

ate 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 in-

terval at Cycle ticks.

Set the task Port. The port number

clearly identifies the task. This

assignment will be needed for re-

cording the TwinCAT-variables

with TwinCAT driver (see chapter

1.2 configuration of the TwinCAT-

driver).

Page 9: Download-En_-manuals-Driver Beckhoff TwinCAT - Recording of TwinCAT-Variables

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.

Page 10: Download-En_-manuals-Driver Beckhoff TwinCAT - Recording of TwinCAT-Variables

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 Acti-

vate 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 vari-

ables.