PLC-ANALYZER - AUTEM

10

Transcript of PLC-ANALYZER - AUTEM

Page 1: PLC-ANALYZER - AUTEM
Page 2: PLC-ANALYZER - AUTEM

PLC-ANALYZER pro 6 - Driver Addendum

CoDeSys - All common protocols (e.g. Ethernet TPC/IP, CAN)

Copyright © 1993 - 2022 AUTEM GmbH. All rights reserved. No part of this user manual, including excerpts, maybe reproduced, photocopied or electronically stored without the expressive written permission of AUTEM.

The software described in this manual is subject of a software license agreement and may only be usedaccording to the terms of this agreement.

AUTEM GmbHDithmarscher Straße 2926723 EmdenGermany

+49 4921 9610 [email protected]

AUTEM does not give any warranty for this manual as well as no express or tacit warranties on commercialquality and suitability for a particular use. AUTEM does not take over adhesion for errors contained in it or fordamages that may occur as a result of using or applying this material.

The soft and hardware designations mentioned in this book are in most cases also registered trademarks andare subject to the legal regulations as such.

For references, suggestions and improvement suggestions we are always grateful. Please send these to AUTEM.

1st Edition 2022

Page 3: PLC-ANALYZER - AUTEM

PLC-ANALYZER pro 6 - CoDeSys

2 / 9

Table of Contents

Signal source .................................................................................................................................................. 3CoDeSys ................................................................................................................................................... 3

Installation .......................................................................................................................................... 3Installing additional hardware ......................................................................................................... 3Installing additional software .......................................................................................................... 3

Configuration ....................................................................................................................................... 4Enable variable export in (CoDeSys) programming software .................................................................. 6Data acquistion .................................................................................................................................... 7

Supported PLC models and CPUs ..................................................................................................... 7Recordable PLC addresses ............................................................................................................... 7Number of recordable addresses .................................................................................................... 7Time behaviour and particularities .................................................................................................. 7

Appendix A - Configuration file format ................................................................................................. 8

Page 4: PLC-ANALYZER - AUTEM

PLC-ANALYZER pro 6 - CoDeSys

3 / 9

Signal source

CoDeSysThis driver addendum describes the particularities of the following PLC drivers and gives you hints onusing them.

CoDeSys - all common protocols (e.g. Ethernet TCP/IP, CAN)

With the PLC driver CoDeSys variables can be acquired via all common protocols e.g., Industrial Ethernet(TCP/IP) or CAN from CoDeSys based (PLC-) systems. It is important that you read through the driver addendum before using a PLC driver. Please payattention to the WARNINGS that advise you on possible dangers when using PLC-ANALYZER pro.

! WARNING

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

InstallationThe PLC driver can be added to the project as a new signal source. If the driver you want is not yet in thelist of available signal sources, you must first activate the license for the PLC-driver with the AUTEMLicenseManager on your computer.

Installing additional hardware

If you have already connected your programming unit (or your PC) with the automation device, usuallynothing else must be done. Otherwise connect your PC with the PLC.

Installing additional software

No software is required in addition to the PLC-ANALYZER pro basic module and the PLC driver.

Page 5: PLC-ANALYZER - AUTEM

PLC-ANALYZER pro 6 - CoDeSys

4 / 9

ConfigurationOpen driver settings to set important parameters for data recording. If you have added the driver to theproject several times, you can set the properties individually for each individual driver.

Fig. 1-1 Settings Siemens CoDeSys

Choose a meaningful Name for the driver first, then enter under Destination the station address and theport of the controller.Activate Gateway if the controller can be reached via a CoDeSys gateway. Now enter all parameters necessary for the connection setup. With CoDeSys controllers these can bevery different. The correct settings can normally be found in the programming software / documentationof the respective controller manufacturer.

! WARNING

Make sure that the Byte order setting is correct. A wrong Byte order may result in thePLC going into STOP state.

Page 6: PLC-ANALYZER - AUTEM

PLC-ANALYZER pro 6 - CoDeSys

5 / 9

Under PLC type you can select pre settings for some PLC models. You can also change all parametersmanually.Alternatively, the connection settings can also be made via a configuration file (*.ini). Select "Defined inconfiguration file" under PLC type. Then select a configuration file that contains the data for establishingthe connection. The format of the configuration file is described in Appendix A - Structure of theConfiguration File.Use Connection test to check whether a connection to the controller can be established successfully. Under Symbols, select a Project to make the symbols of this project available for address selection. Thismakes it possible to use symbolc identifiers when entering addresses. In addition to the absoluteaddress, the symbolic identifier and comment are also displayed and stored in a signal- or project file.For using the symbolic identifiers it is necessary to enable the export of variables in the programmingsoftware (see Enable variable export in (CoDeSys) programming software ).After setting the communication properties, add the PLC signals to be recorded. When a project isloaded, the signals to be recorded can be conveniently selected from the symbol list by double-click ordrag and drop.

Page 7: PLC-ANALYZER - AUTEM

PLC-ANALYZER pro 6 - CoDeSys

6 / 9

Enable variable export in (CoDeSys) programming softwareThe export of variables must be enabled in the (CoDeSys) programming software to be able to usesymbolic identifiers while entering addresses in PLC-ANALYZER pro.

CoDeSys 2

Fig. 1-2 CoDeSys 2 - Enable export of variables

Open the project for which you want to enable variable export. Choose Options in menu Project. Select category Symbol configuration and activate Dump symbol entries. By choosing the buttonconfigure symbol file the window Set object attributes will be opened. Tag all objects, which variables shall be exported and activate the check box export variables of objects. Confirm with OK.

CoDeSys 3

Fig. 1-3 CoDeSys 3 - Symbol configuration

Create a symbol configuration and select the needed variables here. Then compile your project andcreate the code (in build menu). During code creation the symbol XML file will be created in the projectdirectory ("<ProjectName>.<Device>.Application.xml"). This xml file can be loaded int the driverconfiguration.

Page 8: PLC-ANALYZER - AUTEM

PLC-ANALYZER pro 6 - CoDeSys

7 / 9

Data acquistion

Supported PLC models and CPUs

The driver supports PLC models compliant with „CoDeSys Automation Alliance“.

Recordable PLC addresses

All variables of the PLC (global and local) can be recorded. Also structure- and array elements areaddressable.The following table shows the address syntax:

Variable type Syntax Example

Local variable POU.variable:type PLC_REG.VAL_A:INT

Global variable .variable:type .VALUE_B:DINT

.PRESS[4]:BYTETable 1-1 CoDeSys variable syntax

Number of recordable addresses

A maximum of 16 million addresses can be acquired from up to 250 signal sources.

Time behaviour and particularities

+NOTE

Acquiring data with PLC-ANALYZER pro results in a small increase in cycle time in thePLC to the same manner as it happens with programming software in the online-mode.

The intervals between scan transfers from the CoDeSys PLC to the computer are depending on the PLCtype, cycle time of PLC and the number of recorded addresses.For a PLC „ELAU PacDrive MAX-4“ the scan interval for a byte is approximately 2 ms, i.e. for a cycle timeof 2 ms there is one scan for each cycle. A longer PLC cycle time results in more than one scan for eachcycle. For a shorter cycle time the computer does not obtain a scan for each cycle, resulting in a partialloss of information. This loss can be compensated by repeated measurements of the interesting signals.The following table shows some scan times of the PLC model „ELAU PacDrive MAX-4“:

Requested data Scan time

1 byte 2 ms

10 double words 3 ms

100 byte 7 ms

500 words 42 ms

1000 byte 53 ms

1000 double words 68 msTable 2-1 Scan time on „ELAU PacDrive MAX-4“

Page 9: PLC-ANALYZER - AUTEM

PLC-ANALYZER pro 6 - CoDeSys

8 / 9

Appendix A - Configuration file formatThe settings for the PLC connection setup can also be made in a configuration file (see Configuration).The following table describes the format of the textfile (config.ini):

[Server] Tag for section

PLCs=1 Number of PLCs (always 1)

PLC0=<PLC-NAME> Name of PLC

[PLC:<PLC-NAME>] Configuration of PLC starts below

interfacetype=[ARTI|SIMULATION|GATEWAY]

Interface type: ARTI, SIMULATION, GATEWAY

logevents=[0|1] Enable event logging in logfile?

active=[0|1] Shall connection to PLC be established?

motorola=[0|1] Does the PLC use Motorola byte order?

nologin=[0|1] Shall the driver not log-on to PLC? Some runtime-systems limitthe number of logged-on applications to 1.

timeout=0..232 Time in ms, how long the answer for a requested data packagemay take, until the data acquisition stops with timeout error.

precheckidentity=[0|1] Check validity of symbol table by a seperate runtime systemservice before every reading of variables?

tries=0..232 Number of communication trials, if receiving of data packagefails.

waittime=0..232 Time in seconds, how long a communication setup may last,until a timeout error occurs.

reconnecttime=0..232 Interval time in seconds, after the program starts a newconnection attempt after communication error.

buffersize=0..232 Size of communication buffer in byte. It must correspond toruntime system used. 0 = default for the communicationprotocol.

max4version=0..232

Hardware version of ELAU-Max4-PLC: (1100, 1200, 2200 …).Not applicable for other PLCs.

project=<projektname.pro> For SIMULATION only: The PLC will be simulated by using asymbol file <projektname.sdb>. This entry can also be usedwith ARTI-Interface, if the SDB file can not be deposited on theconnected PLC.

device=[

Tcp/Ip (Level 4)|

Tcp/Ip (Level 2)|

Tcp/Ip (Level 2 Route)|

Serial (RS232)]

Communication protocol - some important settings. For otherprotocols refer to the respective specification.

instance=<protokollname> Self-chosen name for protocol

parameters=0..232 Number of parameters for this protocol (see the list ofparamters below)

parameter0=Address 1. parameter: TCP/IP address of PLC

value0=190.201.100.120 Value of the first parameter

parameter1=Port 2. parameter: port number

value1=1200 Value of the second parameter

Page 10: PLC-ANALYZER - AUTEM

PLC-ANALYZER pro 6 - CoDeSys

9 / 9

parameter2=TargetId 3. parameter: TargetID

For TCP/IP (Level 2 Route): ID of the runtime system to whichthe data should be routet.

value2=0 Value of third parameter

parameter3=Motorola byteorder 4. parameter: Motorola byteorder

value3=[No|Yes] Value of the fourth parameter:

Yes = Motorola byte orderTable 1-3 Configuration file

The following example shows the configuration file (*.ini) for communication with a PLC „ELAU PacDriveMAX-4“ with IP address 190.201.100.120:[Server]PLCs=1PLC0=PLC_Id0

[PLC:PLC_Id0]interfacetype=ARTIlogevents=1active=1motorola=0nologin=1timeout=5000precheckidentity=0tries=3waittime=30reconnecttime=5buffersize=1500max4version=2200device=Tcp/Ip (Level 4)instance=PLCWinNT_TCPIP_L4parameters=3parameter0=Addressvalue0=190.201.100.120parameter1=Portvalue1=5000parameter2=Motorola byteordervalue2=No