Sie sind auf Seite 1von 14
European Laboratory for Particle Physics Laboratoire Européen pour la Physique des Particules CH-1211 Genève 23

European Laboratory for Particle Physics Laboratoire Européen pour la Physique des Particules CH-1211 Genève 23 - Suisse

Accessing the 750-342 from OPC

Getting started with the Wago Ethernet coupler and OPC.

Document Version:

1.3

Document Date:

15 July 2002

Document Status:

Final

Document Author:

Renaud Barillère

Abstract

This document describes how a Wago Ethernet bus coupler (Ref.: 750-342) can be accessed from OPC servers. The principles of the coupler Modbus TCP/IP interface are described as well as the configuration of several Modbus TCP/IP OPC servers.

The OPC servers addressed in the document are:

• The Applicom OPC server, v 3.4;

• The Schneider OFS, v 2.2.1;

1 Introduction

The Wago company offers a large set of bus couplers and controllers (See [1]). These devices can be integrated in control systems by means of OPC servers. The connected remote inputs/outputs will then be accessible from any OPC clients in particular from SCADA systems such as ETM’s PVSS or National Instrument’s Labview.

The configuration of such OPC servers requires to understand, on the one hand, the way the bus coupler process image is built and made available to Modbus masters. On the other hand, one has to handle the OPC servers configuration to map the OPC Items with the proper Modbus functions and address locations.

There are many Modbus TCP/IP OPC servers available on the market, the two servers described hereafter are the ones currently recommended at CERN. The Applicom OPC server is very easy to use and supports a large set of fieldbuses and PLC protocols. The version 3.4 however requires the use of dedicated Ethernet card for the TCP/IP based PLC protocols. The Schneider OFS does not require any Ethernet card but is focused on the Schneider protocols.

Accessing the 750-342 from OPC 1 Introduction Getting started with the Wago Ethernet coupler and

Accessing the 750-342 from OPC

1 Introduction

Getting started with the Wago Ethernet coupler and OPC. Version/Issue: 1.3/0

More detailed information an be found on the IT-CO-FE web site [5] or on the respective company web sites [6][7].

In order to validate the OPC servers setting, several OPC clients have been used:

• Applicom OPC client, version 3.4.1.2;

• Schneider OFS client, version 2.2.1

• National Instrument server explorer, version x.x

This is not the purpose of this document to detail the use of these OPC clients. For more information please refer to [5].

The configuration is illustrated by a concrete example: a bus coupler, named WATA1GS01, with the following Input/Ouput modules configuration.

Table 1 The WATA1GS01 I/O modules

 

Module

Channels

 

Reference

Type

Label/Location

Label

750-342

Ethernet bus coupler

N/A

N/A

750-504

DO, 4 channels

A

DO1

C

DO2

B

DO3

D

DO4

750-456

AI, 2 channels

Left

AI1

Right

AI2

750-456

AI, 2 channels

Left

AI3

Right

AI4

750-550

AO, 2 channels

Left

AO1

Right

AO2

750-550

AO, 2 channels

Left

AO3

Right

AO4

750-514

DO, 2 channels

Left

DO5

Right

DO6

750-509

DO, 2 channels

Left

DO7

Right

DO8

750-509

DO, 2 channels

Left

DO9

Right

DO10

Accessing the 750-342 from OPC 2 Process image Getting started with the Wago Ethernet coupler

Accessing the 750-342 from OPC

2 Process image

Getting started with the Wago Ethernet coupler and OPC. Version/Issue: 1.3/0

2 Process image

As for all Wago bus couplers, the process image is automatically built according to the hardware setup of the bus coupler.

2.1 HW Setup

The I/O modules of Wago (750 family) systems can be assembled in any order (See [1]). The order of the DI (resp. DO, AI, AO) modules determines the way process image is built. For the 750-342 the process image consists in four parts which correspond to the Modbus four primary tables (See [2]):

1. the input bits table;

2. the output bits table;

3. the input registers table;

4. the output registers table.

The process output image (bits) will contain all the DO channels, the process output (words) will contain all AO channels followed by extra words combining the previously mentioned DOs.

Accessing the 750-342 from OPC 2 Process image Getting started with the Wago Ethernet coupler

Accessing the 750-342 from OPC

2 Process image

Getting started with the Wago Ethernet coupler and OPC. Version/Issue: 1.3/0

with the Wago Ethernet coupler and OPC. Version/Issue: 1.3/0 Figure 1 The Process Output Image (Copied

Figure 1 The Process Output Image (Copied from [1]).

The process input image (bits) will contain all the DI channels and from the offset 0x0200 the copy of the DO channels. The process input (words) will contain all AI channels followed by extra words combining the previously mentioned DIs. From the offset 0x0200 it will as well contain a copy of the POI.

Accessing the 750-342 from OPC 2 Process image Getting started with the Wago Ethernet coupler

Accessing the 750-342 from OPC

2 Process image

Getting started with the Wago Ethernet coupler and OPC. Version/Issue: 1.3/0

with the Wago Ethernet coupler and OPC. Version/Issue: 1.3/0 Figure 2 The Process Input Image (imported

Figure 2 The Process Input Image (imported from [1]).

For the WATA1GS01, the process image is then:

Table 2 WATA1GS01 Process Input Image (Word)

Address

Input

0x0000

AI1

0x0001

AI2

0x0002

AI3

0x0003

AI4

0x0004

AI5

0x0005

AI6

0x0200

AO1

Accessing the 750-342 from OPC 2 Process image Getting started with the Wago Ethernet coupler

Accessing the 750-342 from OPC

2 Process image

Getting started with the Wago Ethernet coupler and OPC. Version/Issue: 1.3/0

Table 2 WATA1GS01 Process Input Image (Word)

Address

Input

0x0201

AO2

0x0202

AO3

0x0203

AO4

0x0204

Packed DO: x,x,x,x,x,x,DO1,DO2,

,DO9,DO10

Table 3 WATA1GS01 Process Input Image (Bit)

Address

Input

0x0200

DO1

0x0201

DO2

0x0202

DO3

0x0203

DO4

0x0204

DO5

0x0205

DO6

0x0206

DO7

0x0207

DO8

0x0208

DO9

0x0209

DO10

Table 4 WATA1GS01 Process Output Image (Word)

Address

Output

0x0000

AO1

0x0001

AO2

0x0002

AO3

0x0003

AO4

0x0004

Packed DO: x,x,x,x,x,x,DO1,DO2,

,DO9,DO10

Accessing the 750-342 from OPC 2 Process image Getting started with the Wago Ethernet coupler

Accessing the 750-342 from OPC

2 Process image

Getting started with the Wago Ethernet coupler and OPC. Version/Issue: 1.3/0

Table 5 WATA1GS01 Process Output Image (Bit

Address

Output

0x0000

DO1

0x0001

DO2

0x0002

DO3

0x0003

DO4

0x0004

DO5

0x0005

DO6

0x0006

DO7

0x0007

DO8

0x0008

DO9

0x0009

DO10

2.2 SW Setup

The bus coupler should be given an IP address. This requires the use a bootp server, the recommended approach is to use the CERN service: once the module is declared in the CERN network database (wwwcs.cern.ch), the field “manufacturer” should be set to “WAGO/Bootp”. One could also use a independent bootp server as described in [3].

Once the bootp server is ready to provide the coupler with an IP address, the setup of the coupler can be tested with simple Modbus Master such as the WinTECH ModScan32 application (See [3]). This tool supports the Modbus functions 01 to 06, 15 and 16. For information about the general setup of this tool please refer to the WinTech site [8].

Table 6 Reading WATA1GS01 bits and registers

Address

Length

Table

Result

513

6

01: Coil Status

Values of DO1, DO2, DO3, DO4, DO5, DO6 PII (Bit) accessed.

FC1

513

6

02: Input Status

Values of DO1, DO2, DO3, DO4, DO5, DO6 PII (Bit) accessed.

FC2

1

4

01: Coil Status

Irrelevant values. Does not allow read access to POI (Bit).

FC1

1

6

04: Input Register

Values of AI1, AI2, AI3, AI4, AI5, AI6 PII (Word) accessed.

FC4

1

4

03: Holding Register

Irrelevant values. Does not allow access to POI (Word)

FC3

Accessing the 750-342 from OPC 3 OPC servers setup Getting started with the Wago Ethernet

Accessing the 750-342 from OPC

3 OPC servers setup

Getting started with the Wago Ethernet coupler and OPC. Version/Issue: 1.3/0

Table 6 Reading WATA1GS01 bits and registers

Address

Length

Table

Result

5

1

03: Holding Register

Irrelevant values. Does not allow access to POI (Word)

 

FC3

513

4

03: Holding Register

Values of AO1, AO2, AO3, AO4 PII (Word) accessed

 

FC3

513

4

04: Holding Register

Values of AO1, AO2, AO3, AO4 PII (Word) accessed

 

FC4

517

1

03: Holding Register

Values of Packed DO: x.x.x.x.DO10.DO9 PII (Word) accessed

DO1,

FC3

517

1

04: Input Register

Values of Packed DO: x.x.x.x.DO10.DO9 PII (Word) accessed

DO1,

FC4

Table 7 Writing values to WATA1GS01 bits and registers

Address

Length

Function

Value

Result

1

4

Force multiple coils FC

On, Off, On, Off

DO1 and DO3 switched on DO2 and DO4 switched off

513

4

Force multiple coils FC

On, Off, On, Off

DO1 and DO3 switched on DO2 and DO4 switched off

5

1

Preset multiple registers FC

10

DO2 and DO4 switched on Other DO switched off

517

1

Preset multiple registers FC

10

DO2 and DO4 switched on Other DO switched off

1

6

Preset multiple registers FC

12,23,34,45,56,9

AO1 to AO5 are modified

1

6

Preset multiple registers FC

12,23,34,45,56,9

AO1 to AO5 are modified

3 OPC servers setup

3.1 Applicom OPC server

3.1.1 Card setup

The applicom OPC server v3.4 requires the use of the Applicom PCI2000ETH card to access Modbus TCP IP devices.

Accessing the 750-342 from OPC 3 OPC servers setup Getting started with the Wago Ethernet

Accessing the 750-342 from OPC

3 OPC servers setup

Getting started with the Wago Ethernet coupler and OPC. Version/Issue: 1.3/0

The card is configured with the PCCONF applicom tool (See example in [4]):

• Enter the Card IP address;

• Declare the coupler as a server nodes;

• Enter the IP address of the coupler.

When declaring the coupler, it is recommended to select the “generic modbus” option instead of the “TSX Premium”. This has an impact on the available addressing modes.

This has an impact on the available addressing modes. Figure 3 Addressing modes for a “Generic

Figure 3 Addressing modes for a “Generic Modbus” device (copied from Applicom help files)

When the Generic Modbus option is selected, Digital (resp. Analog) Inputs are read using the BI (resp. WI) tag prefix, Digital Outputs are read using the B (resp. W) tag prefix. There is no ambiguity.

using the B (resp. W) tag prefix. There is no ambiguity. Figure 4 Addressing modes for

Figure 4 Addressing modes for a “TSX Premium” device (copied from applicom help files)

When the “TSX Premium” option is selected, both Digital (resp. Analog) Inputs and outputs are read using the %MX (resp. %MW ) tag prefix. to avoid the ambiguity on the I/O addressing, the 0x0200 will be applied for reading and writing to DO (resp. AO).

Accessing the 750-342 from OPC 3 OPC servers setup Getting started with the Wago Ethernet

Accessing the 750-342 from OPC

3 OPC servers setup

Getting started with the Wago Ethernet coupler and OPC. Version/Issue: 1.3/0

The Applicom ReadWait and WriteWait tools an then be used to test the coupler access from the card.

Table 8 Reading WATA1GS01 bits and registers

Address

Length

Function

Result

BI512

6

READPACKIBIT

DO1, DO2, DO3, DO4, DO5, DO6

B0

4

READPACKBIT

DO1, DO2, DO3, DO4

B0

6

READPACKIBIT

Irrelevant

WI0

6

READIWORD

AI1, AI2, AI3, AI4, AI5, AI6

WI512

4

READIWORD

AO1, AO2, AO3, AO4

W0

4

READWORD

AO1, AO2, AO3, AO4

W4

1

READWORD

Packed DO: x.x.x.x.DO10.DO9

DO1

WI516

1

READIWORD

Packed DO: x.x.x.x.DO10.DO9

DO1

Table 9 Writing values to WATA1GS01 bits and registers

Address

Length

Function

Value

Result

B0

1

WRITEPACKBIT

1

DO1 switched on

B0

4

WRITEPACKBIT

1010

DO1 and DO3 switched on DO2 and DO4 switched off

B512

1

WRITEPACKBIT

1

Irrelevant (D0 not on)

W4

1

WRITEWORD

10

DO2 and DO4 switched on Other DO switched off

Accessing the 750-342 from OPC 3 OPC servers setup Getting started with the Wago Ethernet

Accessing the 750-342 from OPC

3 OPC servers setup

Getting started with the Wago Ethernet coupler and OPC. Version/Issue: 1.3/0

3.1.2 Server configuration

• Export the node from PCCONF;

• Import the topic in he Applicom “OPC Configuration” tool;

• Create a symbol file for the relevant I/O channels;

• Select the proper device (Card, Channel, equipment number) 1 in ImpSymb tool.

• Press Open button

• Select the symbol file

• Press import button (option delete old).

One shall first define a symbol file for the process data the would like to make available through the OPC server. The file will be a csv file with two columns: symbol, descriptor (address syntax) detailed in the table above.

Table 10 The WATA1GS01 symbols for Applicom OPC server

Symbol

Descriptor

504-A

B0

504-C

B1

504-B

B2

504-D

B3

514-Left

B4

514-Right

B5

509-Left

B6

509-Right

B7

509-Left

B8

509-Right

B9

504-A-r

BI512

504-C-r

BI513

504-B-r

BI514

504-D-r

BI515

514-Left-r

BI516

514-Right-r

BI517

509-Left-r

BI518

509-Right-r

BI519

1. Those of the imported topic

Accessing the 750-342 from OPC 3 OPC servers setup Getting started with the Wago Ethernet

Accessing the 750-342 from OPC

3 OPC servers setup

Getting started with the Wago Ethernet coupler and OPC. Version/Issue: 1.3/0

Table 10 The WATA1GS01 symbols for Applicom OPC server

Symbol

Descriptor

509-Left-r

BI520

509-Right-r

BI521

456-1-UL

WI0

456-1-UR

WI1

456-2-UL

WI2

456-2-UR

WI3

550-1-A-r

WI512

550-1-C-r

WI513

550-2-A-r

WI514

550-2-C-r

WI515

PackDO-r

WI516

550-1-A

W0

550-1-C

W1

550-2-A

W2

550-2-C

W3

PackDO

W4

From the list above, the item 504_A is used to write in DO1, the 504_A_r is used to read back t written value.

3.2 Open Factory Server

The OFS server does not require any special Ethernet card to access Modbus TCP IP devices. The server is configured with a dedicated tool, “OFS Configuration tool”.

One shall first define a symbol file for the process data the would like to make available through the OPC server. The file will be a csv file with three columns: descriptor, name, comment. The descriptor has the syntax described for applicom TSX Premium. The address will start to 1 (resp 0) if the option TSX is chosen (not chosen) later The name can be anything (space should e avoided) The comment are visible when using the OFS Client

Accessing the 750-342 from OPC 3 OPC servers setup Getting started with the Wago Ethernet

Accessing the 750-342 from OPC

3 OPC servers setup

Getting started with the Wago Ethernet coupler and OPC. Version/Issue: 1.3/0

Table 11 The WATA1GS01 symbols for OFS

Descriptor

Symbol

Comment

%MX512

504-A

Temporisation de securite

%MX513

504-C

 

%MX514

504-B

 

%MX515

504-D

 

%MX516

514-Left

Relai haute tension

%MX517

514-Right

 

%MX518

509-Left

Electrovanne 1 iC4H10

%MX519

509-Right

Electrovanne 2 Ar

%MX520

509-Left

Electrovanne 3 C2H2F4

%MX521

509-Right

Electrovanne 4 SF6

%MW0

456-1-UL

Lecture hitec 1 iC4H10

%MW1

456-1-UR

Lecture hitec 2 Ar

%MW2

456-2-UL

Lecture hitec 3 C2H2F4

%MW3

456-2-UR

Lecture hitec 4 SF6

%MW512

550-1-A

Consigne hitec 1 iC4H10

%MW513

550-1-C

Consigne hitec 2 Ar

%MW514

550-2-A

Consigne hitec 3 C2H2F4

%MW515

550-2-C

Consigne hitec 4 SF6

%MW516

PackDO

Commande groupée des relais

The next step are done with the OFS configurator tool.

1. In the options set up your communication parameter (voir avec JR)

2. Create a new alias for the coupler, WATA1GS01

3. Associate he driver

1. Modbus TCP/IP

2. Enter the address or the name if a DNS if available

3. Select the addressing mode (e.g. TSX)

a DNS if available 3. Select the addressing mode (e.g. TSX) 4. Associate the symbol file

4. Associate the symbol file

5. Close the tool

Warning: The above steps will be taken in effect the next time the OFS will be started.

Accessing the 750-342 from OPC 4 References Getting started with the Wago Ethernet coupler and

Accessing the 750-342 from OPC

4 References

Getting started with the Wago Ethernet coupler and OPC. Version/Issue: 1.3/0

4 References

1 Wago manual on the Ethernet bus coupler and bus controller, 750-129/000-002 version 2.0.0, URL:

http://www.wago.com/wagoweb/documentation/navigate/nm0me e.htm;

2 Modbus specifications, URL: http://www.modicon.com/openmbus/;

3 Wago France, Mise en service des stations Wago 750-342 et 750-842., URL:

http://itcofe.web.cern.ch/itcofe/

4 Wago France, Mise en service des stations Wago 750-342 et 750-842 avec carte Applicom PCI2000ETH., URL:

5 IT-CO-FE OPC support Web site: URL:

http://itcofe.web.cern.ch/itcofe/Services/OPC/welcome.html;

6 Applicom Web site URL: http://www.applicom-int.com/

7 Schneider Web site URL: http://public.modicon.com/

8 WinTECH, URL: http://www.win-tech.com

This document has been prepared using the SDLT Single File Template that have been prepared by the IPT Group (Information, Process and Technology), IT Division, CERN (The European Laboratory for Particle Physics). For more information, go to http://framemaker.cern.ch/.