200
Industrial IT 800xA - System PLC Connect System Version 5.0 Configuration

3BSE035041R5001_PLC_Config

Embed Size (px)

Citation preview

Page 1: 3BSE035041R5001_PLC_Config

IndustrialIT800xA - System

PLC ConnectSystem Version 5.0

Configuration

Page 2: 3BSE035041R5001_PLC_Config
Page 3: 3BSE035041R5001_PLC_Config

Configuration

IndustrialIT800xA - System

PLC ConnectSystem Version 5.0

Page 4: 3BSE035041R5001_PLC_Config

NOTICEThis document contains information about one or more ABB products and may include adescription of or a reference to one or more standards that may be generally relevant tothe ABB products. The presence of any such description of a standard or reference to astandard is not a representation that all of the ABB products referenced in this documentsupport all of the features of the described or referenced standard. In order to determinethe specific features supported by a particular ABB product, the reader should consult theproduct specifications for the particular ABB product.

The information in this document is subject to change without notice and should not beconstrued as a commitment by ABB. ABB assumes no responsibility for any errors thatmay appear in this document.

In no event shall ABB be liable for direct, indirect, special, incidental or consequentialdamages of any nature or kind arising from the use of this document, nor shall ABB beliable for incidental or consequential damages arising from use of any software or hard-ware described in this document.

This document and parts thereof must not be reproduced or copied without written per-mission from ABB, and the contents thereof must not be imparted to a third party nor usedfor any unauthorized purpose.

The software or hardware described in this document is furnished under a license andmay be used, copied, or disclosed only in accordance with the terms of such license.

This product meets the requirements specified in EMC Directive 89/336/EEC and in LowVoltage Directive 72/23/EEC.

TRADEMARKSAll rights to copyrights, registered trademarks, and trademarks reside with their respec-tive owners.

Copyright © 2004-2006 by ABB. All rights reserved.

Portions Copyright © 2002 Matrikon Inc. All rights reserved.

Release: June 2006Document number: 3BSE035041R5001

Page 5: 3BSE035041R5001_PLC_Config

TABLE OF CONTENTS

About This BookGeneral ............................................................................................................................11

Document Conventions ...................................................................................................11

Warning, Caution, Information, and Tip Icons................................................................11

Terminology.....................................................................................................................12

Related Documentation ...................................................................................................13

Section 1 - IntroductionWelcome to PLC Connect ...............................................................................................15

Release Information .............................................................................................16

Section 2 - Getting StartedIntroduction .....................................................................................................................17

Control Network Setup.........................................................................................17

Process Objects and Signals.................................................................................18

Process Object Types and Signal Types ...............................................................18

Creating Process Object Types and Signal Types............................................................18

PLC Branch Object ..............................................................................................19

Create Signal Type ...............................................................................................19

Create Process Object Type..................................................................................21

3BSE035041R5001 5

Page 6: 3BSE035041R5001_PLC_Config

Table of Contents

Creating Instances of Process Objects and Signals......................................................... 25

Generic Control Network Object ......................................................................... 25

Create Controller Object ...................................................................................... 26

Create Process Object .......................................................................................... 27

Connect Process Signal........................................................................................ 30

Deploy ............................................................................................................ 31

Configuring Instances of Process Objects and Signals ................................................... 32

Section 3 - Create Process GraphicsIntroduction ..................................................................................................................... 37

Basic Graphic Example................................................................................................... 37

Alternative Graphic Example.......................................................................................... 47

Optimized Graphic Example........................................................................................... 50

Faceplate Example .......................................................................................................... 55

Add Faceplate Aspect .......................................................................................... 58

Configure Alarm Handling .................................................................................. 65

Faceplate as Default Aspect................................................................................. 66

Configure Faceplate Position ............................................................................... 66

Configure Object Lock Behavior......................................................................... 66

Section 4 - Alarm and Event List Configurations

6 3BSE035041R5001

Page 7: 3BSE035041R5001_PLC_Config

Table of Contents

Section 5 - OpennessIntroduction .....................................................................................................................71

Extension Processes.........................................................................................................71

PLC Connect Real Time Data Access .............................................................................72

Introduction ..........................................................................................................72

Variable Access ....................................................................................................73

Subscription..........................................................................................................74

Variable Access Interface .....................................................................................75

Variable Access Properties and Methods .............................................................75

Properties and Methods for the Class Variables...................................................78

Properties and Methods for the Class Variable ....................................................82

Conditions When Writing a Variable Value .........................................................85

Status Codes for Methods Returning a Value of the Type Long..........................86

OPC Quality(In/Out) ............................................................................................87

Sample Code ........................................................................................................87

More on Reading and Writing..............................................................................88

Communication Server Pre Treatment ............................................................................90

Introduction ..........................................................................................................90

Variable Pre Treatment.........................................................................................90

Properties and Methods for the Variable Pre Treatment ......................................92

Callback Interface ................................................................................................95

Configure Calculation Parameters........................................................................96

Sample Code ........................................................................................................97

3BSE035041R5001 73BSE035041R5001 7

Page 8: 3BSE035041R5001_PLC_Config

Table of Contents

Event Server Pre Treatment............................................................................................. 97

Introduction.......................................................................................................... 97

DLL Interface....................................................................................................... 97

Event Types........................................................................................................ 103

Event States........................................................................................................ 104

Initialize .......................................................................................................... 104

ChangeOfState ................................................................................................... 104

AcknowledgeEvent ............................................................................................ 105

AlterEventMonitoring........................................................................................ 105

OpForce .......................................................................................................... 105

AlterControlMonitoring..................................................................................... 105

OpControl .......................................................................................................... 106

Limitations for sVarName.................................................................................. 106

Limitations for lNewState.................................................................................. 106

Limitations for lSeverity .................................................................................... 107

Limitations for lClass......................................................................................... 107

Limitations for lEventType ................................................................................ 107

Limitations for lDelay........................................................................................ 107

Sample Event DLL Interface ............................................................................. 108

Event Extended Options................................................................................................ 108

Introduction........................................................................................................ 108

OLE Interface..................................................................................................... 108

Example .......................................................................................................... 112

PLC Connect Properties ................................................................................................ 112

Introduction........................................................................................................ 112

Accessible Properties ......................................................................................... 112

Example - Change Signal Properties with Bulk Data Manager......................... 119

8 3BSE035041R5001

Page 9: 3BSE035041R5001_PLC_Config

Table of Contents

Dial Manager Server Access (Option)...........................................................................121

Introduction ........................................................................................................121

Prioritized Calls .................................................................................................122

Accessible Methods ...........................................................................................122

Notes on PLC Connect Real Time Data Access ................................................124

Sample ...........................................................................................................125

Section 6 - Configure Dialed Communication (Option)Introduction ...................................................................................................................127

Basic Preparations .........................................................................................................128

Basic Configuration Example........................................................................................129

Set up Protocols..................................................................................................130

Set up Connections.............................................................................................131

Set up Cyclic Calls .............................................................................................133

Set up Priorities ..................................................................................................135

Priority Guidelines .............................................................................................136

Set up Dialed Controllers ...................................................................................139

Dialed History ...............................................................................................................141

PLC Time Stamp................................................................................................142

Dialed History Configuration Example .........................................................................143

Preparations........................................................................................................143

Enter Default History Settings ...........................................................................145

Enter Signal History Settings .............................................................................146

3BSE035041R5001 93BSE035041R5001 9

Page 10: 3BSE035041R5001_PLC_Config

Table of Contents

Section 7 - Configure IEC 60870 Driver (Option)Introduction ................................................................................................................... 149

Configuration Window.................................................................................................. 150

Commands ......................................................................................................... 150

The Options Dialog Box .................................................................................... 154

Server Configuration.......................................................................................... 157

Alias Configuration............................................................................................ 173

Saving the Configuration ................................................................................... 179

Clearing the Configuration ................................................................................ 180

Loading a Saved Configuration ......................................................................... 180

Notation for Accessing Data Items ............................................................................... 181

IEC 60870 ITEMS ............................................................................................. 181

Technical Aspects of Low Bandwidth and Noisy Communication .............................. 184

Channels .......................................................................................................... 184

Poll Optimization ............................................................................................... 185

Transactions ....................................................................................................... 186

Integrity .......................................................................................................... 189

Diagnostics .................................................................................................................... 190

Logging .......................................................................................................... 190

Troubleshooting............................................................................................................. 191

Problems and Solutions ..................................................................................... 192

INDEX

10 3BSE035041R5001

Page 11: 3BSE035041R5001_PLC_Config

About This Book

GeneralThis manual describes how to engineer and maintain PLC Connect.

Document ConventionsMicrosoft Windows conventions are normally used for the standard presentation of material when entering text, key sequences, prompts, messages, menu items, screen elements, and so on.

Warning, Caution, Information, and Tip IconsThis publication includes Warning, Caution, and Information where appropriate to point out safety related or other important information. It also includes Tip to point out useful hints to the reader. The corresponding symbols should be interpreted as follows:

Electrical warning icon indicates the presence of a hazard which could result in electrical shock.

Warning icon indicates the presence of a hazard which could result in personal injury.

Caution icon indicates important information or warning related to the concept discussed in the text. It might indicate the presence of a hazard which could result in corruption of software or damage to equipment/property.

3BSE035041R5001 11

Page 12: 3BSE035041R5001_PLC_Config

Terminology About This Book

Although Warning hazards are related to personal injury, and Caution hazards are associated with equipment or property damage, it should be understood that operation of damaged equipment could, under certain operational conditions, result in degraded process performance leading to personal injury or death. Therefore, fully comply with all Warning and Caution notices.

TerminologyA complete and comprehensive list of Terms is included in the IndustrialIT Extended Automation System 800xA, Engineering Concepts instruction (3BDS100972Rxxxx). The listing included in Engineering Concepts includes terms and definitions as they that apply to the 800xA system where the usage is different from commonly accepted industry standard definitions and definitions given in standard dictionaries such as Webster’s Dictionary of Computer Terms. Terms that uniquely apply to this instruction may be included here as part of this document.

Information icon alerts the reader to pertinent facts and conditions.

Tip icon indicates advice on, for example, how to design your project or how to use a certain function

Term/Acronym Description

RTDB Real Time Data Base.

A memory resident area in which real time data collected from the process is stored in a generic format, regardless of the communication protocol used for gathering the data.

Data is stored in a compact format and RTDB is characterized by very efficient procedures for read and write access.

RTU Remote Terminal Unit

12 3BSE035041R5001

Page 13: 3BSE035041R5001_PLC_Config

About This Book Related Documentation

Related DocumentationA complete list of all documents applicable to the 800xA IndustrialIT Extended Automation System is provided in Released User Documents (3BUA000263Rxxxx). This document lists applicable Release Notes and User Instructions. It is provided in PDF format and is included on the Release Notes/Documentation media provided with your system. Released User Documents are updated with each release and a new file is provided that contains all user documents applicable for that release with their applicable document number. Whenever a reference to a specific instruction is made, the instruction number is included in the reference.

3BSE035041R5001 13

Page 14: 3BSE035041R5001_PLC_Config

Related Documentation About This Book

14 3BSE035041R5001

Page 15: 3BSE035041R5001_PLC_Config

Section 1 Introduction

Welcome to PLC ConnectPLC Connect is a connectivity option to Industrial IT 800xA that makes it possible to connect and integrate any type of remote or local installed PLC, RTU or other type of device. The information from the connected unit can be treated in the same way as information from other 800xA System connectivities.

PLC Connect includes the following:

• Object-oriented PLC Server with alarm detection for boolean, integer and real values, data processing and scaling functions. Object types include composite process object types and extended signal types.

• Basic integration of connected PLCs and RTUs.

• Built in protocols for Comli, SattBus, Modbus Serial and Modbus TCP/IP.

• IEC 60870-5 protocol driver (Option).

• Dialed communication (Option) for Comli and Modbus Serial.

• OPC DA (1.0 and 2.05a) client functionality.

• Upload of OPC server configuration.

• Configuration data stored in Aspect Directory.

• Support for Bulk Data Manager.

• Graphic elements, such as process object and status icons.

• Faceplate examples to match the graphic elements.

• Support for multiple control networks, that is, multiple connectivity servers in separate PCs in one system.

3BSE035041R5001 15

Page 16: 3BSE035041R5001_PLC_Config

Release Information Section 1 Introduction

• Support for redundant connectivity servers with PLC/OPC Server communication surveillance.

• Handling of calculated softpoints.

• Open interfaces for calculations, and other client applications.

Release Information

Read the Release Notes for information concerning the specific release of PLC Connect.

16 3BSE035041R5001

Page 17: 3BSE035041R5001_PLC_Config

Section 2 Getting Started

IntroductionThis section describes how to start engineering your system, that is, how to use PLC Connect specific process objects and signals to create representations of real world objects.

• Creating Process Object Types and Signal Types on page 18 exemplifies how to create types to base the objects and signals on.

• Creating Instances of Process Objects and Signals on page 25 exemplifies how to create objects and signals based on the created types.

• Configuring Instances of Process Objects and Signals on page 32 exemplifies how process objects and signals inherits settings from process object types and signal types.

Control Network Setup

Before you can start engineering your system, a control network setup have to be done. It includes creating a Generic Control Network object for each control network in the system, and configuring the objects appropriately.

This setup is part of the post installation setup of PLC Connect, and is described in the manual Industrial IT 800xA - System Post Installation (3BUA000156Rxxxx). At this stage, the control network setup should already have been done. In the rest of this section, it is assumed that you already have made a control network setup.

These are only examples intended to get you started. They do not cover all configuration settings. For more information, including relevant considerations, refer to the PLC Connect online help where the configurations aspects are described in detail.

3BSE035041R5001 17

Page 18: 3BSE035041R5001_PLC_Config

Process Objects and Signals Section 2 Getting Started

Process Objects and Signals

A process object is a representation of a real world object, such as a tank, a pump or a valve. For example, a tank object can represent a tank, while a motor object can represent a motor.

A signal is a representation of a real world process signal, such as the level in a tank, the speed of a pump or whether a valve is opened or not. For example, a volume signal can represent the volume in a tank, while a speed signal can represent the speed of a motor.

A signal can also represent an internal state, for example, when used in calculations.

Process Object Types and Signal Types

Usually, some process objects or process signals are similar to each other. For example, you can use five pump objects to represent five real world pumps of the same type. Since the process objects are similar, it is not necessary to create each process object from scratch. Instead, you first create a pump object type, and then base each pump object on that type. The pump object type is a template with inheritance behavior.

The same way as process objects are based on process object types, signals are based on signal types.

Creating Process Object Types and Signal TypesThis configuration example shows how to create some extended signal types and use them in composite process object types.

There are also basic process object types, and basic signal types. However, they only exist for legacy reasons. If you engineer a new system, and do not have to import process objects and signals from previous software versions, it is recommended to only use extended signal types and composite process object types.

These basic types are not described further. Refer to the online help for more information on them.

18 3BSE035041R5001

Page 19: 3BSE035041R5001_PLC_Config

Section 2 Getting Started PLC Branch Object

PLC Branch Object

The PLC object (PLC branch object) in the Object Type Structure, see Figure 1, is main branch for process object types and signal types.

Configuration Example (Started)

1. In Plant Explorer, select the Object Type Structure.

2. Select the PLC branch object.

3. Select the Generic Control Network Configuration aspect. You use this aspect, see also Figure 2, when you want to create new process object or signal types.

Create Signal Type

An extended signal type represents a class of signals in the real world. There are different categories of extended signal types: binary, integer, real and string.

For a specific project, you are expected to create suitable signal types, such as “TemperatureType” used in this example. Other examples of project specific signal types can be:

• A boolean output signal, named "Start", used to start a motor object.

• A boolean signal, named "AlarmNoAck", configured as an alarm with a set of specific rules for acknowledgement.

Figure 1. PLC Branch Object

Figure 2. Generic Control Network Configuration Aspect

Create Composite Process Object Type

Create Integer Extended Signal Type

Create Basic Process Object Type

Create Binary Extended Signal Type

Create Real Extended Signal Type

Create String Extended Signal Type

3BSE035041R5001 19

Page 20: 3BSE035041R5001_PLC_Config

Create Signal Type Section 2 Getting Started

• An integer signal, named "Level", used to represent the level in a tank. The signal can have a set of pre-defined limiter alarms for high and low levels.

Signal Types Used for OPC Server Data Uploads

The PLC_xxx signal types, for example PLC_Binary, are pre-defined in PLC Connect. Do not change any configuration with respect to these signal types. They are used for mapping OPC server items to PLC Connect signals during an OPC server data upload. The PLC Uploader aspect is used to retrieve and filter the configuration from a connected OPC server, and automatically create PLC Connect process objects connected to the OPC server items.

Configuration Example (Continued)

4. In the Generic Control Network Configuration aspect, click the button to create a new integer signal type.

5. In the displayed dialog box, enter the signal type name. In this example, ‘TemperatureType’ is used.

6. Click OK. The new type is created as part of the PLC branch object.

7. Expand the PLC branch object to view the created signal type, see also Figure 3.

8. In the Generic Control Network Configuration aspect, click the button and create a new real signal type named ‘VolumeType’.

For more information on the PLC Uploader aspect, refer to the online help.

Figure 3. Created Integer Signal Type

20 3BSE035041R5001

Page 21: 3BSE035041R5001_PLC_Config

Section 2 Getting Started Create Process Object Type

Create Process Object Type

A composite process object type represents a class of related process objects and signals in the real world.

Configuration Example (Continued)

9. In the Generic Control Network Configuration aspect, click the button to create a new composite process object type.

10. In the displayed dialog box, enter the type name. In this example, ‘TankType’ is used.

11. Click OK. The new type is created as part of the PLC branch object, see also Figure 4.

12. Select the created object type.

13. Select the Process Object Configuration aspect. You use this aspect, see also Figure 5, when you want to add instances of other signal or object types to the created composite process object type.

Add Signal Type Instance

14. In the Process Object Configuration aspect, click the button to add an instance of an integer signal type.

Figure 4. Created Composite Process Object Type

Figure 5. Process Object Configuration Aspect

3BSE035041R5001 21

Page 22: 3BSE035041R5001_PLC_Config

Create Process Object Type Section 2 Getting Started

15. In the displayed dialog box, select the signal type. In this example, ‘TemperatureType’ is selected.

16. Enter an instance name. In this example, ‘TankTemp’ is used, see Figure 6.

17. Click OK. An instance of the signal type is added to the composite process object type.

18. Expand the composite process object type to view the added instance, see also Figure 7.

19. The last part of the instance name shows its type, see also Figure 8.

Figure 6. Add Integer Signal Type Instance

Figure 7. Added Signal Type Instance

Figure 8. Signal Type (Left), and Reference (Right)

22 3BSE035041R5001

Page 23: 3BSE035041R5001_PLC_Config

Section 2 Getting Started Create Process Object Type

20. In the Process Object Configuration aspect, click the button and add an instance of the real signal type ‘VolumeType’. Name the instance ‘TankVolume’. Figure 9 shows the end result.

Create Pump and Valve Object Types

21. Similarly, create a pump object type and a valve object type.

a. Create two composite process object types, and relevant signal types.

b. Add instances of the created signal types to the composite process object types.

Figure 10 shows the object types used in this example.

Add Object Type Instance

22. Select the ‘TankType’ object type, and then its Process Object Configuration aspect, see also Figure 5 on page 21.

23. In the aspect, click the button to add an instance of another composite process object type.

24. In the displayed dialog box, select one of the other composite process object types. In this example, ‘PumpType’ is selected.

25. Enter an instance name. In this example, ‘TankPump’ is used, see Figure 11.

26. Click OK. An instance of the ‘PumpType’ object type is added to the ‘TankType’ object type.

Figure 9. Created Tank Object Type

Figure 10. Example Pump Object Type (Left) and Valve Object Type (Right)

3BSE035041R5001 23

Page 24: 3BSE035041R5001_PLC_Config

Create Process Object Type Section 2 Getting Started

27. Expand the ‘TankType’ object type to view the added instance, see also Figure 12.

28. In the Process Object Configuration aspect, again click the button and add an instance of the ‘ValveType’ object type. Name the instance ‘TankValve’. Figure 13 shows the result.

29. Expand the added object instances to view the finished ‘TankType’ object type, see Figure 14.

Figure 11. Add Object Type Instance

Figure 12. Added Object Type Instance

Figure 13. Added Pump and Valve Object Type Instances

24 3BSE035041R5001

Page 25: 3BSE035041R5001_PLC_Config

Section 2 Getting Started Creating Instances of Process Objects and Signals

Creating Instances of Process Objects and Signals

This configuration example shows how to create process objects and signals. They are based on the process object types and signal types from the previous example.

Generic Control Network Object

A Generic Control Network object represents a control network in the system, see see Figure 15 for an example. Generic Control Network objects are defined in the Control Structure.

Configuration Example (Started)

1. In Plant Explorer, select the Control Structure.

2. Select the relevant Generic Control Network object.

3. Select the Generic Control Network Configuration aspect, see also Figure 16. You use this aspect when you want to create new controller objects, process objects or signals.

Figure 14. Finished ‘TankType’ Object Type

Figure 15. Generic Control Network Object

3BSE035041R5001 25

Page 26: 3BSE035041R5001_PLC_Config

Create Controller Object Section 2 Getting Started

Create Controller Object

A controller object represent a controller containing process signals.

Configuration Example (Continued)

4. In the Generic Control Network Configuration aspect, click the button to create a new controller.

5. In the displayed dialog box, enter the controller name. In this example, ‘TankController’ is used.

6. Select the protocol to use for communication with the controller, see also Figure 17.

7. Click Edit Driver.

8. In the displayed dialog box, you can edit the driver configuration for the selected communication protocol, see Figure 18.

Figure 16. Generic Control Network Configuration Aspect

Figure 17. Selected Communication Protocol

Create Controller Object

Create Composite Process Object

Create Basic Process Object

Create Real Extended Signal

Create String Extended Signal

Delete Object

Create Integer Extended SignalCreate Binary Extended Signal

26 3BSE035041R5001

Page 27: 3BSE035041R5001_PLC_Config

Section 2 Getting Started Create Process Object

9. In this example, default settings are used. Click OK.

10. Return to the previous dialog box, and click OK. The new controller object is created.

11. Expand the Generic Control Network object to view the created controller object, also Figure 19.

Create Process Object

A composite process object represents a group of related process objects and signals in the real world.

Configuration Example (Continued)

12. Return to the Generic Control Network Object and its Control Network Configuration aspect, see also Figure 16 on page 26.

13. Click the button to create a new composite process object.

Figure 18. Communication Parameters for Comli

Dialog appearance depends on selected communication protocol. For more information on the parameters, refer to the PLC Connect online help.

Figure 19. Created Controller Object

3BSE035041R5001 27

Page 28: 3BSE035041R5001_PLC_Config

Create Process Object Section 2 Getting Started

14. In the displayed dialog box, select the relevant process object type. In this example, ‘TankType’ is selected.

15. Enter a process object name. In this example, ‘Tank’ is used.

16. Select the controller containing the relevant process signal. In this example, ‘TankController’ is selected.

17. Enter the number of new process objects to create, see also Figure 20.

18. Click Edit to set process object usage.

19. In the displayed dialog box, you can set process object usage, see also Figure 21. Possible settings depend on the used communication protocol.

20. In this example, default settings are used. Click OK.

21. In the previously displayed dialog box, click OK. The new process objects are created as part of the selected controller.

When more than one object is created, the character '1' will be appended to the first object name, '2' to the second and so on. If you want the numbering to start with something else than '1', enter the number in the Starting number box.

Figure 20. Add Process Objects

For more information on the settings, refer to the PLC Connect online help.

28 3BSE035041R5001

Page 29: 3BSE035041R5001_PLC_Config

Section 2 Getting Started Create Process Object

22. Expand the controller object to view the created process objects, see also Figure 22.

23. The last part of the process object name shows its type, see also Figure 23.

24. Each composite process object will contain the same set of process signals and other process objects as the composite process object type. Expand an object to view them, see also the right part of Figure 24. To compare with the object type, see also the left part of the figure.

Figure 21. Object Information Settings for Comli

Figure 22. Created Process Objects

Figure 23. Object Type Structure (Left), and Control Structure (Right)

3BSE035041R5001 29

Page 30: 3BSE035041R5001_PLC_Config

Connect Process Signal Section 2 Getting Started

Connect Process Signal

An extended signal represents a signal in the real world, or an internal state. The former is connected externally to a hardware address in a controller, while the latter is not.

Configuration Example (Continued)

25. Select a process signal. In this example, the ‘Tank1 TankTemp’ signal part of the ‘Tank1’ object is selected.

26. The icon indicates that the process signal is not connected externally, see also Figure 25.

27. Select the Signal Configuration aspect, see also Figure 26. Under the ID tab, you can connect the signal to a hardware address in the controller.

Figure 24. Tank Object Type (Left), and Tank Object (Right)

Figure 25. Icon Indicating a Not Connected Process Signal

30 3BSE035041R5001

Page 31: 3BSE035041R5001_PLC_Config

Section 2 Getting Started Deploy

28. Select Connected, and then enter the relevant signal hardware address, see also Figure 27. The address format depends on the used communication protocol.

29. Click Apply.

30. Similarly, connect all other process signals in the created tank objects.

Deploy

To make configuration changes take effect, you have to deploy them.

Configuration Example (Continued)

31. Select the Generic Control Network object, see also Figure 15 on page 25.

32. Select the Deploy aspect, see also Figure 28.

Figure 26. Signal Configuration Aspect

Figure 27. Entered Signal Hardware Address

For more information on valid addresses, refer to the PLC Connect online help.

If OPC communication is used, a Browse button is available. It can be used to browse for the signal.

The Deploy aspect can optionally be placed on process objects and controller objects.

3BSE035041R5001 31

Page 32: 3BSE035041R5001_PLC_Config

Configuring Instances of Process Objects and Signals Section 2 Getting Started

33. Click Deploy. The new configuration will take affect.

Configuring Instances of Process Objects and SignalsYou use the PLC Connect specific configuration aspects to configure process objects and signals as desired. Available aspects and their settings are not described further. Instead, refer to the PLC Connect online help for more information on them.

However, it is important to understand the difference between default and individual settings. This configuration example shows how to change the range for a process signal from the previous example.

Configure Default Settings

Configuration settings for a signal type will be the default settings for signals based on that type. For example, if you set the range of a signal type to -50–120, then the default range for the signal will also be -50–120 due to inheritance.

1. Select the Object Type Structure.

2. Select the PLC branch object, and then a signal type. In this example, ‘TemperatureType’ is selected, see also Figure 29.

3. Select the Signal Configuration aspect, and the Range tab.

Figure 28. Deploy Aspect

Figure 29. Selected Signal Type

32 3BSE035041R5001

Page 33: 3BSE035041R5001_PLC_Config

Section 2 Getting Started Configuring Instances of Process Objects and Signals

4. Enter the signal value range in the system to be used. In this example, -50 and 120 are entered in the Low and High limit boxes. (This range is used to scale values from the controller to the signal value range used in the system.)

5. Enter the signal value range in the controller in the Low limit in PLC and High limit in PLC boxes. In this example, the default values are used.

6. Enter an engineering unit, see also Figure 30. (You can use Character Map to add special characters.)

7. Click Apply.

Configure Individual Settings

For signals, you can select to use the default settings, or enter new individual settings. For example, if the default range for a signal is -50–120, then you can set the new range to 0–100.

8. Select the Control Structure.

9. Select relevant Generic Control Network object, and then a signal based on the signal type. In this example, ‘TankTemp’ is selected, see also Figure 31.

10. Select the Signal Configuration aspect, and the Range tab.

Figure 30. Range Tab for a Signal Type

Figure 31. Selected Signal

3BSE035041R5001 33

Page 34: 3BSE035041R5001_PLC_Config

Configuring Instances of Process Objects and Signals Section 2 Getting Started

When Use default values is selected, the default values from the signal types will be used, see Figure 32.

11. Clear the check box to use individual settings, and then enter the new values. In this example, 0 and 100 are entered as new low and high limits, see also Figure 33.

12. Click Apply.

13. The icon indicates that the process signal now has individual signal settings, see also Figure 34.

Revert to Default Settings

You can always revert back to default settings. For example, if you have set the range for a signal to 0–100 and you select to use the default settings, then the range will be -50–120 as before.

Figure 32. Range Tab for a Signal

Figure 33. Individual Settings

Figure 34. Icon Indicating Individual Signal Settings

34 3BSE035041R5001

Page 35: 3BSE035041R5001_PLC_Config

Section 2 Getting Started Configuring Instances of Process Objects and Signals

14. Select Use default values.

15. Click Apply. The settings will revert to default values, see also Figure 32.

Change Default Settings

When you change the settings for a signal type, this will affect all signals based on that type. For example, if you change the range of a signal type from -50–120to -10–150, then the default range for the signal will also be changed from -50–120to -10–150. However, individual settings are not affected by the changed defaults, see also Figure 35.

Another Inheritance Example

The table below describes the behavior when settings are changed.

Figure 35. Changed Default Settings

Table 1. Changed Settings

Changed SettingsSignal Type Range

(Object Type Structure)Signal Range

(Control Structure)

1. Using default signal settings (in Control Structure)

0–100 0–100

2. Changing signal type settings (in Object Type Structure)

0–200 0–200

3. Entering individual signal settings (in Control Structure)

0–200 0–500

3BSE035041R5001 35

Page 36: 3BSE035041R5001_PLC_Config

Configuring Instances of Process Objects and Signals Section 2 Getting Started

4. Changing signal type settings (in Object Type Structure)

0–300 0–500

5. Reverting to default signal settings (in Control Structure)

0–300 0–300

Table 1. Changed Settings

Changed SettingsSignal Type Range

(Object Type Structure)Signal Range

(Control Structure)

36 3BSE035041R5001

Page 37: 3BSE035041R5001_PLC_Config

Section 3 Create Process Graphics

IntroductionThis sub-section contains examples of how to create PLC Connect specific graphics, and a faceplate from the PLC Faceplate Templates.

Basic Graphic ExampleThis example describes how to create graphics for a single process object, exemplified by a tank object in the Control Structure. The graphics will be able to show status information on the object. However, it is assumed that the relevant process objects and signals used in the example already have been created and deployed. Figure 36 shows an example of the end result.

For more information on the PLC Connect specific graphics and relevant properties, refer to the PLC Connect online help.

For more information on the basic graphic functionality in the system, including graphic elements, graphic displays, Graphics Builder, properties, Properties Window, error presentation, OPC status indication, expressions, Expression Builder, logical colors, Display Tool, faceplate elements and Faceplates, refer to the Industrial IT 800xA - Engineering Graphics (3BSE030335Rxxxx).

Figure 36. Tank Graphics

Status Icon

3BSE035041R5001 37

Page 38: 3BSE035041R5001_PLC_Config

Basic Graphic Example Section 3 Create Process Graphics

Create Graphics in the Object Type Structure

A tank object in the Control Structure is based on a tank object type in the Object Type Structure. When you add an aspect for the tank object type, tank objects based on it will inherit the aspect. So instead of creating graphics for each tank object manually, you usually create the graphics for the tank object type. The graphics then automatically is inherited for each tank object based on the object type.

1. In Plant Explorer, select the Object Type Structure.

2. Select the tank object type the tank object is based on.

3. Add a Graphic Element aspect. It will be used to create the graphics for a single tank object.

4. Right-click the added aspect, and select Edit. The Graphics Builder is started.

Add Graphic Libraries

Graphic libraries that contain PLC Connect specific graphic elements are:

• PLC Process Icons. This library contains optimized graphic elements, including a status box.

• PLC Subelements. This library contains basic graphic elements, alarm and warning icons, and other status indications.

5. Select Tools > Graphic Libraries.

6. For this example, select both PLC Process Icons and PLC Subelements.

7. Click OK. In the toolbox, the added elements will be shown under the tabs PLC Process Icons and PLC Subelements, see Figure 37.

An alternative presentation of status is available, see Alternative Graphic Example on page 47, and Figure 56 on page 50.

The granularity of the design window grid can be set under the General tab in the Options dialog box (Tools > Options). Recommended granularity is 60 x 60.

Do not add graphic libraries if you do not use them.

38 3BSE035041R5001

Page 39: 3BSE035041R5001_PLC_Config

Section 3 Create Process Graphics Basic Graphic Example

Create Graphic Elements

8. Select the PLC Process Icons tab in the toolbox.

9. Under the tab, double-click the StatusBox icon, see Figure 38.

10. The graphic element, with default property settings, is created in the design window. Move the element to the desired place, in this case, the upper left corner, see Figure 39.

11. Select the PLC Subelements tab in the toolbox.

Figure 37. Toolbox Icons

Figure 38. StatusBox Icon

Double-clicking creates the object with default size.

Figure 39. Moved Element

3BSE035041R5001 39

Page 40: 3BSE035041R5001_PLC_Config

Basic Graphic Example Section 3 Create Process Graphics

12. Under the tab, double-click the tank icon, see Figure 40.

13. In the design window, move the created tank element to the desired place, see Figure 41.

14. If necessary, use the handles surrounding the created element to resize it.

Make Connections in the Object Type Structure

The tank element can indicate the volume of the tank in a bar graph. The tank object type should have one signal type that corresponds to the volume of the tank. Each tank object based on the object type then will have one process signal of that signal type.

When you create the tank graphics for a tank object type, you connect this graphics to the volume signal type. In fact, you create references to the corresponding process signals in the tank objects based on the object type.

The tank graphics inherited by the tank objects then will have live connections to the actual volume signal values in the object, that is, the graphics will show live process values.

Figure 40. Tank Icon

Figure 41. Moved Tank Element

40 3BSE035041R5001

Page 41: 3BSE035041R5001_PLC_Config

Section 3 Create Process Graphics Basic Graphic Example

Connect the Tank Element

Some graphic properties have names that ends with “Ref”, for example, “ValueRef” and “AnswerOpenedRef”. These properties can be connected to process signals via the Properties window. Only elements in the PLC Subelements library have these properties. Elements in the PLC Process Icons library are connected to process signals with the Expression Builder.

15. Select the created tank element.

16. In the Properties window, select the ValueRef property, see Figure 42.

17. Click . The Property Pages dialog box is displayed.

18. From the left-hand list, select the dot “.”. It corresponds to the current process object type, in this case, the tank object type.

19. Click Browse. The Select Object Dialog is displayed.

Use the Properties window to connect “Ref” properties to process signals. If you should use the Expression Builder, all functionality, such as an OPC status indication, will not be automatically connected. If desired, you then have to connect it yourself.

Figure 42. Selected Property

Figure 43. Property Pages Dialog Box

3BSE035041R5001 41

Page 42: 3BSE035041R5001_PLC_Config

Basic Graphic Example Section 3 Create Process Graphics

20. In the Select Object Dialog, select the signal type corresponding to the volume of the tank, see Figure 44.

21. Click OK. The dialog box is closed, and the reference to the corresponding process signal in the Control Structure is high-lighted in the Property Pages dialog box.

22. Select Value from the right-hand list, see Figure 45.

23. Click OK. The dialog box is closed and the Properties window updated, see Figure 46.

Figure 44. Selected Signal Type

Figure 45. Value Reference

Figure 46. Connected ValueRef Property

42 3BSE035041R5001

Page 43: 3BSE035041R5001_PLC_Config

Section 3 Create Process Graphics Basic Graphic Example

Set Other Tank Element Properties

Only some of the graphic property values are configured for the graphic elements in the example. Usually, you use the rest of the properties to achieve desired appearance, for example, set the color properties to the desired element colors and so on. For more information on the graphic properties, refer to the PLC Connect online help.

For the tank element, you can, for example, set the high limit of the tank scale, and the label format.

24. Select the tank element.

25. Select View > Expression Builder. The Expression Builder is started.

26. In the Expression builder, select the Alphabetic tab.

27. Under the tab, select the HighLimit property.

28. In the Lower part of the Expression Builder, select the Object Property tab.

29. Click Browse. The Select Object Dialog is displayed.

30. In the Select Object Dialog, select the signal type corresponding to the volume of the tank.

31. Click OK. The dialog box is closed, and the reference to the corresponding process signal in the Control Structure is high-lighted under the tab.

Figure 47. Selected HighLimit Property

3BSE035041R5001 43

Page 44: 3BSE035041R5001_PLC_Config

Basic Graphic Example Section 3 Create Process Graphics

32. Select HighLimit from the right-hand list, see Figure 48. Make sure to select the one that ends with “PCA”.

33. Click Insert. The selected reference is inserted under the Alphabetic tab, see Figure 49.

34. In the Properties window, select the LabelFormat property.

35. Enter “#0”. This will make the scale labels show integer instead of decimal values.

Connect to Status Information

To be able to show status information, you have to connect the graphics to the relevant object type and signal type properties. The graphics inherited by a object in the Control Structure will then have live connections to the actual status information in the object and its signals, that is, the graphics will show live status information.

Figure 48. HighLimit Reference

Figure 49. Connected HighLimit Property

In the Graphics Builder, the high scale limit will appear to remain the same. However, in an inherited Graphic Element aspect for a tank object, the high scale limit will show the correct value when the graphics have been built.

You use the same procedure to set the low limit. This is the normal way to fetch the Range defined in the RTDB.

44 3BSE035041R5001

Page 45: 3BSE035041R5001_PLC_Config

Section 3 Create Process Graphics Basic Graphic Example

Relevant properties in this example:

• AlarmConditionState_Descendants is a global object type property. It is used to connect to the alarm information on a process object.

• IsForced is a global signal type property. It is used to connect to information on whether a signal is forced or not.

Connect StatusBox Element

In this example, it is not described how to create complex expressions in the Expression Builder. Only the end result is shown.

36. Select the StatusBox element, and then use the Expression Builder to connect:

– IndicationAlarm property to desired alarm expression, that is, enter an expression containing the global object type property AlarmConditionState_Descendants. For example:

iif(.:Alarm Global Properties:AlarmConditionState_Descendants AND &H1F>0, True, False)

– IndicationAlarmColor to the desired alarm color expression. For example:

iif(.:Alarm Global Properties:AlarmConditionState_Descendants AND &H1F>=8, unackHighAlarm, highAlarmSymbol)

– IndicationForced property to the relevant signal property. In this case, the relevant signal is the signal corresponding to volume in the tank, and the relevant signal property is the IsForced property.

Figure 50. Connected StatusBox Properties

The code “AND &H1F” is used to mask out relevant alarm information.

3BSE035041R5001 45

Page 46: 3BSE035041R5001_PLC_Config

Basic Graphic Example Section 3 Create Process Graphics

Set Window Properties

37. Click in an empty space in the design window to deselect any graphic element. The design window itself is selected.

38. In the Properties window, set the BackStyle property to Transparent. This will make the background of the Graphic Element aspect transparent when it’s inserted into another graphic aspect.

39. Set the Windowless property to True.

40. Resize the design window to cover only the created graphic elements.

Build the Graphic Aspect

41. In the toolbar, click . The Graphic Element aspect will be built (and saved). The tank graphics is now finished.

IndicationLocal can also be used as an arbitrary indication. InducationManual can also be used to indicate manual mode.

When you add a Graphic Element aspect, make sure to set the Windowless property for the design window to True. Performance will be increased, since some functionality is disabled, and therefore update faster.

Be careful not to do this for a Graphic Display aspect, since the loss of functionality might make this aspect malfunction.

Figure 51. Resized Element

When you make a change in a graphic aspect that is inserted into another graphic aspect, you have to build the aspect and surrounding aspects for the change to take effect. Instead, you can use the Display Tool to make all necessary updates at once.

46 3BSE035041R5001

Page 47: 3BSE035041R5001_PLC_Config

Section 3 Create Process Graphics Alternative Graphic Example

The graphics is now ready to be used in other aspects, for example, a Graphic Display aspect. Figure 52 shows part of a Graphic Display aspect with the tank graphics inserted.

Alternative Graphic ExampleIn the previous example, the status box element was used to provide status information for the tank object. Alternatively, alarm and warning icons are available and can be used to show alarm and warning information on a process object.

This example describes how to configure the alternative graphics. It will be able to show alarm and warning information on a process object, exemplified by a valve object in the Control Structure. However, in this example most steps will not be described in detail. Refer to the previous example if you feel the need to review the details of a particular step. It is also assumed that the relevant process objects and signals used in the example already have been created and deployed.

Alarm and Warning Elements

Alarm and warning elements can show the alarm and/or warning status of a process object. For example, the AlarmState element can show the alarm status, the WarningLevel element can show the warning status, and the AlarmWarningCombo element can show both.

Startup

1. In Plant Explorer, select the Object Type Structure.

2. Select the valve object type the valve object is based on.

Figure 52. Inserted Tank Graphics

3BSE035041R5001 47

Page 48: 3BSE035041R5001_PLC_Config

Alternative Graphic Example Section 3 Create Process Graphics

3. Add an AlarmStatus aspect for the valve object type.

Create and Connect the Graphics

4. Add a Graphic Element aspect for the valve object type.

5. Select the added Graphic Element aspect and click Edit. The Graphics Builder is started.

6. In the Graphics Builder, add the graphic library PLC Subelements to the toolbox.

7. Select the PLC Subelements tab, and then create a Valve2Way element, see Figure 53. The result is shown in the left snap-shot in Figure 54.

8. Create an AlarmState and a WarningLevel element beside the valve element.

9. Select the valve element.

10. Via the Properties window, connect the “AnswerOpenedRef” property to the process signal corresponding to whether the valve is opened or not.

The aspect is required for alarm information to be propagated to an AlarmState or AlarmWarningCombo element.Accept the default aspect name, that is, do not change it.

Figure 53. PLC Subelements

Figure 54. Valve Element (Left), Alarm and Warning Elements (Right)

The direction of the valve (horizontal or vertical) is determined by the Direction property.

48 3BSE035041R5001

Page 49: 3BSE035041R5001_PLC_Config

Section 3 Create Process Graphics Alternative Graphic Example

11. Connect the “AnswerClosedRef property” to the process signal corresponding to whether the valve is closed or not.

Connect the Alarm Element

12. In the design window, select the AlarmState element.

13. In the Properties window, select the “AlarmStateRef” property.

14. Click . The Property Pages dialog box is displayed.

15. Select the dot (‘.’) from the left-hand list, see Figure 55.

16. From the right-hand list, select “AlarmState”.

17. Click OK. The dialog box is closed and the Properties window updated.

Connect the Warning Element

18. Select the WarningLevel element.

19. Via the Properties window, connect the “WarningLevelRef” property to the object type property WarningLevel.

Finish the Graphics

20. Click in an empty space in the design window to deselect any graphic element. The design window itself is selected.

21. In the Properties window, set the BackStyle property to Transparent.

If desired, you need only connect one of the process signals.

Figure 55. Process Object Type Reference

3BSE035041R5001 49

Page 50: 3BSE035041R5001_PLC_Config

Optimized Graphic Example Section 3 Create Process Graphics

22. Set the Windowless property to True.

23. Resize the design window to cover only the created graphic element.

24. Build the aspect.

The graphics is now ready to be used in other aspects, for example, a Graphic Display aspect. Figure 56 shows part of a Graphic Display aspect with the valve graphics inserted.

Optimized Graphic ExampleSome of the PLC Connect specific graphic elements are optimized for performance, that is to execute as fast as possible. This example describes how to use such elements to create graphics for a process object, exemplified by a motor object in the Control Structure. However, it is assumed that the relevant process objects and signals used in the example already have been created and deployed.

The example is intended for advanced users with a working knowledge of how to use the Graphics Builder to create graphics, including the toolbox, the Properties window and especially the Expression Builder. If you need to review how to perform the details of a specific step in this example, refer to the Industrial IT 800xA - Engineering Graphics (3BSE030335Rxxxx).

Figure 56. Graphic Display Part

The valve can also be equipped with indications for manual mode and operator notes

50 3BSE035041R5001

Page 51: 3BSE035041R5001_PLC_Config

Section 3 Create Process Graphics Optimized Graphic Example

Startup

1. In Plant Explorer, select the Object Type Structure.

2. Select the relevant motor object type.

3. Add a Graphic Element aspect.

4. Select to edit the Graphic Element aspect. The Graphics Builder is started.

5. In the Graphics Builder, add the graphic library PLC Connect Process Icons. The added elements can be found under the PLC Process Icons tab in the toolbox.

Add a StatusBox

The StatusBox element can show status information on a process object. Make a habit of using it together with the other optimized elements, since you then can show relevant status information for the process object.

6. Create a StatusBox element.

7. Select the created element, and set relevant property values. In this example, the following is used:

– Left property to 60

– Top property to 60

Figure 57. Toolbox Icon (Left), Created Element (Right)

Figure 58. Changed Properties (Left), Affected Element (Right)

3BSE035041R5001 51

Page 52: 3BSE035041R5001_PLC_Config

Optimized Graphic Example Section 3 Create Process Graphics

Add a Motor

8. Create a MotorSimple element.

9. Select the created element, and set relevant property values. In this example, the following is used:

– Left property to 60

– Top property to 240

– MotorType property to desired motor type, in this example Fan. This property controls the appearance of the motor element. You can, for example, set it to Pump, Fan, or Compressor.

Figure 59. Toolbox Icon (Left), Created Element (Right)

Figure 60. Changed Properties (Left), Affected Element (Right)

You can also set the direction of a pump. This property can be linked to an input property of the graphic element itself. For more information, refer to the Industrial IT 800xA - Engineering Graphics (3BSE030335Rxxxx).

52 3BSE035041R5001

Page 53: 3BSE035041R5001_PLC_Config

Section 3 Create Process Graphics Optimized Graphic Example

Set Window Properties

10. In the Properties window, select UserControl from the top-most drop-down list.

11. Set relevant property values. In this example, the following is used:

– Width property to 615

– Height property to 795

– Windowless property to True

– BackStyle property to Transparent

Connect MotorSimple Element

12. Select the MotorSimple element, and then use the Expression Builder to connect its Value property to the relevant signal property.

– The relevant signal is the signal corresponding to whether the motor is running or not. In the example in Figure 63, the signal name is “AnswerOn”.

– The relevant signal property is the Value property.

Figure 61. UserControl Property

Figure 62. Final Appearance

Figure 63. Connected Value Property

3BSE035041R5001 53

Page 54: 3BSE035041R5001_PLC_Config

Optimized Graphic Example Section 3 Create Process Graphics

Connect StatusBox Element

13. Select the StatusBox element, and then use the Expression Builder to connect the following:

– IndicationAlarm property to the desired alarm expression, that is enter an expression containing the object type property AlarmConditionState_Descendants. For example:

iif(.:Alarm Global Properties:AlarmConditionState_Descendants AND &H1F>0, True, False)

– IndicationAlarmColor to the desired alarm color expression. For example:

iif(.:Alarm Global Properties:AlarmConditionState_Descendants AND &H1F>=8, unackHighAlarm, highAlarmSymbol)

– IndicationForced property to the relevant signal property. In this case, the relevant signal is the signal corresponding to whether the motor object is on or not, and the relevant signal property is the IsForced property.

– IndicationManual property to the relevant signal property. In this case, the relevant signal is the one corresponding to whether the motor is running automatically or not, and the relevant signal property is the Value property. In the example in Figure 64, the signal name is “AnswerAuto”.

Since the desired value in this case is the inversion of the connected signal value, “Not” have to be entered first in the expression.

For the optimized elements, an OPC status indication will not be automatically included. If desired, you have to implement a PgErrorIndicator yourself for this purpose. For more information, refer to the Industrial IT 800xA - Engineering Graphics (3BSE030335Rxxxx).

Figure 64. Connected StatusBox Properties

54 3BSE035041R5001

Page 55: 3BSE035041R5001_PLC_Config

Section 3 Create Process Graphics Faceplate Example

Build

14. Build the Graphic Element aspect. Figure 65 shows an example of the Graphic Element aspect inherited by a motor object in the Control Structure.

The Graphic Element is now ready to be used in other aspects, for example, a Graphic Display aspect. Figure 66 shows part of a Graphic Display aspect with inserted motor graphics.

Faceplate ExampleIt is assumed that the relevant process objects and signals used in this example already have been created and deployed.

PLC Faceplate Templates

Example faceplates are located in the Object Type Structure under the PLC Faceplate Templates object type.

IndicationLocal can also be used to indicate an arbitrary indication.

Figure 65. Inherited Graphic Element Aspect

Figure 66. Inserted Motor Graphics

These example faceplates have the same layout as other faceplates in the system, with one important exception. They contain lock functionality, that is, you can lock the process object and you can also force a lock. When you force a lock, you force the process object to be locked from your Workplace.

3BSE035041R5001 55

Page 56: 3BSE035041R5001_PLC_Config

Faceplate Example Section 3 Create Process Graphics

Relevant are:

• Faceplate Standard. This example faceplate shows a standard faceplate suitable for most objects, such as motors, pumps, analog pumps, valves, analog valves, and so on.

• Faceplate Advanced. This example faceplate shows a faceplate for an advanced motor.

• Faceplate 3Way Valve. This example faceplate shows a faceplate for a 3-way valve.

Figure 68 on page 57 shows the different part of a faceplate. The object and force lock buttons are described below.

These are only example faceplates. You usually design and create your own faceplates from scratch.

Figure 67. Standard, Advanced and 3Way Valve Faceplates

56 3BSE035041R5001

Page 57: 3BSE035041R5001_PLC_Config

Section 3 Create Process Graphics Faceplate Example

Object Lock

Locked means that the faceplate is used from this workplace only, and cannot be used from other client workplaces. Auto-lock functionality can be enabled, see also Configure Object Lock Behavior on page 66.

Figure 68. Faceplate Parts

Table 2. Object Lock States

Button Description Property Value

Process object is not locked. Click to lock the process object. Lock State = 0

Process object is locked from this workplace.

The process object can be controlled from the workplace until the lock is released. To release the lock, click the button again.

Lock State = 3

3BSE035041R5001 57

Page 58: 3BSE035041R5001_PLC_Config

Add Faceplate Aspect Section 3 Create Process Graphics

Add Faceplate Aspect

In this example, the first part is to add and configure a faceplate for a process object in the Control Structure, for example, a pump object.

Copy and Paste a Standard Faceplate

The process object in the Control Structure is based on a process object type in the Object Type Structure. When you add an aspect for the process object type, process objects based on it will inherit the aspect. So instead of creating faceplates for each process object manually, you usually add a faceplate for the process object type. The faceplate then automatically is inherited for each process object based on the object type.

1. In Plant Explorer, select the Object Type Structure.

2. Select the PLC Faceplate Templates object type.

3. Right-click the Faceplate Standard aspect, and select Copy.

4. Select the process object type the process object is based on.

5. Right-click in its aspect list, and select Paste. The aspect is pasted into the aspect list.

6. Rename the aspect to the desired name.

Process object is locked from another workplace. Lock State = 1

Force LockIf the object is locked from other workplace, click to force the object to be locked from your workplace. If so, the object will no longer be locked from the other workplace.

If Lock State = 1

Table 2. Object Lock States

Button Description Property Value

58 3BSE035041R5001

Page 59: 3BSE035041R5001_PLC_Config

Section 3 Create Process Graphics Add Faceplate Aspect

Edit the Faceplate Aspect

7. Select the pasted aspect.

8. Select Config View from the drop-down list, see Figure 69.

Under the displayed Layout tab, the size and layout of the faceplate are set. For the PLC Faceplate Templates, this size is predefined to fit the default size of any Faceplate Element aspect you add. This means that if you don’t change the size of your faceplate elements or the predefined size of faceplates from the PLC Faceplate Templates, they will fit perfectly together.

9. Select the Indicators tab.

Indicators Tab

Under the Indicators tab, see Figure 70, the indicators and aspect links are set up.

Figure 69. Faceplate Standard Aspect

Figure 70. Indicators Tab

3BSE035041R5001 59

Page 60: 3BSE035041R5001_PLC_Config

Add Faceplate Aspect Section 3 Create Process Graphics

Replace Default Signal Names

In the Indicators area, the Expression column shows the defined expression for each indicator. Default expressions are already defined, but you have to replace the signal names in them.

10. Click in the top-most expression box. The Expressions dialog box is displayed, see Figure 71.

11. Replace the text “AnswerAuto” with the name of the signal corresponding to whether the process object is controlled automatically or not.

12. Similarly, click in the bottom-most expression box and replace the text “AnswerOn” with the name of the signal corresponding to whether the process object is on or not.

13. Click Apply.

Select Current Object Type

In the Aspect Links area, default aspect links are already defined, but you have to connect to the correct aspects.

The Object column shows the relevant object type for each the aspect link.

14. Click in the top-most box in the column. The Select Object dialog box will be displayed.

When needed, indicator icons for PLC Connect can be found in the folder \...\ABB Industrial IT\Operate IT\PLC Connect\Bin\Icons\Process Graphics.

Figure 71. Expressions Dialog Box

60 3BSE035041R5001

Page 61: 3BSE035041R5001_PLC_Config

Section 3 Create Process Graphics Add Faceplate Aspect

15. Select the process object type, see Figure 71.

16. Click OK. The top-most box in the Object column will now show a dot “.”. It represents the current process object type, see Figure 73.

Select Relevant Aspects

The Aspect column shows the aspect selected for each aspect link.

17. Click in the top-most box in the Aspect column, and select Operator Note from the drop-down list, see Figure 74. The list shows available aspects.

18. Click in the bottom-most box in the Object column, and again select the process object type.

Figure 72. Selected Object Type

Figure 73. Updated Object Column

Figure 74. Selected Operator Note Aspect

3BSE035041R5001 61

Page 62: 3BSE035041R5001_PLC_Config

Add Faceplate Aspect Section 3 Create Process Graphics

19. Click in the bottom-most box in the Aspect column and select Object Dialog from the drop-down list. Figure 75 shows the result.

20. Select the Buttons Tab

Buttons Tab

Under the buttons tab, see Figure 76, button appearances and behavior are set up.

Button defaults are already defined, but you have to change the default connections.

Change Force Lock Defaults

The top-most row shows the definition of the force lock button. The Property name column shows which property the force lock button affects.

21. Click in the top-most box in the Property name column, and select LOCK from the drop-down list, see Figure 77. The list shows available properties.

The Property value column shows which value the button sets the property to when clicked.

Figure 75. Updated Aspect Links

Figure 76. Button Tab

62 3BSE035041R5001

Page 63: 3BSE035041R5001_PLC_Config

Section 3 Create Process Graphics Add Faceplate Aspect

22. Click in the top-most box in the Property value column and enter “3”. It corresponds to forcing the lock.

Change Control Button Defaults

The next four rows shows the definitions for the control buttons.

23. Click in the bottom-most box in the Object column. The Select Object dialog box will be displayed.

24. Select the signal type that corresponds to setting the process object to start, see Figure 78.

25. Click OK. The bottom-most box in the Object column will now show the signal type.

Figure 77. Selected LOCK Property

This means that Lock State will be set to the value “3”, see alsoTable 2 on page 57.

Figure 78. Selected Signal Type

3BSE035041R5001 63

Page 64: 3BSE035041R5001_PLC_Config

Add Faceplate Aspect Section 3 Create Process Graphics

The property name column shows which property the control button affects.

26. Click in the bottom-most box in the Property name column, and select Value from the drop-down list.

When you click a control button it sets a process signal to a certain value. The Property value column shows this value, which depends on the process signal. For example, a process signal corresponds to whether a process objects is on or not. The control button that sets the process object to start should then set the signal to “TRUE”, while the control button that sets the process object to stop should set the signal to “FALSE”, and so on.

27. Click in the bottom-most box in the Property value column, and select TRUE from the drop-down list.

28. Repeat Step 23 to Step 27 for each of the remaining rows. Figure 79, which shows the end result.

Input Rules

All control buttons in a faceplate have to be protected with rules that only enable the control buttons if the process object is locked by the user, that is, the faceplate has to be locked from the Workplace to make it possible for an operator to use the faceplate to control the process object.

Figure 79. Connected Buttons

Be sure to use input rules that require a locked process object to enable input. Use them for all control buttons in your faceplates.

64 3BSE035041R5001

Page 65: 3BSE035041R5001_PLC_Config

Section 3 Create Process Graphics Configure Alarm Handling

The Enabled column under the Buttons tab is used to define input rules. Faceplates from the PLC Faceplate Templates already have implemented input rules. However, you have to change the default signal names in some of them.

29. Click in the top-most box in the Enabled column. The Expressions dialog box is displayed, see Figure 80. The box shows the input rule for the force lock button. Since there is no signal name in it, continue with the next step.

The input rules can be expanded. For example, the rule enabling input for a button can be expanded to require both a locked object and that the object is set to be controlled manually, see Figure 81. If so, the button will be disabled when the object is controlled automatically.

30. Click in each of the other boxes in the Enabled column. When the expression contains a default signal name, replace it with the correct signal name. For example, the dialog box in Figure 81 contains the default signal name “AnswerAuto”. Replace it with the name of the signal that corresponds to whether the process object is controlled automatically or not.

Configure Alarm Handling

In this example, the last part is to add an AlarmControl aspect. This is necessary for the faceplate to be able to show alarm and warning graphics.

1. Select the Object Type Structure.

2. Select the PLC Faceplate Templates object type.

3. Right-click the AlarmControl aspect, and select Copy.

Figure 80. Input Rule Example

Figure 81. Expanded Input Rule Example

3BSE035041R5001 65

Page 66: 3BSE035041R5001_PLC_Config

Faceplate as Default Aspect Section 3 Create Process Graphics

4. Select your process object type.

5. Right-click in its aspect list, and select Paste. The aspect is pasted into the aspect list.

6. Right-click the pasted aspect and select Build.

7. The faceplate is now finished.

Faceplate as Default Aspect

To make the faceplate pop-up when you click the graphics representing the process object in a graphic display, the faceplate needs to be the default aspect.

Configure Faceplate Position

The Faceplate will by default pop-up in the lower left corner.

Configure Object Lock Behavior

In order to make a faceplate automatically lock the object when displayed, you have to configure this for all users using faceplates.

1. In Plant Explorer, select the User Structure.

The users and user groups that are allowed to work in the system are defined in the User Structure.

2. Select a User object in a User Group, and then the Graphics Profile Values aspect.

3. Select FaceplateAutoLockObject from the Names list, and Basic rule from the Rules list.

4. In the Datasource area, select the Local option button.

A faceplate is normally the default aspect without any further settings. How the default aspect settings is done is described in the manual Industrial IT 800xA - Engineering Graphics (3BSE030335Rxxxx).

How to configure Faceplate Position (at cursor) is described in the manual Industrial IT 800xA - Engineering Graphics (3BSE030335Rxxxx)

66 3BSE035041R5001

Page 67: 3BSE035041R5001_PLC_Config

Section 3 Create Process Graphics Configure Object Lock Behavior

5. Select the Value check box. and click Apply.

6. Repeat Step 2 to Step 5 for all users who are to use the process graphics.

Figure 82. Configuring Object Lock Behavior.

3BSE035041R5001 67

Page 68: 3BSE035041R5001_PLC_Config

Configure Object Lock Behavior Section 3 Create Process Graphics

68 3BSE035041R5001

Page 69: 3BSE035041R5001_PLC_Config

Section 4 Alarm and Event ListConfigurations

PLC Connect supplies three customized alarm and event list configurations. By associating them with Alarm and Event List aspects, you can create PLC Connect specific alarm and event lists configured to show a selection of the alarms and events.

• PLC Alarm List. This configuration shows alarms, including alarms disabled by an operator.

• List of Control Blocked Signals. This configuration shows the manually controllable signals that are disabled. The values of a control blocked signal can’t be changed by an operator.

• List of Forced Signals. This configuration shows forced signals. Forced signals are signals whose values are temporarily forced to a certain value, that is, the signal values appear to be constant regardless of the actual process values.

The customized alarm and event list configurations are located in the Library Structure under the object “Alarm & Event List Configurations”, sub-object “SPS Alarm & Event List Configuration”.

Alarm and event list configuration is described in the Industrial IT 800xA - System Operator Workplace Configuration (3BSE030322Rxxxx).

3BSE035041R5001 69

Page 70: 3BSE035041R5001_PLC_Config

Section 4 Alarm and Event List Configurations

70 3BSE035041R5001

Page 71: 3BSE035041R5001_PLC_Config

Section 5 Openness

IntroductionThis section describes various methods for client applications to access PLC Connect Real Time Data and other means of interaction with PLC Connect:

• Extension Processes on page 71 describes the use of extension processes in the PLC Server.

• PLC Connect Real Time Data Access on page 72 describes an interface for project specific variable access in the Real Time Database (RTDB).

• Communication Server Pre Treatment on page 90 describes an interface for project specific variable pre treatment in the Communication Server.

• Event Server Pre Treatment on page 97 describes an interface that makes it possible to modify events before they enter the Event Server.

• Event Extended Options on page 108 describes how to set up a Special Application to execute in the case of an event.

• PLC Connect Properties on page 112 describes accessible properties.

• Dial Manager Server Access (Option) on page 121 describes an interface for accessing the Dial Manager Server.

Extension ProcessesYou can use applications of your own together with PLC Connect. When you want such an application to start and stop synchronized with the PLC Server, you have to add the application as an extension process to the PLC Server. However, the application you add cannot have any kind of user interface that require manual input, for example, clicking an OK button. This kind of user interface will halt

3BSE035041R5001 71

Page 72: 3BSE035041R5001_PLC_Config

PLC Connect Real Time Data Access Section 5 Openness

program execution, since extension processes (you can have more than one) run in the same service context as the PLC Server.

In a redundant PLC Connect connectivity server environment, the PLC Connect Server Service ensures that an extension process executes only in the node that is currently master. Automatic restart of the extension process in the event of a process crash is also supported. However, the PLC Connect built in mechanism for real time data replication between the two nodes, cannot be utilized. If the implementation in an extension process in a redundant connectivity server environment requires any kind of data replication in order to function, this has to be solved by the extension process itself.

To add your application as an extension process:

1. Start a Plant Explorer Workplace.

2. Select the Service Structure.

3. Select the object named “PLC Server, Service”.

4. Select the Service Group object for the desired control network.

5. Select the Service Group Definition aspect.

6. Select the Special Configuration tab.

7. Click Help and refer to the information on how to add the application as an extension process.

8. If you want to add the application as an extension process for other control networks, repeat Step 4 to Step 7 for each of these control networks.

PLC Connect Real Time Data Access

Introduction

The real time data in the RTDB is accessible for user written applications via a COM interface. This Open Interface (OIF) is available on both server and client nodes. Running the application on a server node can be done for example as an extension process, see Extension Processes on page 71, but consider the restrictions that apply to such a process. It can also be run as a standalone process with or

72 3BSE035041R5001

Page 73: 3BSE035041R5001_PLC_Config

Section 5 Openness Variable Access

without a user interface. On a client node it cannot be run as an extension process to the PLC Server, only as a standalone executable, with or without a user interface.

Variable Access

The variable access is performed by one or more executable files independently from the RTDB.

In the RTDB two classes are implemented: Variables and Variable.

Client means a certain instance of a Variables object, see Variable Access Interface on page 75. A program (.EXE file) can have several instances of Variables, although in most cases there is only one instance.

Figure 83. Client and Server Nodes

3BSE035041R5001 73

Page 74: 3BSE035041R5001_PLC_Config

Subscription Section 5 Openness

The RTDB is able to inform the respective EXE file when a certain variable changes its value.

An object is created based on the class Variables. Using the methods for the class it is possible to create Variable objects or direct references to PLC Connect instances.

It is possible to Lock variables before writing values to them, via methods in the Variable Access Interface, see Variable Access Interface on page 75.

The holder of a Lock is identified by NodeId and UserId.

Locking can be done on a signal level, however the whole object is then locked.

Subscription

When a client (Variables object) is created, a queue will be allocated. In this queue variable changes will be stored. In one queue changes from all subscribed variables will be stored.

• Each client may have a queue of its own which is independent of other clients.

• It is not necessary to use the queue function, the calculation results can be written at any time, for example, cyclically.

• Any number of clients can choose not to use queues.

Figure 84. Variable Access

74 3BSE035041R5001

Page 75: 3BSE035041R5001_PLC_Config

Section 5 Openness Variable Access Interface

Variable Change

A variable change is defined as an analog signal value that is changing by a value higher than the defined signal hysteresis (the hysteresis may also be 0) or a binary signal change (leading, trailing or both edges).

Variable Access Interface

This section describes the properties and methods of the interface for “Variable access”. This interface consists of two different classes: Variable and Variables. To be able to use these classes, for example in Visual Basic, references have to be done to a library included in the PLC Connect installation. The name of the library is AdsScadaHdlr 1.0 Type Library.

Variable Access Properties and Methods

The properties and methods of the classes are listed in Table 3. All properties are read only, unless anything otherwise stated in the table.

Figure 85. Subscription

Properties such as Lower can be read both via a method and via properties. Here, the properties are considered the “normal” way to read these properties. The methods should be considered a way to optimize the performance by reading several properties with the same call.

3BSE035041R5001 75

Page 76: 3BSE035041R5001_PLC_Config

Variable Access Properties and Methods Section 5 Openness

Table 3. Properties and Methods

Class Methods/properties

Variables Init(...)

Variables Init2(...)

Variables Valid As Boolean

Variables Changed As Boolean

Variables Subscribe (…) As Boolean

Variables SubscribeByCalcType(…) As Boolean

Variables GetEvent(…) As Boolean

Variables GetQueueInfo(…) As Boolean

Variables ClearQueueInfo()

Variables Item(…) As Variable

Variables ReadValue(…) As Boolean

Variables WriteValue(…) As Long

Variables ForceLock(…) As Long

Variables ReleaseLock(…) As Long

Variables LockedBy(…) As Long

Variables GetGUID(…) As Long

Variable ReadValue(…) As Boolean

Variable WriteValue(…) As Long

Variable ReadMeasure(…) As Boolean

Variable ReadAttributes(…) As Boolean

Variable ReadLimit(…) As Boolean

Variable WriteLimit(…) As Long

76 3BSE035041R5001

Page 77: 3BSE035041R5001_PLC_Config

Section 5 Openness Variable Access Properties and Methods

In these methods the sVarName in-parameter is the name of the variable in the PLC Server. If the name is entered in the format “{xxxxxxxx-xxxx-xxxx-xxx-xxxxxxxxxxxx}”, it will be interpreted as a GUID for a variable in the PLC server.

The variable name must be entered in the format “<controller name>:<object name>.<object name> <signal name>”.

Variable ForceLock(…) As Long

Variable ReleaseLock(…) As Long

Variable LockedBy(…) As Long

Variable Lower As Double

Variable Upper As Double

Variable LowerControlLim As Double (Read/Write)

Variable UpperControlLim As Double (Read/Write)

Variable IsInverted As Boolean

Variable IsEvent As Boolean

Variable IsTimeStamped As Boolean

Variable IsBlocked As Boolean

Variable IsControllable As Boolean

Variable IsControlBlocked As Boolean

Variable IsForced As Boolean

Variable Name As String

Variable GUID As String

If composite process objects are used, there may be several <object name> items in sSignalName. See also the code sample referred to in Sample Code on page 87.

Table 3. Properties and Methods (Continued)

Class Methods/properties

3BSE035041R5001 77

Page 78: 3BSE035041R5001_PLC_Config

Properties and Methods for the Class Variables Section 5 Openness

Properties and Methods for the Class Variables

InitSyntax: Init(pSysCtxId As AfwSystemContextId, pSGId As AfwServiceGroupId)

Used to identify the server.

pSysCtxId (in): the System Context Id.

pSGId (in): the Service Group Id.

Init2Syntax: Init2(pObject As AfwObject)

Used to identify the server.

pObject (in): an object in the PLC Generic Control Network tree.

ValidSyntax: Valid As Boolean

Always TRUE. (Exists only for backward compatibility reasons).

ChangedSyntax: Changed As Boolean

TRUE when there are one or several variable changes in the queue.

Subscribe Syntax: Subscribe(lQueueMaxSize As Long, sVarName As String,bFilter As Boolean ) As Boolean

Subscribes a variable for queue handling. Returns TRUE if variable found.

lQueueMaxSize (in): states the maximum number of allowed events in the queue. Is only significant at the first call. sVarName(in): returns the name of the variable.bFilter (in): if TRUE, one variable change for each signal at most is queued (the latest).

78 3BSE035041R5001

Page 79: 3BSE035041R5001_PLC_Config

Section 5 Openness Properties and Methods for the Class Variables

SubscribeByCalcType Syntax: SubscribeByCalcType(lQueueMaxSize As LonglCalcTypeLow As Long, lCalcTypeHigh As Long, bFilter As Boolean ) As Boolean

For future use.

GetEvent Syntax: GetEvent( sVarName As String, vntValue As Variant, OPCQuality As Integer, TimeStamp As Date, lCalculationType As Long, sVarParam As String, bOverFlow As Boolean ) As Boolean

Gets a variable change from the queue. Returns FALSE if the queue is empty.

SVarName(out): returns the name of the variable.vntValue(out): returns the value of the signal.OPCQuality(out): indicates the OPC quality of the variable.TimeStamp(out): time stamp for value changed.lCalculationType(out): selected calculation type. This user defined private data is selected in the Calculations dialog box. To access it, click Calculations under the Common tab of a Signal Configuration aspect for an I/O signal type or signal.sVarParam(out): entered subscription parameter. This user defined private data is also entered in the Calculations dialog box. To access it, see above.bOverFlow (out): is TRUE if the number of events in the queue = lQueueMaxSize.

GetQueueInfo Syntax: GetQueueInfo(lCurrentQueueSize As Long, lPeakQueueSize As Long, lTotalQueuedEvents As Long) As Boolean

Gives diagnostic information about a queue. Returns TRUE if call succeeded.

lCurrentQueueSize(out): returns size of queuelPeakQueueSize(out): returns peak size value of the queue lTotalQueuedEvents(out): returns number of queued events

ClearQueueInfoSyntax: ClearQueueInfo()

Clears diagnostic information for a queue.

3BSE035041R5001 79

Page 80: 3BSE035041R5001_PLC_Config

Properties and Methods for the Class Variables Section 5 Openness

Item Syntax: Item( sVarName As String) As Variable

Gets a reference to a named variable. If the variable is not found, ”Nothing” is returned.

sVarName(in): name of the variable.

ReadValue Syntax: ReadValue( sVarName As String, vntValue As Variant, OPCQuality As Integer ) As Boolean

Reads the value of a named variable. FALSE if the variable is not found.

sVarName(in): name of the variable.vntValue(out): returns the value of the signal.OPCQuality(out): indicates the OPC quality of the variable.

WriteValue

Syntax: WriteValue( sVarName As String, vntValue As Variant, OPCQuality As Integer ) As Long

Writes to a named variable, but not if vntValue is ”vtEmpty”. This is useful if you only want to write into the error bits. A variable is “vtEmpty” if it is declared but not assigned. If the variable is fetched from a controller, the vntValue is written to the controller if the variable is controllable. Otherwise, the functions connected to the signal are performed, for example the alarm function.

Returns status codes according to Table 4 on page 86.

sVarName(in): name of the variable.vntValue (in): value to the signal.

There are also variants of the ReadValue method, see More on Reading and Writing on page 88.

If you write data to a signal connected to an external IO then that data will be written to the controller.

80 3BSE035041R5001

Page 81: 3BSE035041R5001_PLC_Config

Section 5 Openness Properties and Methods for the Class Variables

OPCQuality (in): if the variable is of the type ”Internal”, then it is written to the OPC quality of the variable, else this parameter is ignored.

ForceLockSyntax: ForceLock( sVarName As String ) As Long

Called by an application if it needs to Lock a certain variable. The Lock will be held until it is released by the application or until another application forces the Lock. If the variable is already locked by other application, this call will force the Lock.

Returns status codes according to Table 4 on page 86.

sVarName(in): name of the variable.

ReleaseLockSyntax: ReleaseLock( sVarName As String ) As Long

Called by an application when it wants to release a Lock for the variable.

Returns status codes according to Table 4 on page 86.

sVarName(in): name of the variable.

LockedBySyntax: LockedBy( sVarName As String, sNodeId As String, sUserId As String ) As Long

Method that returns the identification of the user, currently holding the Lock.

Returns status codes according to Table 4 on page 86. If the variable isn’t locked, nodeId and UserId will be set to 200.

sVarName(in): name of the variable.sNodeId(out): name of the node where the Lock is held.sUserId(out): name of the user that holds the Lock.

GetGUIDSyntax: GetGUID( sVarName As String, sGUID As String ) As Long

There are also variants of the WriteValue method, see More on Reading and Writing on page 88.

3BSE035041R5001 81

Page 82: 3BSE035041R5001_PLC_Config

Properties and Methods for the Class Variable Section 5 Openness

Method that returns the GUID of the variable. Returns status codes according to Table 4 on page 86. The method is intended to be used whenever an Event occurs and the client needs to know the Event’s guid, since the GetEvent() function returns an object name and not a guid.

sVarName(in): name of the variable.sGUID(out): GUID of the variable.

Properties and Methods for the Class Variable

ReadValue

Syntax: ReadValue( vntValue As Variant, OPCQuality As Integer ) As Boolean

Reads the value of the variable.

VntValue(out): returns the value of the signal.OPCQuality(out): indicates the OPC quality of the variable.

WriteValue

Syntax: WriteValue( vntValue As Variant, OPCQuality As Integer ) As Long

Writes vntValue to a named variable. If the variable is fetched from a controller, the value is written to the controller if the variable is controllable. Else, the functions connected to the signal, are performed, for example the alarm function. If vntValue contains ”vtEmpty”, only the quality is written, not the value. This is useful if you only want to write into the quality. A variable is “vtEmpty” if it is declared but not assigned.

Returns status codes according to Table 4 on page 86.

It is recommended to instead use the method ReadValue in the class Variables, see also ReadValue on page 80.

It is recommended to instead use the method WriteValue in the class Variables, see also WriteValue on page 80.

If you write data to a signal connected to an external IO then that data will be written to the controller.

82 3BSE035041R5001

Page 83: 3BSE035041R5001_PLC_Config

Section 5 Openness Properties and Methods for the Class Variable

VntValue(in): value to the signal.OPCQuality(in): indicates the OPC quality of the variable.

ReadMeasureSyntax: ReadMeasure( fLower As Double, fUpper As Double,fLowerControlLim As Double, fUpperControlLim As Double, bIsControllable As Boolean, bIsControlBlocked As Boolean, bIsForced As Boolean) As Boolean

Reads measuring properties of the instance. Returns FALSE if the signal is not analog.

fLower(out): Returns the lower limit of the range of measurement.fUpper(out): Returns the upper limit of the range of measurement.fLowerControlLim(out): Returns the lower control limit.fUpperControlLim(out): Returns the upper control limit.bIsControllable(out): indicates if the signal is controllable.bIsControlBlocked(out): indicates if the signal is control blocked.bIsForced As Boolean(out): indicates if the signal is forced.

ReadAttributesSyntax: ReadAttributes(bIsInverted As Boolean, bIsEvent As Boolean, bIsTimeStamped As Boolean, bIsBlocked As Boolean, bIsControllable As Boolean, bIsControlBlocked As Boolean, bIsForced As Boolean) As Boolean

Returns FALSE if the signal is not boolean.

bIsInverted(out): returns TRUE if the signal is inverted.bIsEvent(out): returns TRUE if the signal is an event or an alarm. bIsTimeStamped(out): returns TRUE if the signal is an alarm time stamped in the controller.bIsBlocked(out): returns TRUE if the signal is blocked.bIsControllable(out): returns TRUE if the signal is controllable.bIsControlBlocked(out): returns TRUE if the signal is control blocked.bIsForced(out): returns TRUE if the signal is forced.

3BSE035041R5001 83

Page 84: 3BSE035041R5001_PLC_Config

Properties and Methods for the Class Variable Section 5 Openness

ReadLimitSyntax: ReadLimit(lLimitNumber As Long,lTypeLimiter As Long, fOnLimit As Double, fOffLimit As Double) As Boolean

Returns FALSE if the signal is not analog.

lLimitNumber(in): state the sequence number of the limiter from 1 and up to 8, for the limiters enabled in the object, in consecutive order from top to bottom on the limiter tab in the Configuration Tools. For more info on Configuration Tools, see the PLC Connect online help.lTypeLimiter(out): has the value 0 for minimum-limiter and the value 1 for max.fOnLimit(out): fOnLimit is the limit where the alarm is activated.fOffLimit(out): is the limit where the alarm is deactivated.

WriteLimitSyntax: WriteLimit(lLimitNumber As Long,lTypeLimiter As Long, fOnLimit As Double, fOffLimit As Double) As Long

Returns status codes according to Table 4 on page 86. For example, a status code is returned if arg LimitNumber + Limittype is out of range, that is, not in [1,8] and [0,1] respectively.

lLimitNumber(in): states the sequence number of the limiter from 1 and upwards for the limiters enabled in the object, in consecutive order from top to bottom on the limiter tab in the Configuration Tools.lTypeLimiter(in): has the value 0 for minimum-limiter and the value 1 for max.fOnLimit(in): fOnLimit is the limit where the alarm is activated. fOffLimit(in): is the limit where the alarm is deactivated.

ForceLockSyntax: ForceLock() As Long

Called by an application if it needs to Lock a certain variable. The Lock will be held until it is released by the application or until another application forces the Lock. If the variable is already locked by other application, this call will force the Lock.

Returns status codes according to Table 4 on page 86.

Affects only RTDB, and not configuration values set in PLC Connect configuration aspects.

84 3BSE035041R5001

Page 85: 3BSE035041R5001_PLC_Config

Section 5 Openness Conditions When Writing a Variable Value

ReleaseLockSyntax: ReleaseLock() As Long

Called by an application when it wants to release a Lock for the variable. Returns status codes according to Table 4 on page 86.

LockedBySyntax: LockedBy( sNodeId As String, sUserId As String ) As Long

Method that returns the identification of the user, currently holding the Lock. Returns status codes according to Table 4 on page 86.

sNodeId(out): name of the node where the Lock is held.SuserId(out): name of the user that holds the Lock.

Conditions When Writing a Variable Value

For the methods WriteValue and WriteLimit, the following is valid:

1. If the signal is blocked or forced nothing happens, but error status is returned.

2. If the signal is internal, the value is written unconditionally, no check is done on ”controllable”, ”control limits” or ”range of measurement”. A check is done, however, on control limits if the signal is controllable.

3. On an internal, real or integer signal, a check is performed on limiters.

4. On an internal binary signal, which is an event or an alarm, a possible change of state will be further event handled.

5. If the signal is external and analog it is checked that the signal is controllable and that the value is within the control limits. After this, the value is written to the controller. Possible limiters are not checked (it will happen when the new value is read the next time). If control is not performed, due to any of the conditions, error status is returned instead.

6. If the signal is external and binary it is checked that the signal is controllable. Then the value is written to the controller. If the signal is an event or an alarm, a possible change of state is not event handled (it will happen when the new

3BSE035041R5001 85

Page 86: 3BSE035041R5001_PLC_Config

Status Codes for Methods Returning a Value of the Type Long Section 5 Openness

value is read the next time). If control is not performed, due to any of the conditions, error status is returned instead.

7. If a control is performed to the controller, or internally at an internal signal, and event logging of operator’s actions in the database is selected, the control is event logged.

Status Codes for Methods Returning a Value of the Type Long

Some methods are returning “Long”. This could be used as a status check of the method, see Table 4.

Table 4. Returned Status Codes(1)

Value Description

Variables VariableG

etG

uid

Fo

rceL

ock

Rel

ease

Lo

ck

Lo

cked

By

Wri

teV

alu

e

Wri

teV

alu

eEx

Wri

teV

alu

es

Wri

teV

alu

esE

x

Fo

rceL

ock

Rel

ease

Lo

ck

Lo

cked

By

Wri

teV

alu

e

Wri

teL

imit

0 Other error, not specified below. X X X X X X X X X X X X X

32000 Success; if the method involves writing, the value has been written. All other status codes indicate that the value is not written.

X X X X X X X X X X X X X

32001 The variable cannot be found in RTDB. The reason may be a misspelled name or a deploy has not been made after changes in the database.

X X X X X X X X X X X X X

32003 Variable cannot be manually controlled. The reason may be: (1) variable is not defined as controllable, (2) variable is control blocked, or (3) forced value.

X X X X X

32004 Internal error in RTDB. X X X X X X X X X X X X X

32009 Value is outside defined control limits. X X X X X

86 3BSE035041R5001

Page 87: 3BSE035041R5001_PLC_Config

Section 5 Openness OPC Quality(In/Out)

OPC Quality(In/Out)

This flag represent the quality state for a variable’s data value.

OPC quality is defined as (OPC_QUALITY_MASK & opcquality) = OPC_QUALITY_GOOD(C0) or OPC_QUALITY_BAD(0x).

Sample Code

Sample Variable Access

A Visual Basic 6.0 sample, ReadWrite.vbp, can be found in the folder\…\ABB Industrial IT\Operate IT\PLC Connect\Samples\PLCVariableAccess\ReadWrite.

Sample Subscribe

A Visual Basic 6.0 sample, Subscribe.vbp, can be found in the folder\…\ABB Industrial IT\Operate IT\PLC Connect\Samples\PLCVariableAccess\Subscribe.

32101 Limit (number or type) is not valid. X

32105 Variable is not reserved. X X

(1) X marks methods returning the status code.

Table 4. Returned Status Codes(1)

Value Description

Variables Variable

Get

Gu

id

Fo

rceL

ock

Rel

ease

Lo

ck

Lo

cked

By

Wri

teV

alu

e

Wri

teV

alu

eEx

Wri

teV

alu

es

Wri

teV

alu

esE

x

Fo

rceL

ock

Rel

ease

Lo

ck

Lo

cked

By

Wri

teV

alu

e

Wri

teL

imit

3BSE035041R5001 87

Page 88: 3BSE035041R5001_PLC_Config

More on Reading and Writing Section 5 Openness

More on Reading and Writing

The ReadValue and WriteValue methods described in ReadValue on page 80 and WriteValue on page 80, allow you only to access one variable at a time. There are also variants of these methods, declared as shown below.

Reading and Writing Time Information

The ReadValueEx and WriteValueEx methods allows you to also read and write time information to a single variable;

Function ReadValueEx(sVarName As String, vntValue As Variant, pwOPCQuality As Integer, timeStamp As Date, UTCTime As Boolean) As Boolean

Function WriteValueEx(sVarName As String, vntValue As Variant, wOPCQuality As Integer, timeStamp As Date, UTCTime As Boolean) As Long

UTCTime: whether local time (value is FALSE) or UTC time (value is TRUE) is used.

timestamp: the date and time.

WriteValueEx returns status codes according to Table 4 on page 86.

Reading and Writing Arrays of Data

The ReadValues and WriteValues methods allows you to read and write arrays of variables and their values in one call; The ReadValuesEx and WriteValuesEx methods allows you to also read and write time information.

If you write data to a signal connected to an external IO then that data will be written to the controller.

These methods are only available for usage from C++, not Visual Basic.

88 3BSE035041R5001

Page 89: 3BSE035041R5001_PLC_Config

Section 5 Openness More on Reading and Writing

HRESULT WriteValues([in] unsigned long count,[in,size_is(count)] AwfObjectId* objectIds,[in,size_is(count)] VARIANT* vntValues,[in,size_is(count)] short* wOPCQualities, [out,size_is(,count)] LONG** results);

HRESULT ReadValues([in] unsigned long count,[in,size_is(count)] AwfObjectId* objectIds,[out,size_is(,count)] VARIANT** vntValues,[out,size_is(,count)] short** wOPCQualities, [out,size_is(,count)] BOOL** results);

HRESULT ReadValuesEx ( [ in ] unsigned long count,[ in,size_is(count) ] AfwObjectId* objectIds,[ out,size_is(,count) ] VARIANT** vntValues,[ out,size_is(,count) ] short** wOPCQualities, [ out,size_is(,count) ] FILETIME** timeStamps,[ in ] VARIANT_BOOL UTCTime,[ out,size_is(,count) ] BOOL** results ) ;

HRESULT WriteValuesEx ( [ in ] unsigned long count,[ in,size_is(count) ] AfwObjectId* objectIds,[ in,size_is(count) ] VARIANT* vntValues,[ in,size_is(count) ] short* wOPCQualities,[ in,size_is(count) ] FILETIME* timeStamps,[ in ] VARIANT_BOOL UTCTime,[ out,size_is(,count) ] LONG** results);

UTCTime: whether local time (value is FALSE) or UTC time (value is TRUE) is used.

timestamps: the date and time.

WriteValuess and WriteValuesEx return status codes according to Table 4 on page 86.

3BSE035041R5001 89

Page 90: 3BSE035041R5001_PLC_Config

Communication Server Pre Treatment Section 5 Openness

Communication Server Pre Treatment

Introduction

The functions described in this section refer to an interface for project specific variable pre treatment in the Communication Server.

The interface is implemented essentially as a COM Interface.

Variable Pre Treatment

When a new value is received from the driver, the Communication Server calls a default COM-interface in a DLL. In the DLL, project-specific calculations can be entered. The Communication Server is the client.

The interfaces only support signals and not the access of total objects.

Variable Pre Treatment

It is presumed that the calls are made with ”In process” (that is to DLL) COM for best performance and Visual Basic 6.0 is used to implement the DLL. The project type have to be ”Active X DLL”. The so-called “binary compatibility” must be used to prevent the Class IDs from changing, which would require relinking of the Communication Server. The DLL, PreTreat3.dll, is located in the folder …\ABB Industrial IT\Operate IT\PLC Connect\Samples\Pretreat3\Compatibility.

One and only one DLL can be used per server.

90 3BSE035041R5001

Page 91: 3BSE035041R5001_PLC_Config

Section 5 Openness Variable Pre Treatment

Figure 86. Variable Pre Treatment

The PreTreat3.dll is loaded by the Communication Server at program start and activated if found. By default, this DLL is not registered during the installation of PLC Connect. To use it, you have to register the DLL manually with the Regsvr32.exe. (Default folder is C:\Windows\System 32). Refer to the Windows documentation for more information on how to register a DLL.

Consider the following:

• The DLL must not implement any kind of user interface.

• The DLL must not utilize the Variable Access Interface described in PLC Connect Real Time Data Access on page 72.

• The DLL must only use the callback interface provided in the Initialize call in order to access RTDB. (See also Initialize on page 92 and Callback Interface on page 95).

• The DLL must not access any other data in the 800xA System, for example the Aspect Directory.

• The DLL must not make any file access on disk. To use log or troubleshooting files during a development phase is ok, but not during live operations.

Ensure that the code implemented is fast in execution. The DLL executes In-process in the PLC Connect Communication Server Process, and may cause the PLC Server as a whole to behave poorly due to a bad PreTreat implementation.

3BSE035041R5001 91

Page 92: 3BSE035041R5001_PLC_Config

Properties and Methods for the Variable Pre Treatment Section 5 Openness

If both methods (“pre calculation” and “limit pre calculation”) are called, ValueChanged is called first. The value obtained from ValueChanged is then sent to ValueLimit (see the description of the methods below).

Properties and Methods for the Variable Pre Treatment

The interfaces listed in Table 5 have to be fulfilled by the DLL. There is a standard DLL, with standard handling, which is included in the system. The DLL is located in the located in the folder …\ABB Industrial IT\Operate IT\PLC Connect\Bin. This DLL may be exchanged by a project specific DLL.

InitializeSyntax: Initialize(obj As AdsCsInterfacesLib.IAdsCsRtdbVariable2)

Enables the DLL to make arbitrary preparations at start-up.

Obj is a callback interface that makes it possible to read and write to signals, see also Callback Interface on page 95.

Calls are automatically blocked when deploy is in progress.

Table 5. Interfaces

Class Method

PLCExternal5 Initialize()

PLCExternal5 ReInitialize()

PLCExternal5 OnlineNotification()

PLCExternal5 ValueChanged(…)

PLCExternal5 ValueLimit(…)

PLCExternal5 OnControl(…)

PLCExternal5 Terminate()

92 3BSE035041R5001

Page 93: 3BSE035041R5001_PLC_Config

Section 5 Openness Properties and Methods for the Variable Pre Treatment

ReInitializeSyntax: Reinitialize()

Enables the DLL to make arbitrary preparations after deploy. Must not run too long.

OnlineNotificationSyntax: OnlineNotification()

Called prior to a deploy (as opposed to ReInitialize that is called after a deploy). Lets the user application do any preparations necessary before a deploy.

ValueChangedSyntax: ValueChanged (sSignalName as String, vntProcessValue As Variant, vntPreviousValue As Variant, vntNewValue As Variant, OPCQuality As Integer, dtTimestamp as Date, lCalculationType As Long, sPreParam As String)

Is called when the value of the variable is changed. sSignalName is the variable in the format “<controller name>:<object name>.<object name> <signal name>”.

vntProcessValue is the value from the Communication driver. vntNewValue is the value pre-treated by the DLL. vntPreviousValue is the previous value. OPCQuality: indicates the OPC quality of the variable. dtTimestamp is the date and time. lCalculationType is the selected calculation type. sPreParam is the entered pre calculation parameter, see Calculation Parameters for Pre Treatment on page 96. The method may assign new values to vntNewValue and OPCQuality before returning.

ValueLimitSyntax: ValueLimit(sSignalName as String, vntValue As Variant, OPCQuality As Integer, lCalculationType As Long, sPreLimParam As String, bEnableLimiter1 As Boolean, lTypeLimiter1 As Long, fLimit1 As Single, fHysteresis1 As Single, bEnableLimiter2 As Boolean, lTypeLimiter2 As Long, fLimit2 As Single, fHysteresis2 As Single, bEnableLimiter3 As Boolean, lTypeLimiter3 As Long, fLimit3 As Single, fHysteresis3 As Single, bEnableLimiter4 As Boolean, lTypeLimiter4 As Long,

If composite process objects are used, there may be several <object name> items in sSignalName. See also the code sample referred to in Sample Code on page 97.

3BSE035041R5001 93

Page 94: 3BSE035041R5001_PLC_Config

Properties and Methods for the Variable Pre Treatment Section 5 Openness

fLimit4 As Single, fHysteresis4 As Single, bActivateAlarm1As Boolean, bActivateAlarm2 As Boolean, bActivateAlarm3 As Boolean, bActivateAlarm4 As Boolean)

Is called when the value of the variable is changed. sSignalName is the variable in the format “<controller name>:<object name>.<object name> <signal name>”. .

vntValue is the value. OPCQuality: indicates the OPC quality of the variable. lCalculationType is the selected calculation type. sPreLimParam is the entered limit pre calculation parameter, see Calculation Parameters for Pre Treatment on page 96. The following 12 parameters are the default data in the database. The method is responsible for assigning values to bActivateAlarmx and OPCQuality before returning. If bActivateAlarmx is true, the alarm is activated after returning.

OnControlSyntax: OnControl(sSignalName as String, vntValue As Variant, vntPreviousValue As Variant, vntNewValue As Variant, OPCQuality As Integer, dtTimestamp as Date, lCalculationType As Long, sPreParam As String)

Is called when the variable value is changed by a client. sSignalName is the variable in the format “<controller name>:<object name>.<object name> <signal name>”.

vntValue is the value that the client has set. vntPreviousValue is the previous value. OPCQuality: indicates the OPC quality of the variable. dtTimestamp is the date and time. lCalculationType is the selected calculation type. sPreParam is the entered pre calculation parameter, see Calculation Parameters for Pre Treatment on page 96. The method may assign a new value to vntNewValue before returning.

TerminateSyntax: Terminate()

Enables the DLL to make arbitrary preparations at termination.

If composite process objects are used, there may be several <object name> items in sSignalName. See also the code sample referred to in Sample Code on page 97.

If composite process objects are used, there may be several <object name> items in sSignalName. See also the code sample referred to in Sample Code on page 97.

94 3BSE035041R5001

Page 95: 3BSE035041R5001_PLC_Config

Section 5 Openness Callback Interface

Callback Interface

The callback interface has two methods for accessing the RTDB: ReadValue and WriteValue.

ReadValue

Syntax: ReadValue (sVarName As String, iProperty As Long, vntValue As Variant, OPCQuality As Integer, dtTimestamp as Date) As Long

Read the property value of a variable. Returns less than zero if the variable cannot be read.

sVarName(in) is the variable name in the format “<controller name>:<object name>.<object name> <signal name>”.

iProperty(in) is the property number in the signal PCA. “1” is the value property of the signal. vntValue(out) returns the value of the property. OPCQuality: indicates the OPC quality of the variable. dtTimestamp is the date and time.

WriteValue

Syntax: WriteValue (sVarName As String, iProperty As Long, vntValue As Variant, OPCQuality As Integer, dtTimestamp as Date) As Long

Writes the property value of a variable. Returns less than zero if the variable cannot be written.

sVarName(in) is the variable name in the format “<controller name>:<object name>.<object name> <signal name>”.

If composite process objects are used, there may be several <object name> items in sSignalName. See also the code sample referred to in Sample Code on page 97.

If you write data to a signal connected to an external IO then that data will be written to the controller.

If composite process objects are used, there may be several <object name> items in sSignalName. See also the code sample referred to in Sample Code on page 97.

3BSE035041R5001 95

Page 96: 3BSE035041R5001_PLC_Config

Configure Calculation Parameters Section 5 Openness

iProperty(in) is the property number in the signal PCA. “1” is the value property of the signal. vntValue(in) is the value of the property. OPCQuality(in): indicates the OPC quality of the variable. dtTimestamp is the date and time.

Configure Calculation Parameters

Calculation Types

Calculation types are user defined private data. It is possible to select a type when you configure calculation parameters for a signal. If desired, you can use the selected calculation types to determine the type of function (in your own application) to be performed for a given signal. By selecting a certain type of calculation, the same type of calculation (for example linearization) can be performed on a collection of signals without having to keep a record of exactly which signal to calculate.

Calculation Parameters for Pre Treatment

Calculation parameters are user defined private data. These parameters can have arbitrary contents, and can be used to parameterize a certain calculation (in your own application).

Table 6. Calculation Parameters

Parameter Type Comment

Pre calculation parameter string Sent to the variable pre treatment interface. Used in the method ValueChanged (the parameter sPreParam).

Limit pre calculation parameter string Sent to the variable pre treatment interface. Used in the method ValueLimit (the parameter sPreLimParam).

96 3BSE035041R5001

Page 97: 3BSE035041R5001_PLC_Config

Section 5 Openness Sample Code

To configure calculation parameters:

1. In Plant Explorer, select the Control structure.

2. Select the relevant signal.

3. Select the Signal Configuration aspect.

4. Select the Common tab, and then configure calculation parameters. Click Show Help for more information.

Sample Code

The Visual Basic ActiveX DLL project, PreTreat3.vbp, contains a code sample. The project can be found in the folder …\ABB Industrial IT\Operate IT\PLC Connect\Samples\PreTreat3.

Event Server Pre Treatment

Introduction

The Event DLL interface makes it possible to modify events before they enter the Event Server.

All events – that is status transition and operator actions – can be modified in a project-specific way with this interface. Most attributes of a signal can be modified in the DLL, which is called before the event is finally dealt with in the Event Server. Each type of event has its method in the DLL interface.

DLL Interface

The interfaces listed in Table 7 have to be implemented by the DLL. This is a standard DLL with standard handling and it is included in the system. The DLL,

You cannot perform calculations on signals that are SoftPoints.

All transition times in the event handling DLL are in local time.

3BSE035041R5001 97

Page 98: 3BSE035041R5001_PLC_Config

DLL Interface Section 5 Openness

PreEvent.dll, is located in the folder …\ABB Industrial IT\Operate IT\PLC Connect\Bin. The DLL can be substituted with a project-specific DLL.

Change of State

Change of state means that a binary signal, defined as event or alarm, changes its value from 0 to 1 or from 1 to 0.

The Event Server calls the method ChangeOfState. The parameters in Table 8 are included in the method call.

Table 7. Interfaces

Class Method

EventExternal Initialize()

EventExternal ChangeOfState(…)

EventExternal AcknowledgeEvent(…)

EventExternal AlterEventMonitoring(…)

EventExternal OpForce(…)

EventExternal AlterControlMonitoring(…)

EventExternal OpControl(…)

The PreEvent.dll is loaded by the Event Server at program start and activated if found.

Table 8. ChangeOfState Parameters

Parameter Meaning Limitation

sVarName Name of signal Read only

dtTransitionTime Time for event (in local time) Read only

lCurrentState Current state Read only

lNewState New state

98 3BSE035041R5001

Page 99: 3BSE035041R5001_PLC_Config

Section 5 Openness DLL Interface

Acknowledgement of Event

The Event Server calls the method AcknowledgeEvent. The parameters in Table 9 are included in the method call.

lSeverity Priority

lClass Alarm class

lEventType Event type

sEventText Event text

lEventTextGroup Number of event text group

bLog Logging of event, yes or no TRUE or FALSE

bPrint For future use

vntPrinters For future use

vntOleServers Name of the OLE servers

vntSummaryAlarms Name of the summary alarms

lDelay Time delay in seconds

lNoOfTransitions Number of transitions after acknowledgement

Greater than or equal to 0

sNotifyAddress When detected notify address Set at acknowledgement

sRecommendedView For future use

Table 8. ChangeOfState Parameters (Continued)

Parameter Meaning Limitation

3BSE035041R5001 99

Page 100: 3BSE035041R5001_PLC_Config

DLL Interface Section 5 Openness

Blocking/Deblocking of Event

The Event Server calls the method AlterEventMonitoring. The parameters in Table 10 are included in the method call.

Table 9. AcknowledgeEvent Parameters

Parameter Meaning Limitation

sVarName Name of signal Read only

dtTransitionTime Time for event (in local time)

Read only

lSeverity Priority Read only

lClass Alarm class Read only

lEventType Event type 1, 2 or 3; Read only

bLog Logging, yes or no TRUE or FALSE

bPrint For future use

vntOpPrinters For future use

vntOleServers Name of the OLE servers

sAckAddress When acknowledged notify address

Table 10. AlterEventMonitoring Parameters

Parameter Meaning Limitation

sVarName Name of signal Read only

dtTransitionTime Time for event (in local time) Read only

bEnable TRUE if blockedFALSE if deblocked

lSeverity Priority Read only

100 3BSE035041R5001

Page 101: 3BSE035041R5001_PLC_Config

Section 5 Openness DLL Interface

Forcing of Signal Values

The Event Server calls the method OpForce. The parameters in Table 11 are included in the method call.

lClass Alarm class Read only

lEventType Event type 1, 2 or 3. Read only

bLog Logging, yes or no TRUE or FALSE

bPrint For future use

vntOpPrinters For future use

vntOleServers Name of the OLE servers

Table 11. OpForce Parameters

Parameter Meaning Limitation

sVarName Name of signal Read only

dtTransitionTime Time for event (in local time) Read only

bEnable TRUE if forcedFALSE if force free

Read only

bLog Logging, yes or no TRUE or FALSE

bPrint For future use

vntOpPrinters For future use

vntOleServers Name of the OLE servers

Table 10. AlterEventMonitoring Parameters (Continued)

Parameter Meaning Limitation

3BSE035041R5001 101

Page 102: 3BSE035041R5001_PLC_Config

DLL Interface Section 5 Openness

Blocking/Deblocking of a Signal's Control Possibilities

The Event Server calls the method AlterControlMonitoring. The parameters in Table 12 are included in the method call.

Control of Signal Value

The Event Server calls the method OpControl. The parameters in Table 13 are included in the method call.

Table 12. AlterControlMonitoring Parameters

Parameter Meaning Limitation

sVarName Name of signal Read only

dtTransitionTime Time for event (in local time) Read only

bEnable TRUE if blockedFALSE if deblocked

Read only

bLog Logging, yes or no TRUE or FALSE

bPrint For future use

vntOpPrinters For future use

vntOleServers Name of the OLE servers

Table 13. OpControl Parameters

Parameter Meaning Limitation

sVarName Name of signal Read only

dtTransitionTime Time for event (in local time) Read only

bLog Logging, yes or no TRUE or FALSE

bPrint For future use

vntOpPrinters For future use

vntOleServers Name of the OLE servers

102 3BSE035041R5001

Page 103: 3BSE035041R5001_PLC_Config

Section 5 Openness Event Types

Notes on the Use of the DLL and the Methods

It is presumed that the calls are made with ”In process” (that is to DLL) COM for best performance.

• Visual Basic 6.0 is used for implementation of the DLL. The project must be of type ”ActiveX DLL”. In the PLC Connect distribution a code example is enclosed, with all settings done, and a ready-to-run DLL for the Event Server to make calls to. The so-called binary compatibility should be used to prevent Class ID from changing, which would cause relinking of the Event Server.

• The implementation of the methods must be fast (<1 ms), that is it is out of question to make database accesses, file operations, or other time-consuming operations.

• It is prohibited to do database openings, except for in the Initialize-method. It is, however, possible to collect variables and so on from the RTDB.

• The DLL is supposed to catch and take care of all errors. It must not propagate errors to the Event Server.

Event Types

The event types are listed in Table 14.

The DLL must not have any kind of user interface that require manual input, for example, clicking an OK button. This would halt program execution.

Table 14. Event Types

Event type 1 AlarmAn event that can be acknowledged both when active and not active.

Event type 2 EventCannot be acknowledged.

Event type 3 Event with acknowledgementMay be acknowledged when active and will then assume the state not active, and acknowledged.

3BSE035041R5001 103

Page 104: 3BSE035041R5001_PLC_Config

Event States Section 5 Openness

Event States

Table 15 lists possible event states.

InitializeSyntax: Initialize()

Enables the DLL to make arbitrary preparations at start-up. Is called when the Event Server is started.

ChangeOfStateSyntax: ChangeOfState(sVarName As String, dtTransitionTime As Date, lCurrentState As Long, lNewState As Long,lSeverity As Long, lClass As Long,lEventType As Long, sEventText As String,lEventTextGroup As Long, bLog As Boolean,bPrint As Boolean, vntPrinters As Variant,vntOleServers As Variant, vntSummaryAlarms As Variant,lDelay As Long, lNoOfTransitions As Long,sNotifyAddress As String, sRecommendedView As String)

Called when the value of the event variable sVarName is changed. The time for the event is dtTransitionTime and the state of the variable is changed from lCurrentState to lNewState.

Table 15. Event States

Event State Description

1 Disabled

2 Inactive and acknowledged

3 Inactive and not acknowledged

4 Active and acknowledged

5 Active and not acknowledged

6 Auto disabled by the system

104 3BSE035041R5001

Page 105: 3BSE035041R5001_PLC_Config

Section 5 Openness AcknowledgeEvent

AcknowledgeEventSyntax: AcknowledgeEvent(sVarName As String, dtTransitionTime As Date, lSeverity As Long, lClass As Long, lEventType As Long, bLog As Boolean, bPrint As Boolean, vntOpPrinters As Variant, vntOleServers As Variant, sAckAddress As String)

Called when the event variable sVarName is acknowledged. The time for the acknowledgement is dtTransitionTime.

AlterEventMonitoringSyntax: AlterEventMonitoring(sVarName As String,dtTransitionTime As Date, bEnable As Boolean,lSeverity As Long, lClass As Long, lEventType As Long, bLog As Boolean, bPrint As Boolean, vntOpPrinters As Variant,vntOleServers As Variant)

Called when the event variable sVarName is event blocked or event deblocked. The time for the action is dtTransitionTime.

OpForceSyntax: OpForce(sVarName As String, dtTransitionTime As Date,bEnable As Boolean, bLog As Boolean,bPrint As Boolean, vntOpPrinters As Variant,vntOleServers As Variant)

Called when the value of the variable sVarName is forced or force free. The time for the action is dtTransitionTime.

AlterControlMonitoringSyntax: AlterControlMonitoring(sVarName As String,dtTransitionTime As Date, bEnable As Boolean,bLog As Boolean, bPrint As Boolean,vntOpPrinters As Variant, vntOleServers As Variant)

Called when the variable sVarName is control blocked or control deblocked. The time for the action is dtTransitionTime.

3BSE035041R5001 105

Page 106: 3BSE035041R5001_PLC_Config

OpControl Section 5 Openness

OpControlSyntax: OpControl(sVarName As String, dtTransitionTime As Date, bLog As Boolean, bPrint As Boolean,vntOpPrinters As Variant, vntOleServers As Variant)

Called when the operator or an external program changes the value of the variable sVarName, for example a calculation program. The time for the action is dtTransitionTime.

Limitations for sVarName

The variable name consists of object name and signal name separated by a “.” sign.

Limitations for lNewState

Permitted changes of state for event type 1 are listed in Table 16.

Table 16. State Changes for Event Type 1

inactive + not acknowledged -> active + not acknowledged

inactive + not acknowledged -> active + acknowledged

inactive + acknowledged -> active + not acknowledged

inactive + acknowledged -> active + acknowledged

inactive + acknowledged -> inactive + acknowledged

active + acknowledged -> inactive + acknowledged

active + not acknowledged -> inactive + not acknowledged

active + not acknowledged -> inactive + acknowledged

106 3BSE035041R5001

Page 107: 3BSE035041R5001_PLC_Config

Section 5 Openness Limitations for lSeverity

Permitted changes of state for event type 2 are listed in Table 17.

Permitted changes of state for event type 3 are listed in Table 18.

Limitations for lSeverity

A number between 1and 1000; only possible to change when the alarm occurs for the first time, that is the lCurrentState is inactive and acknowledged.

Limitations for lClass

A number between 0 and 9999; only possible to change when the alarm occurs for the first time, that is the lCurrentState is inactive and acknowledged.

Limitations for lEventType

1, 2 or 3; 0 if not alarm; only possible to change when the alarm occurs for the first time, that is the lCurrentState is inactive and acknowledged.

Limitations for lDelay

Greater than or equal to 0; for inactive alarms it means the remaining time of the delay.

Table 17. State Changes for Event Type 2

inactive + acknowledged -> active + acknowledged

inactive + acknowledged -> inactive + acknowledged

active + acknowledged -> inactive + acknowledged

Table 18. State Changes for Event Type 3

inactive + acknowledged -> active + Not acknowledged

inactive + acknowledged -> active + acknowledged

inactive + not acknowledged -> inactive + Acknowledged

active + not acknowledged -> inactive + acknowledged

3BSE035041R5001 107

Page 108: 3BSE035041R5001_PLC_Config

Sample Event DLL Interface Section 5 Openness

Sample Event DLL Interface

A Visual Basic ActiveX DLL project, PreEvent.vbp, can be found in the folder …\ABB Industrial IT\Operate IT\PLC Connect\Samples\PreEvent.

Event Extended Options

Introduction

In PLC Connect an application, called Special Application, can be set up to execute in the case of an event. The Special Application is called when the signal the event belongs to, changes state. Several events can refer to the same Special Application. The application that makes the call to the Special Application is EventExtendedOptions. The EventExtendedOptions communicates with a Special Application through an OLE interface. A Special Application can be written in different languages. In this document only examples in Visual Basic will be described.

To be able to use the application, you also have to:

• Add the Event Extended Options server process to the PLC Server. For more information on how to do this, refer to the information on PLC Server in the PLC Connect online help.

• Configure the application for each relevant control network. This is done under the Event Extended Options tab of Alarm Event Settings aspects. For more information, refer to the PLC Connect online help.

OLE Interface

Every Special Application must have the Configure and ChangeState functions, and the Special Application can, when needed to, call the WriteState function.

Configure

The function Configure makes it possible to save a certain setting for a Special Application. It is called when you configure your Special Application in an Alarm Event Settings aspect. The Special Application must display a dialog box for any

108 3BSE035041R5001

Page 109: 3BSE035041R5001_PLC_Config

Section 5 Openness OLE Interface

special data input needed. PLC Connect will take care of storing this data in the configuration.

The parameters are described in Table 19.

The return value is of Boolean type. The function returns TRUE if data should be saved.

ChangeState

The function ChangeState is called by the EventExtendedOptions when a signal with a Special Application event changes state. Note that the Special Application is required to return immediately after this function is called. The Special Application may not process the information before returning. It must store the information in some way and process later from a timer call or in a separate thread.

The parameters are described in Table 20.

Table 19. Configure Parameters

Parameter Description

String pstrPrivateData String describing the Special Application, max. 1000 byte. Upon entry to the function this text string is the last text string this Special Application set up for this event. Upon leaving the function, this text string must contain the new text information from the application for this event.

Long hParentWnd Handle to the main window. The special application can use this handle as the parent of the dialog box it creates, if possible.

Table 20. ChangeState Parameters

Parameter Description

String strPrivateData String describing the setting of the Special Application called (compare with the Configure function).

3BSE035041R5001 109

Page 110: 3BSE035041R5001_PLC_Config

OLE Interface Section 5 Openness

The return value of the function is of Boolean type. It is important that a Special Application returns the value TRUE as soon as the application has handled a ChangeState call. If the value FALSE is returned, a new call to ChangeState with the same value of the parameters will take place.

WriteState

EventExtendedOptions has a function called WriteState, which a Special Application can call. This function is called if the state of a signal should be

String strTagName The name of the signal the event relates to.

String strParentObject The name of the parent object the signal above belongs to.

Integer iItemNum The item number of the signal the event relates to in the parent object.

Integer iPriority The event priority. Is only applicable for alarms.

Integer iClass The event class. Is only applicable for alarms.

String strGroupText The event group text.

Integer iEventType The event type which specifies how an alarm shall be treated:

1 = Normal alarm ON, OFF, shall be acknowledged.

2 = Treated as an event ON,OFF, no acknowledge.

3 = Disappears with acknowledge ON, shall be acknowledged.

String strEventText The event text, which describes the event.

Boolean iChangeState True if the event is turning on, else FALSE.

Variant vValue For future use.

Date dTransitionTime Time and date of the event in local time.

Table 20. ChangeState Parameters (Continued)

110 3BSE035041R5001

Page 111: 3BSE035041R5001_PLC_Config

Section 5 Openness OLE Interface

changed, for example you can activate/deactivate an alarm. Notice that it is only the state of binary signals you can change. An instance of “AdsAeEventExtendedOptions.UPDATEEVENT” should be created by Special Application, to be able to access the function.

The parameters are described in Table 21.

The return value of the function is of Boolean type. WriteState returns TRUE if the call was successful, otherwise it returns FALSE. Note that the function should be used with caution. It is not recommended, for example, to generate showers of alarms with this function, because of high CPU load.

Windows Registry Database

A Special Application must be registered in the Windows registry database in order to inform PLC Connect that the application exists. Most programs register by themselves the first time they are started. Besides the normal registration one more key must be created.

Table 21. WriteState Parameters

Parameter Description

String strAppName Special application name

String strTagName The name of the signal the event relates to in the format “ObjectName SignalName”.

Integer iChangeState The state of the signal. 3 = signal ON, 4 = signal OFF.

String strEventText The event text.

String strUser For future use.

String strPassword For future use.

String strOptions For future use.

Variant vValue For future use.

Date dTransitionTime Time and date of the event (in local time).

3BSE035041R5001 111

Page 112: 3BSE035041R5001_PLC_Config

Example Section 5 Openness

1. Build the Test.exe file from the sample code.

2. Start the Windows Registry Editor.

3. Select Start > Run.

4. In the displayed Open box, enter "regedit" to open the registry editor.

5. Locate the following entry:

HKEY_CLASSES_ROOT\Test.EventOleServer\

This entry was created when you built the Test.exe file.

6. Locate the “Clsid” key below the entry.

7. Create a new key at the same level as the “Clsid” key, and name it:

EventServerCompatible

Example

A Visual Basic 6.0 example of the special application, Test.vbp, can be found in the folder\…\ABB Industrial IT\Operate IT\PLC Connect\Samples\EventExtendedOptions.

PLC Connect Properties

Introduction

Most properties of the different configuration aspects can be accessed from outside PLC Connect, for example via OPC or an external program such as Bulk Data Manager. Some properties can only be viewed, others can be updated with new values.

Accessible Properties

Accessible properties of the configuration aspects are described below:

• Location: indicates where in the aspect the property is set or its value viewed when you work in Plant Explorer.

• Writable: if the property is writable or not, that is, if its value can be changed.

112 3BSE035041R5001

Page 113: 3BSE035041R5001_PLC_Config

Section 5 Openness Accessible Properties

Alarm Event Settings Aspect

PLC Controller Configuration Aspect

Process Object Configuration Aspect

Table 22.

Property Name LocationData Type

Writable Comment

Server Data Event tab

LimitAutoDisable Limit auto disable box Integer Yes

Table 23.

Property Name LocationData Type

Writable Comment

CommInfo Communication information box

String Yes

DriverInfo (not shown) String No

FileName (not shown) String Yes

Table 24.

Property Name LocationData Type

Writable Comment

ObjectInfo Object information box String Yes

3BSE035041R5001 113

Page 114: 3BSE035041R5001_PLC_Config

Accessible Properties Section 5 Openness

Signal Configuration Aspect

Table 25.

Property Name LocationData Type

Writable Comment

IsInstance (not shown) Boolean No Whether it is a signal or signal type

ID tab

ItemType Variable type box Integer No Binary = 0Integer = 1Real = 2String = 3

ItemUsage Not Connected/Connected option buttons

Integer Yes Internal = 0External = 1

Address Address box String Yes

Common tab

UseDefSignalValues Use default signal values check box

Boolean Yes

Inverted Inverted check box Boolean Yes

UpdateInterval Update interval box Integer Yes

Calculations dialog box

CalcEnabled Accessible for data access check box

Boolean Yes

CalcTypeNo Calculation type drop-down list

Integer Yes

CalcEdge Edge selection box Integer Yes Leading = 0Trailing = 1Both = 2

CalcHysteresis Hysteresis box Real Yes

114 3BSE035041R5001

Page 115: 3BSE035041R5001_PLC_Config

Section 5 Openness Accessible Properties

CalcParameter Left-hand Parameter box String Yes

CalcEnablePreCalc Enable pre treatment check box

Boolean Yes

CalcPreParameter Parameter box below Enable pre treatment check box

String Yes

CalcEnableLimCalc Enable limit pre treatment check box

Boolean Yes

CalcLimParameter Parameter box below Enable limit pre treatment check box

String Yes

Controllable tab

UseDefControllableValues Use default controllable values check box

Boolean Yes

Controllable Is controllable check box Boolean Yes

LogOpActions Log operator actions check box

Boolean Yes

Common - Advanced dialog box

CtrlLimEnable Control Limits check box Boolean Yes

CtrlLimHigh High box Real Yes

CtrlLimLow Low box Real Yes

CtrlResponseEnabled Response check box Boolean Yes

CtrlResponseVar Variable box String Yes

CtrlResponseDelay Delay time box Integer Yes

Range tab

Table 25.

Property Name LocationData Type

Writable Comment

3BSE035041R5001 115

Page 116: 3BSE035041R5001_PLC_Config

Accessible Properties Section 5 Openness

Alarm Event Configuration Aspect

The property names have an X at the end. For integer and real signals, X is a number between 1–8. For binary signal, X equals 1.

UseDefRange Use default integer values check box

or

Use default real values check box

Boolean Yes

LowLimit Low limit box Real Yes

HighLimit High limit box Real Yes

LowLimitPLC Low limit in PLC box Real Yes

HighLimitPLC High limit in PLC box Real Yes

Unit Engineering unit box String Yes

Precision Single/Double Precision option buttons

Integer Yes

Table 26.

Property Name LocationData Type

Writable Comment

Limiter tab

UseDefLimValuesX Use default limiter values check box

Boolean Yes

LimNameX Name box String Yes

LimTypeX Type drop-down list Integer Yes Max = 1Min = 0

Table 25.

Property Name LocationData Type

Writable Comment

116 3BSE035041R5001

Page 117: 3BSE035041R5001_PLC_Config

Section 5 Openness Accessible Properties

LimitX Limit box Real Yes

LimHysteresisX Hysteresis box Real Yes

Event tab

UseDefEventValuesX Use default event values check box

Boolean Yes

IsEventX Is an event check box Boolean Yes

TimeStampFromPLCX Time stamped from controller check box

Boolean Yes

LogStatusChgOffX Log status changes 'Off' check box

Boolean Yes

LogStatusChgOnX Log status changes 'On' check box

Boolean Yes

AlarmTextGroupNameX Alarm text group drop-down list

String Yes

Event2 tab

MMSNotifyVariableX Box under the When detected notify variable check box

String Yes

EventTextRow1X First row of event text box String Yes

EventTextBulkX Extended event text box String Yes

Alarm tab

UseDefAlarmValuesX Use default alarm values check box

Boolean Yes

IsAlarmX Is an alarm check box Boolean Yes

AckTypeX Acknowledgement selection box

Integer Yes Normal = 0None = 1Disappears = 2

Table 26.

Property Name LocationData Type

Writable Comment

3BSE035041R5001 117

Page 118: 3BSE035041R5001_PLC_Config

Accessible Properties Section 5 Openness

PLC Dial Configuration Aspect

PriorityX(1) Priority box Integer Yes

TimeDelayX Time delay box Integer Yes

Alarm2 tab

MMSAckVariableX Box under the When acknowledged notify check box

String Yes

ClassX Class box Integer Yes

(1) If you update many properties of this type at the same time, and alarm priority changes are set to be automatically deployed, then the updating can take a long time.

Table 27.

Property Name LocationData Type

Writable Comment

IndexCorrection Index Correction box Integer Yes

IndexRegister Index Register box String Yes

NoOfRegisters Number Of Registers box Integer Yes

PhoneNumber Phone Number box String Yes

PLCNo Controller Identity box String Yes

Protocol Protocol drop-down list String Yes

SchedTries # tries box Integer Yes

Table 26.

Property Name LocationData Type

Writable Comment

118 3BSE035041R5001

Page 119: 3BSE035041R5001_PLC_Config

Section 5 Openness Example - Change Signal Properties with Bulk Data Manager

Dial Log Configuration Aspect

Example - Change Signal Properties with Bulk Data Manager

1. Start Plant Explorer.

2. Start Excel.

Set up Options

3. In Excel, click the Activate BDM button in the Bulk Data Manager toolbar.

4. Select Bulk Data Manager > Options.

5. Under the General tab, select to Identify Objects by ARD with path.

6. Under the Transaction tab, select By Object as Transaction mode.

Set up Properties

7. In Plant Explorer, select the Control Structure.

8. Select the desired Generic Control Network object.

9. Select the Control Structure aspect, and then drag it from Plant Explorer to cell A1 in Excel.

Table 28.

Property Name LocationData Type

Writable Comment

UseDefaultPLCValues Use Default PLC Values check box

Boolean Yes

IndexCorrection Index Correction box Integer Yes

IndexRegister Index Register box String Yes

NoOfRegisters # Registers box Integer Yes

StartRegister Start Register box String Yes

HistoryLog History Log drop-down list String Yes

3BSE035041R5001 119

Page 120: 3BSE035041R5001_PLC_Config

Example - Change Signal Properties with Bulk Data Manager Section 5 Openness

10. Return to Plant Explorer and select a Signal Configuration aspect. It does not matter which one.

11. Drag the aspect from Plant Explorer to the first free cell on row 1 in Excel. In this example, it is E1.

12. In the displayed dialog box, select the properties you want to configure. For example, you can select Address, Controllable, ItemUsage and UseDefControllableValues.

13. Click OK.

14. In Excel, move the column UseDefControllableValues to a column in front of the Controllable column, see Figure 88. This is necessary since you have to set the property UseDefControllableValues to False, before you can change the value of the Controllable property.

Export Objects

15. In Plant Explorer, select the Control Structure.

16. Select the same Generic Control Network object as in Step 8.

17. Drag the Generic Control Network object from Plant Explorer to cell A2 in Excel. The object and all objects under it will be exported.

Figure 87. Configuration Properties

Figure 88. Column Order

120 3BSE035041R5001

Page 121: 3BSE035041R5001_PLC_Config

Section 5 Openness Dial Manager Server Access (Option)

Filter Objects

18. In Excel, select all cells.

19. Select Data > Filter > AutoFilter. This makes it possible to filter the objects in Excel. For example, you can filter the objects on [Control Structure.Parent Object]. Then when you select one process object, you will only see its signals.

Change Property Values

20. You can now change the property values, for example:

– Change some Modbus addresses to Comli addresses

– Set some signals to be controllable

– Set ItemUsage to internal for signals with Modbus addresses. (A property value of ‘0’ means Internal, and a value of ‘1’ means External).

21. When ready, click the Save All Objects button in the Bulk Data Manager toolbar. The rows that the filter shows will be updated in the system.

Dial Manager Server Access (Option)

Introduction

The Dial Manager Server is handling dialed communication, including initiating and terminating calls requested from the Dial Panel or Dial Supervisor.

Figure 89. Property Values

How to configure dialed communication is described in the Section 6, Configure Dialed Communication (Option).

3BSE035041R5001 121

Page 122: 3BSE035041R5001_PLC_Config

Prioritized Calls Section 5 Openness

Via the Dial Manager interface it is possible for a user written standalone application to initiate and disconnect new calls. The application can be with or without a user interface, and written in, for example, Visual Basic or C++. It can be run on both server and client nodes.

Prioritized Calls

Prioritized calls makes it possible to interrupt other calls in progress, for example when there are no free connections (lines). When interrupted, a call will not be automatically re-established. Calls in progress will be disconnected as follows:

1. Time Limit

2. Manual Close

3. Permanent

4. History: Single Controller

5. Cyclic

6. Prioritized

Accessible Methods

The Dial Manager interface belongs to the library ADSDIALMANAGERHDLRLib, and the accessible methods to the class AdsDialMgrHandler.

Prioritized calls are only accessible via the Dial Manager interface, and not at all via the PLC Connect standard aspects Dial Panel and Dial Supervisor. Hence, in order to make these call types available you must do this via a user written application. When writing such an application you should take great care, and be aware of the fact that calls in progress are disconnected unconditionally. Logical errors in such an application can for example break an ongoing collection of historic data from PLCs, or cause other unwanted behavior.

122 3BSE035041R5001

Page 123: 3BSE035041R5001_PLC_Config

Section 5 Openness Accessible Methods

ConnectPLC

Use this method to initiate a call to a controller.

Syntax: ConnectPlc(sPLCName As String, TypeOfCall As DMTypeOfCall, lRunTimeMinutes As Long, bKeepTextFiles As Boolean)

sPLCName (in): controller name.TypeOfCall (in): type of call, see also Table 29.lRunTimeMinutes (in): the time limit in minutes for time limited calls. For other call types this parameter should be zero (0).bKeepTextFiles (in): whether or not to keep text files after an import (for debugging purposes only). This parameter is only relevant for calls of type “History: Single Controller”. For other call types this parameter should be False.

DisconnectPLC

Use this method to disconnect a call.

Syntax: DisconnectPLC(lCTNReq As Long) As Boolean

Returns FALSE if the call could not be disconnected.

lCTNReq (in): CTN number (connection or line identifier) for the call.

Table 29. Accessible Call Types

Type of call Enumeration

Manual Close ManualNormalDMTypeOfCall

Time Limit ManualTMODMTypeOfCall

Permanent ManualPermanentDMTypeOfCall

History: Single Controller ManualHistoryDMTypeOfCall

Prioritized PrioritizedDMTypeOfCall

3BSE035041R5001 123

Page 124: 3BSE035041R5001_PLC_Config

Notes on PLC Connect Real Time Data Access Section 5 Openness

GetLineStatus

Use this method to get information on the status of relevant connections (lines).

Syntax: GetLineStatus(lNoOfLines As Long, lNoOfCyclInQueue As Long, sLineName() As String, lTimeConnected() As Long, TypeOfCall() As DMTypeOfCall, sPLCName() As String, sOperator() As String, CallStatus() As DMCallInProgres, CTN() As Long, bAbortPoss() As Boolean, bEnablePoss() As Boolean, bDisablePoss() As Boolean, bAnyCyclicCalls As Boolean)

lNoLines (out): number of lines.lNoOfCyclInQueue (out): number of queued cyclic calls.sLineName (out)(array): line names.lTimeConnected (out)(array): how long time each call have been established.TypeOfCall (out)(array): call type for each line.sPLCName (out)(array): controller name for each line.sOperator (out)(array): For future use.CallStatus (out)(array): status for each call.CTN (out)(array): CTN numbers, that is, call identifiers.bAbortPoss (out)(array): whether or not calls can be aborted.bEnablePoss (out)(array): whether or not calls can be enabled.bDisablePoss (out)(array): whether or not calls can be disabled.bAnyCyclicCalls) (out): whether or not there are cyclic calls in progress.

Notes on PLC Connect Real Time Data Access

The interface to the Dial Manager server can be used together with the interface described in PLC Connect Real Time Data Access on page 72, for example to write data to the RTDB.

Typically, it can work as follows:

1. Use subscription to wait for real time events. Subscription is available in the Real Time Data Access interface.

2. When the expected event occurs, check the status of relevant connections (lines) with the GetLineStatus method.

124 3BSE035041R5001

Page 125: 3BSE035041R5001_PLC_Config

Section 5 Openness Sample

3. If the connection already is established, then you can perform the desired operations, for example write, straight away using the Real Time Data Access interface.

If the connection isn’t established, first use the ConnectPLC method to initiate a call, then perform the desired operations.

4. Disconnect from the controller with the DisconnectPLC method.

Sample

This is a Visual Basic 6.0 sample, DialManagerOpenness.vbp, which can be found in the directory \…\ABB Industrial IT\Operate IT\PLC Connect\Samples\DialManagerOpenness. Figure 90 shows the sample user interface.

Figure 90. Dialog Box Used in Sample

3BSE035041R5001 125

Page 126: 3BSE035041R5001_PLC_Config

Sample Section 5 Openness

126 3BSE035041R5001

Page 127: 3BSE035041R5001_PLC_Config

Section 6 Configure Dialed Communication(Option)

IntroductionThis sub-section describes how to configure dialed communication:

• Basic Preparations on page 128 describes what you need to do before you can start the configuration.

• Basic Configuration Example on page 129 describes an example configuration, not including dialed history.

• Dialed History on page 141 gives an overview of how dialed history works in relation to dialed controllers.

• Dialed History Configuration Example on page 143 describes an example configuration of dialed history.

What is Dialed Communication?

Remote controllers can be dialed up and communicated with via Comli or Modbus (Serial), that is, alarm, event and historic information can be collected to a server. Provided are:

• Manually order calls, with and without a time limit.

• Permanent calls.

• Scheduled (cyclic) calls for collection of historic data.

Incoming connections are also supported, where controllers can call up the server in the case of an alarm and so on.

3BSE035041R5001 127

Page 128: 3BSE035041R5001_PLC_Config

Basic Preparations Section 6 Configure Dialed Communication (Option)

Basic PreparationsBefore you can configure or use dialed communication, you have to start the Dial Manager server, set up the modems to use, and create the relevant objects and signals.

Add Dial Manager Server Process

1. Add the Dial Manager server process to the PLC Server. For more information on how to do this, refer to the information on PLC Server in the PLC Connect online help.

Setup Modems

2. To be able to dial up remote controllers, each communication port you want to use has to be connected to a modem.

Create Dialed Controllers

3. In Plant Explorer, select the desired Generic Control Network object.

4. Create the relevant dialed controllers for the control network. Refer to the PLC Connect online help for more information on how to create a dialed controller.

5. Repeat Step 3 to Step 4 for each additional control network for which you want to configure dialed communication.

Set up Communication Monitoring

6. Import the process object type CommunicationType. It can be found in the file \...\ABB Industrial IT\Operate IT\PLC Connect\Data\ObjectTypes\CommunicationType.afw. For more information on export and import, refer to the Industrial IT 800xA - System Administration and Security (3BSE037410Rxxxx).

7. The signal Bad is part of the process object type CommunicationType. Set the signal to be only an event, not an alarm. Otherwise, it may generate alarms

For more information on how to install a modem and set up dialing rules, refer to the modem and Windows documentation.

128 3BSE035041R5001

Page 129: 3BSE035041R5001_PLC_Config

Section 6 Configure Dialed Communication (Option) Basic Configuration Example

when a call to a controller is initiated. Refer to the PLC Connect online help for more information on how to set a signal to be an event and/or alarm.

8. For one of the dialed controllers, create a process object based on the process object type CommunicationType. Refer to the PLC Connect online help for more information on how to create process objects. Make sure to:

– place the process object under the dialed controller you want to monitor.

– define the object as communication, that is, select Communication when entering object information for the object.

– set the update time to about 10 000 ms when entering object information for the object.

9. Repeat Step 8 for each additional dialed controller.

Create Process Objects and Signals

10. For each dialed controller, create the relevant process objects and signals. Refer to the PLC Connect online help for more information on how to create process objects and signals.

11. Deploy the configuration for each affected control network. To make a deploy, select the Deploy aspect of a Generic Control Network object, and then click Deploy.

12. You are now finished with the basic preparations.

Basic Configuration ExampleThis example describes how to make a basic configuration of dialed communication for a specific control network. This configuration does not include dialed history. However, it’s assumed that you already have made the necessary preparations, see Basic Preparations on page 128.

Process objects of this type are used to monitor the communication status for a dialed controller. Generally, it is hard to get informed when a cyclic call fails. However, the signal Error in process objects of type CommunicationType will generate an alarm when a cyclic call fails.

3BSE035041R5001 129

Page 130: 3BSE035041R5001_PLC_Config

Set up Protocols Section 6 Configure Dialed Communication (Option)

Set up Protocols

The first part is to set up the protocols to use.

Startup

The Dial Editor aspect is used to configure dialed communication for a specific control network.

1. In Plant Explorer, select the Control Structure.

2. Select the desired Generic Control Network object.

3. Add a Dial Editor aspect.

4. Select the added aspect.

5. Select the Protocol Setup tab.

Add Protocols

Under the Protocol Setup tab, see Figure 91 for an example, there is a table with information on the defined protocols.

6. Under the tab, click Add. The New Protocol dialog box is displayed.

7. Enter a protocol name.

Figure 91. Protocol Setup Tab

130 3BSE035041R5001

Page 131: 3BSE035041R5001_PLC_Config

Section 6 Configure Dialed Communication (Option) Set up Connections

8. Click OK. The dialog box is closed, and the protocol added to the table.

Configure the Protocol

9. Select the added protocol.

10. From the Protocol type drop-down list, select the type of protocol.

11. In the Auto disconnect box, enter the time in minutes after which a manually initiated call using this protocol is to be terminated by default.

12. Click Apply.

Configure the COM-port

13. Configure the following for each COM-port that uses the protocol:

– Communication speed (Baud-rate).

– Number of data bits. For Comli and Modbus protocols, this number is fixed to 8.

– Number of stop bits. For Comli and Modbus protocols, this number is fixed to 1.

– Parity setting.

– Flow control setting. For Comli and Modbus protocols, the flow control is fixed at “None”.

14. If desired, repeat Step 6 to Step 13 for each other protocol you want to add.

15. Select the Line Setup tab.

Set up Connections

The next part is to set up the connections (lines) to use.

Under the Line Setup tab, see Figure 92 for an example, there is a table with information on the defined connections.

Use the Control Panel in Windows to enter these settings. Refer to the Windows documentation for more information.

3BSE035041R5001 131

Page 132: 3BSE035041R5001_PLC_Config

Set up Connections Section 6 Configure Dialed Communication (Option)

The Attached to column shows the type/name of the modem connected to the selected communication port, that is, the modem name as defined in the Windows Control Panel.

Add a Connection

1. Under the tab, click Add.

2. Enter a name in displayed dialog box.

3. Click OK. The dialog box is closed, and the connection added to the table.

Configure the Connection

4. Select the added connection in the table.

5. Select a COM port from the Port drop-down list.

6. Select a defined protocol from the Protocol drop-down list.

7. In the Line type area, select either:

– In to dedicate the connection to incoming calls.

– Out to dedicate the connection to outgoing calls.

8. Click Apply.

Figure 92. Line Setup Tab

132 3BSE035041R5001

Page 133: 3BSE035041R5001_PLC_Config

Section 6 Configure Dialed Communication (Option) Set up Cyclic Calls

Check the Modem

The Check Modem button is used to check if a modem is connected and switched on.

9. Select the configured connection in the table.

10. Click Check Modem. A dialog box will show the result, see Table 30 for examples.

11. If desired, repeat Step 1 to Step 10 for each other connection you want to add.

12. Select the Cyclic Call Setup tab.

Set up Cyclic Calls

The next part is to set up the cyclic calls to use.

Cyclic calls are used to automatically collect data, including historic data, from a number of controllers at scheduled times. For example, at 3 PM the data can be scheduled to be collected from controllers A and B, while at 5 PM it can be scheduled to be collected from controllers C and D. These scheduled collections will be repeated every day until changed.

Under the Cyclic Call Setup tab, see Figure 93 for an example, there is a table with information on the defined cyclic calls. The table contains:

• a column with the dialed controllers.

• a column for each defined call time (maximum is 24).

Table 30. Modem Check Examples

Answer Description

“Modem answered OK” The text string “OK” was received as a reply.

“No answer from modem” Either the modem is not connected or the power is off.

“Modem answers incorrectly” Data was received, but could not be interpreted.

“Invalid port number” The selected port number does probably not exist in the computer.

3BSE035041R5001 133

Page 134: 3BSE035041R5001_PLC_Config

Set up Cyclic Calls Section 6 Configure Dialed Communication (Option)

An active (blue) cell in the table means that the controller is scheduled to be called at the call time shown in the column header.

Add a Call Time

1. Under the tab, click Add.

2. Enter the call time in hours and minutes in the displayed dialog box.

3. Click Apply in the dialog box. A new call time column is added to the table.

4. If desired, repeat Step 2 to Step 3 for each other call time you want to add.

5. When ready, click OK. The dialog box is closed.

Schedule Calls

6. Click the cell in the table corresponding to the desired call time for a controller. The cell becomes active (blue).

7. Click Apply.

8. Right-click a cell in the table.

Figure 93. Cyclic Call Setup Tab

When you want to clear a scheduled call, click in the cell again.

134 3BSE035041R5001

Page 135: 3BSE035041R5001_PLC_Config

Section 6 Configure Dialed Communication (Option) Set up Priorities

9. From the displayed context menu, select Set Column. All cells in the column will be scheduled as calls.

10. Click Apply.

11. If desired, schedule more calls as described above.

12. Select the Priority Setup tab.

Set up Priorities

The next part is to set up priorities.

Priorities are used to avoid dedicating modems for either manual or cyclic calls. This way it is possible to allocate many modems for cyclic calls when no manual calls are in progress and vice versa. Modem failures can also be handled by defining how the remaining modems are to be used.

Under the Priority Setup tab, see Figure 94 for an example, there is a tab for each defined protocol with information on the priorities of the outgoing connections using that protocol.

The number of priority levels corresponds to the number of modems handling cyclic and manual calls, that is, the number of outgoing connections using the protocol. For each priority level you define the primary use (1st choice) as Cyclic or Manual and a secondary use (2nd choice) as Cyclic, Manual or "Blank“.

The top-most row corresponds to the top-most priority, and so on downwards.

You can use the context menu to edit call times, schedule or clear multiple calls, and so on.

Figure 94. Priority Setup Tab

The settings are for priority levels and not for specific modems.

3BSE035041R5001 135

Page 136: 3BSE035041R5001_PLC_Config

Priority Guidelines Section 6 Configure Dialed Communication (Option)

Set or Change Priority Levels for a Protocol

1. Under the Priority Setup tab, select the tab for the protocol.

2. In the first row, click in the 1st choice column to change the primary use.

3. In the first row, click in the 2nd choice column to change the secondary use.

4. Repeat Step 2 to Step 3 for each additional row.

5. Click Apply.

6. Repeat Step 1 to Step 5 for each other protocol tab.

7. Review the priority guidelines in the next sub-section, or skip directly to the next part, see Set up Dialed Controllers on page 139.

Priority Guidelines

• Begin by setting up the top-most row with Manual as 1st choice and Cyclic as 2nd.

• If more than one outgoing line is available consider to set up a row with Manual as 1st choice and an empty 2nd choice, to make sure one connection is reserved for manual calls.

• If several lines are available and it’s important that cyclic calls are not blocked by manual calls a row with Cyclic as 1st choice and 2nd choice empty can be set up.

• If a lot of lines are available the remaining can be defined as Manual as 1st choice and Cyclic as 2nd choice.

Basic Example

In this example, see Table 31, five connections have been defined as outgoing for a protocol:

• One modem has been reserved for manual calls only (no 2nd choice).

• One modem has been reserved for cyclic calls only (no 2nd choice).

• When needed, the modems on the top-most and bottom-most rows are used for manual calls, when no manual calls are requested, they can be used for cyclic calls.

136 3BSE035041R5001

Page 137: 3BSE035041R5001_PLC_Config

Section 6 Configure Dialed Communication (Option) Priority Guidelines

• When needed, the modem on the second top-most row is used for cyclic calls, when no cyclic calls are requested, it can be used for manual calls.

Assume that four cyclic calls are in progress and four manual requests are issued, which requires the use of more modems than are currently available.

1. The first manual call is served immediately, as one modem has been reserved for manual calls only.

2. The second manual request is queued and will get a modem as soon as one of the cyclic calls completes.

3. The other two manual requests are not queued and the operator is informed that the manual requests cannot be served, because cyclic calls are in progress and no more modems are available.

Example - One Outgoing Connection

In this example, see Table 32, one connection has been defined as outgoing for a protocol. Cyclic calls can be in progress when no manual calls are in progress.

Table 31. Five Outgoing Connections

1st choice 2nd choice

Manual Cyclic

Cyclic Manual

Manual

Cyclic

Manual Cyclic

Table 32. One Outgoing Connection

1st choice 2nd choice

Manual Cyclic

3BSE035041R5001 137

Page 138: 3BSE035041R5001_PLC_Config

Priority Guidelines Section 6 Configure Dialed Communication (Option)

Example - Three Outgoing Connections

In this example, see Table 33, three connections has been defined as outgoing for a protocol:

• When three manual calls are in progress, the calling of cyclic scheduled controllers start when any of the manually started calls in progress are stopped. When the first cyclic scheduled controller has been called, it is not possible to have more than two manual calls in progress before the queue of cyclic scheduled controllers is empty.

• When max one manual call is in progress, two cyclic scheduled controllers can be called simultaneously.

• One line is always reserved for manual calls.

Example - Many Outgoing Connections

In this example, see Table 34, many connections has been defined as outgoing for a protocol:

Table 33. Three Outgoing Connections

1st choice 2nd choice

Manual Cyclic

Cyclic Manual

Manual

Table 34. Many Outgoing Connections

1st choice 2nd choice

Manual Cyclic

Cyclic Manual

Manual

Manual Cyclic

138 3BSE035041R5001

Page 139: 3BSE035041R5001_PLC_Config

Section 6 Configure Dialed Communication (Option) Set up Dialed Controllers

• One line is always reserved for manual calls (no 2:nd choice), and one for cyclic calls (no 2:nd choice).

• When max one manual call is in progress, four lines can simultaneously be used for cyclic calls if needed.

• If four manual calls are in progress when several controllers are to be called cyclic, one line is always available for cyclic calls. After the first manual call has stopped, the controllers queued for cyclic calls keep two lines until the queue is empty (the rows with cyclic as 1:st choice). Max three manual calls can be in progress as long as the queue of cyclic called controllers isn’t empty.

• When more lines are available they can be added with Manual as 1st choice and Cyclic as 2nd.

• If it is not so important that the calling of cyclic scheduled controllers starts immediately the row with Cyclic as 1:st and no 2:nd choice can have Manual as 2nd choice. The difference is that the calling of cyclic controllers starts on one line when the first manual call stops.

Set up Dialed Controllers

The next part is to set up the dialed controllers in the control network.

1. In the Control Structure, select a dialed controller part of the Generic Control Network object.

2. Select the PLC Dial Configuration aspect, see Figure 95 for an example.

In the aspect, you can enter communication settings for the dialed controller and also default history settings. These history settings will be set later on as part of the dialed history configuration example.

Cyclic

(...) (...)

(Manual) (Cyclic)

Table 34. Many Outgoing Connections (Continued)

1st choice 2nd choice

3BSE035041R5001 139

Page 140: 3BSE035041R5001_PLC_Config

Set up Dialed Controllers Section 6 Configure Dialed Communication (Option)

Enter Communication Settings

3. From the Protocol drop-down list, select a defined protocol to use.

4. In the Phone Number box, enter the phone number to be dialed to contact the controller. The number should be entered without spaces, for example, “0707 654321” should be entered as “0707654321”.

5. In the #tries box, enter the number of dial attempts for a cyclic call sequence that is to be carried out before the call is considered to have "failed".

6. Click Apply.

7. Repeat Step 1 to Step 6 for each other dialed controller in the control network.

Finish the Basic Configuration Example

8. Deploy the configuration for the control network. For more information on how to deploy a configuration, refer to the PLC Connect online help.

9. Repeat the previous steps in the basic configuration example for each other control network you want to set up dialed communication for.

10. The configuration is now finished for both incoming and manually ordered calls. To also configure for dialed history, continue with Dialed History Configuration Example on page 143.

Figure 95. PLC Dial Configuration Aspect

Some switchboards require a Wait command before you get an outside line, for example, 0W01234567.

140 3BSE035041R5001

Page 141: 3BSE035041R5001_PLC_Config

Section 6 Configure Dialed Communication (Option) Dialed History

Dialed HistoryDialed history is used to collect historic data from process signals that don’t require a permanent connection, for example, for signals used for statistic analysis or status surveillance.

The server calls a controller at scheduled times to collect the historic data. These calls are denoted cyclic calls. A collection can also be ordered manually with the Dial Supervisor.

The dialed controller has to be programmed to sample each signal value periodically and store the value in a circular data buffer, see Figure 96. When a value is stored in a circular data buffer, the oldest sample value is overwritten with the new sample value. There should be one data buffer for each signal. The required buffer size depends on how often the values are collected. For example, a signal is sampled and stored every half hour and the values are collected once every day. The data buffer then should be configured to contain 48 values.

Create one index register in the controller for each data buffer to keep track of the latest sampled value in a buffer. The index register value should be incremented each time a new value is stored in the data buffer.

Depending on how the controller is programmed, the index register can hold a number between 0 and [buffer size - 1], or between 1 and [buffer size]. In the first case, the index correction has to be 0; in the second case, it has to be 1.

Figure 96. Signal Sampling

3BSE035041R5001 141

Page 142: 3BSE035041R5001_PLC_Config

PLC Time Stamp Section 6 Configure Dialed Communication (Option)

The index register value together with the index correction value and the buffer start register address are used to find the stored sampled values in the controller, see Figure 97. If for example the index register holds the value 55, then this is the latest stored value and the reading starts on the following. That is, if the start address is 100, then the reading is to start on R155, go backwards through R154 to the start address and then continue from the start address + number of registers backwards to R156. This is if the Index correction is 0. When the Index correction is 1, reading starts on 154. An index correction of 0 means that the index register holds a value between 0 and the number of registers - 1. When the index correction is 1 then the index register holds a value between 1 and the number of registers.

The maximal number of values that can be read each time is 32. If the number of registers is more than that they are read 32 registers at a time until all have been read.

PLC Time Stamp

When historic data is collected, the time of the last sample can be time stamped in two ways. By default, the time for the call to the controller is used as time of the last sample. When PLC time stamp is used, instead the time of the last sample is read from two registers in the controller.

The two registers in the controller should be of data type integer (16 bits), and the first register should hold the date in the format MMDD. MM is the month and DD is

Figure 97. Controller Data Buffer

142 3BSE035041R5001

Page 143: 3BSE035041R5001_PLC_Config

Section 6 Configure Dialed Communication (Option) Dialed History Configuration Example

the day. For example, 0709 equals 9 July and 1122 equals 22 November. If the date in the controller is later than the date in the computer, then the previous year is used.

The second register should hold the time in the format HHMMS. HH is the hour, MM is the minute, and S is tens of seconds. For example, 23595 equals 23:59:50, and 09203 equals 09:20:30. Midnight is 00000.

Dialed History Configuration ExampleThis example describes how to make a configuration of dialed history. However, it is assumed that the basic configuration example already is performed, see also Basic Configuration Example on page 129.

Preparations

The first part contains some preparations.

Import DialHistoryType

1. Start the Import/Export tool. Refer to the Industrial IT 800xA - System Administration and Security (3BSE037410Rxxxx) for more information on the Import/Export tool.

2. Use the Import/Export tool to import the process object type DialHistoryType. It can be found in the file \...\ABB Industrial IT\Operate IT\PLC Connect\Data\ObjectTypes\DialHistoryType.afw.

Create DialHistoryType Objects

3. In Plant Explorer, create a process object of the process object type DialHistoryType for one of the dialed controllers. Refer to the PLC Connect

Figure 98. PLC Time Stamp Registers

3BSE035041R5001 143

Page 144: 3BSE035041R5001_PLC_Config

Preparations Section 6 Configure Dialed Communication (Option)

online help for more information on how to create process objects. Make sure to:

– name the process object with a capital letter “X” followed by the controller name. For example, if the controller name is “Dial_TH1”, then name the object “XDial_TH1”.

– define the object as a structure, that is, select Structure when entering object information for the object.

4. Repeat Step 3 for each additional dialed controller part of any Generic Control Network object.

Configure History Logging

5. Configure history logging for each signal part of a dialed controller. Refer to the Industrial IT 800xA - System Operator Workplace Configuration (3BSE030322Rxxxx) for more information on history logging.

When the controller name is longer than 22 characters, use only the first 22 characters.

The signals in the created object are not connected. Don’t change their initial configuration.

If you wish to use hierarchical logs based on a dialed history direct log (see Figure 101 for an example), make sure to select either Average, Maximum or Minimum as aggregation (see Figure 99 for an example). For dialed history, only these aggregations are supported.

Figure 99. Hierarchical Log Configuration

144 3BSE035041R5001

Page 145: 3BSE035041R5001_PLC_Config

Section 6 Configure Dialed Communication (Option) Enter Default History Settings

6. Deploy the configuration for each affected control network.

Enter Default History Settings

The next part is to enter default history settings for a dialed controller.

1. In the Control Structure, select a dialed controller.

2. Select the PLC Dial Configuration aspect, see Figure 100 for an example.

In the aspect, you can enter default history settings. The communication settings were entered earlier on as part of the basic configuration example.

3. In the Index Register box, enter the index register address. The index register is the register used in the dialed controller to keep track of where the latest historic value for the signal is stored.

4. In the No Of Registers box, enter the number of registers used in the dialed controller to store the historic values for the signal. This number is also called the data buffer size.

5. In the Index Correction box, enter the index correction value. This value is used to offset where the latest historic value is stored. It is usually equal to 0 or 1.

Figure 100. Entered History Settings

The index register address, data buffer size, index correction and PLC time stamp register address mentioned below depend on how the dialed controller is programmed. For more information, see Dialed History on page 141.

3BSE035041R5001 145

Page 146: 3BSE035041R5001_PLC_Config

Enter Signal History Settings Section 6 Configure Dialed Communication (Option)

6. Select either:

– Use Computer Time Stamp. When historic data is collected, the time for the call to the controller is used as time of the last sample.

– Use PLC Time Stamp. When historic data is collected, the time of the last sample is read from two registers in the controller. Enter the address for the first of these two registers in the Address box.

7. Click Apply.

8. Repeat Step 1 to Step 6 for each other dialed controller in the control network.

Enter Signal History Settings

The last part is to enter history settings for a signal part of a dialed controller.

1. In the Control Structure, select the signal part of a dialed controller.

2. Add a Dial Log Configuration aspect.

3. Select the added aspect.

In the aspect, you can enter signal history settings, see Figure 101 for an example.

Figure 101. Dial Log Configuration Aspect

The start register address, index register address, data buffer size, index correction and PLC time stamp register address mentioned below depend on how the dialed controller is programmed. For more information, see Dialed History on page 141.

146 3BSE035041R5001

Page 147: 3BSE035041R5001_PLC_Config

Section 6 Configure Dialed Communication (Option) Enter Signal History Settings

4. From the History Log drop-down list, select the relevant dialed history direct log.

5. Enter the start register address in the Start register box. The start register is the first of the registers used in the dialed controller to store the historic values for the signal.

6. To use the default history settings, select the Use Default PLC Values check box, and then skip to the next step. Otherwise, clear it and then:

– In the Index Register box, enter the index register address. The index register is the register used in the dialed controller to keep track of where the latest historic value for the signal is stored.

– In the # Registers box, enter the number of registers used in the dialed controller to store the historic values for the signal. This number is also called the data buffer size.

– In the Index Correction box, enter the index correction value. This value is used to offset where the latest historic value is stored. It is usually equal to 0 or 1.

– Select either Use Computer Time Stamp or Use PLC Time Stamp. When historic data is collected, the time stamp is used to determine the time of the last sample.

Computer time stamp: the time for the call to the controller is used.

PLC time stamp: the time is read from two registers in the controller. Enter the address for the first of these two registers in the Address box.

7. Click Apply.

8. Repeat Step 1 to Step 6 for each other signal part of a dialed controller.

9. Deploy the configuration for each affected control network.

10. The dial history configuration is now finished.

Make sure to select a direct log, and not any hierarchical log.

3BSE035041R5001 147

Page 148: 3BSE035041R5001_PLC_Config

Enter Signal History Settings Section 6 Configure Dialed Communication (Option)

148 3BSE035041R5001

Page 149: 3BSE035041R5001_PLC_Config

Section 7 Configure IEC 60870 Driver (Option)

IntroductionThe IEC driver provides communication with controllers by the IEC60870-5 protocol suite. The protocols 101 (serial) and 104 (network) are supported.

The IEC 60870 driver includes support for:

• IEC 60870 controlling station, including transmission protocols IEC 60870-5-101 and IEC 60870-5-104.

• Round-Robin polling

• Detailed polling schedule

• Optimized for low-bandwidth and noisy communication channels

When installed the IEC 60870 driver is accessible in the configuration aspects of PLC Connect just as any other protocol driver. The IEC driver uses an IEC 60870 protocol server to handle IEC 60870 telegram traffic. The IEC 60870 protocol server has a Configuration Window that is used to setup certain protocol server parameters.

The protocols 102 and 103 are not supported.

Figure 102. IEC Driver

3BSE035041R5001 149

Page 150: 3BSE035041R5001_PLC_Config

Configuration Window Section 7 Configure IEC 60870 Driver (Option)

Configuration WindowLimited configuration of the IEC 60870 driver is required. The Configuration Window allows users to view and alter configuration parameters at run time. When a user views a configuration parameter, the information is retrieved and displayed. Updated parameters are sent as a group to the protocol server when submitted.

To view the Configuration Window, select: (Windows XP) Start > All Programs > ABB Industrial IT 800xA > PLC Connect > IEC60870 > Configuration Utility.

Configuration can also be made by editing an XML file.

The Signal Configuration aspect within the Plant Explorer is used to connect the signal Aspect Object to an individual process signal. It is possible to use the Browse button, to browse for items in the protocol server.

Commands

• Table 35 describes the commands in the Configuration Window.

• Table 36 describes the commands in the File Menu.

• Table 37 describes the commands that appear in the Edit Menu when the currently selected object appears under the Server Configuration node.

• Table 38 describes the commands that appear in the Edit Menu when the currently selected object appears under the Alias Configuration node.

An IEC 60870 unit (mentioned later in this section) is the same as a controller.

Figure 103. Configuration Window

150 3BSE035041R5001

Page 151: 3BSE035041R5001_PLC_Config

Section 7 Configure IEC 60870 Driver (Option) Commands

• Table 39 describes the commands in the View Menu.

• Table 40 describes the commands in the Tools Menu.

• Table 41 describes the commands in the Help Menu.

Table 35. Configuration Window

Command Description

Main menu Provides access to the File, Edit, View, Tools, and Help menus.

Main toolbar Provides shortcut buttons for commands in the main menu (context-sensitive).

Current configuration

Displays a tree of configuration objects currently defined in the server. Select an object to display its current settings in the right-hand panel.

Server Configuration

Objects under this node affect how the server communicates with the data source.

Alias Configuration Define aliases and alias groups under this node.

Object settings panel

Displays the current settings of the object presently selected in the tree.

Statistics panel Displays available statistics for the object presently selected in the tree: Sent, Received, Timed out, Retried, Failed, and Overrun.

Reset Statistics Resets statistics on the object presently selected in the current configuration tree.

Clients Displays the total number of clients presently connected to the server.

Server Time Displays the current time.

Table 36. File Menu

Command Description

New Clear the current configuration and start a new one.

Open Clear the current configuration and load a new one from an existing file. Displays the Open Configuration dialog box to prompt for the file name before continuing.

3BSE035041R5001 151

Page 152: 3BSE035041R5001_PLC_Config

Commands Section 7 Configure IEC 60870 Driver (Option)

Save Save the current configuration to an XML file. Displays the Save Configuration dialog box to prompt for a new file name if the configuration is new and has no been saved before.

Save As Save the current configuration to an XML file. Displays the Save Configuration dialog box to prompt for a new file name.

Export Aliases Export all currently configured aliases to a CSV file. Displays the Export Aliases dialog box to prompt for a file name.

Import Aliases Clear all aliases and import new ones from a CSV file. Displays the Import Aliases dialog box to prompt for an existing file name.

Shutdown Server

Not to be used.

Close Hide the main configuration window.

Table 37. Edit Menu in the Server Configuration Node

Command Description

Undo/Can't Undo Not implemented.

Delete Remove the currently selected object from the server configuration. Prompts the user for confirmation before continuing if references exist to items associated with the selected object or one of its children. Does not remove such objects but simply disables them and sets them to “marked for deletion”.

Define New Display the Insert New Object dialog box used to create a new configuration object under the currently selected configuration object.

Table 38. Edit Menu in the Alias Configuration Node

Command Description

Undo/Can't Undo Not implemented.

Rename Rename the currently selected alias group.

Table 36. File Menu (Continued)

Command Description

152 3BSE035041R5001

Page 153: 3BSE035041R5001_PLC_Config

Section 7 Configure IEC 60870 Driver (Option) Commands

Delete Alias Group

Remove the currently selected alias group and all subordinate groups and aliases.

Delete Alias Remove the currently selected aliases.

Insert Alias Group

Create a new alias group under the currently selected alias group.

Insert New Alias Display the Insert New Alias dialog box used to create a new alias under the currently selected alias group.

Table 39. View Menu

Command Description

Statistics Display/hide general communication statistics for the currently selected object.

Properties Not implemented.

Reset Statistics Reset all statistics for the currently selected object to zero.

Defaults Display the Server Defaults dialog box used to configure the default settings for the various types of communication objects available in the server.

Refresh Rebuild the tree display of the server configuration and fully expand all branches.

Options Display the Options dialog box used to change general server options.

Table 40. Tools Menu

Command Description

DCOM Configuration

Not supported

Table 38. Edit Menu in the Alias Configuration Node (Continued)

Command Description

3BSE035041R5001 153

Page 154: 3BSE035041R5001_PLC_Config

The Options Dialog Box Section 7 Configure IEC 60870 Driver (Option)

The Options Dialog Box

The Options dialog box is used to edit the protocol server options.

General Options

The General settings allow you to edit general server options. To view the General Options:

1. In the Configuration Window, from the View menu, select Options. The Options dialog box appears.

2. Click the General tab to display the General Options settings dialog box, see Figure 104.

Table 41. Help Menu

Command Description

About Display information about the software, which is re-licensed from Matrikon Inc.

Do not use the Interface Logging tab. Interface logging is not supported.

Figure 104. General Options

154 3BSE035041R5001

Page 155: 3BSE035041R5001_PLC_Config

Section 7 Configure IEC 60870 Driver (Option) The Options Dialog Box

Table 42 describes the commands in the General Options settings dialog box.

General Logging Options

The General Logging settings allow you to edit general logging options. To view the General Logging Options:

1. In the Configuration Window, from the View menu, select Options. The Options dialog box appears.

2. Click the General Logging tab to display the General Logging Options settings dialog box, see Figure 105.

Table 43 describes the commands in the General Logging Options settings dialog box.

Table 42. General Options

Command Description

Save current configuration on shutdown

Automatically saves the current configuration to the specified file before shutting down if selected.

Backup copies Automatically keep up to the specified number of backup copies of the configuration file when saving the configuration.

Load configuration on start-up

Automatically load a configuration from the specified file when starting up if selected.

FilenameFull path of an existing file for load and save operations. Click the ellipsis button to display the Open dialog box used to select an existing file name.

Launch configuration program on start-up

Automatically launch the configuration utility when starting up as a local executable (rather than a Windows service) if selected.

Restrict items to pre-configured aliases only

Prevent the client from adding items other than configured aliases if selected.

To have General Options Settings changes take effect, shut down and restart the PLC Connect node.

3BSE035041R5001 155

Page 156: 3BSE035041R5001_PLC_Config

The Options Dialog Box Section 7 Configure IEC 60870 Driver (Option)

Figure 105. General Logging Options

Table 43. General Logging Options

Command Description

Enable activity logging

Enable/disable general activity logging at the specified detail level (High, Medium, Low, or None) if selected.

Commit all log file writes

Flush the file buffer after each message logged in case the server is crashing.

Overwrite old log information

Overwrite the old log file each time the server starts up if selected. Otherwise, rename the old log file with an underscore (“_”) prefix.

General Activity Logging Filename

Full path for the general activity log file. Click the ellipsis button to display the Open dialog box used to select an existing file name.

Filter String Match string for filtered log.

Filtering Filename Full path for the filtered log file. Click the ellipsis button to display the Open dialog box used to select an existing file name.

General Logging Options Settings take effect immediately.

156 3BSE035041R5001

Page 157: 3BSE035041R5001_PLC_Config

Section 7 Configure IEC 60870 Driver (Option) Server Configuration

Advanced Options

The Advanced settings allow you to view and edit advanced server options. To view the Advanced Options:

1. In the Configuration Window, from the View menu, select Options. The Options dialog box appears.

2. Click the Advanced tab to display the Advanced Options settings dialog box. The Advanced Options settings dialog box appears, see Figure 106.

Table 44 describes the commands in the Advanced Options settings dialog box.

Server Configuration

The protocol server requires some configuration. This sub-section shows you how to create and edit objects, using the Configuration Window.

Figure 106. Advanced Options

Table 44. Advanced Options

Command Description

OPC Group Update Rate (minimum)

Minimum update rate (milliseconds) allowed. Prevents requesting update rates that are impossible to achieve or that cause heavy CPU loads. The default value is 100ms.

Time granularity Determines the maximum resolution for data change detection. Time granularity should always be equal to or less than the minimum group update rate.

To have Advanced Logging Options Settings changes take effect, shut down and restart the PLC Connect node.

3BSE035041R5001 157

Page 158: 3BSE035041R5001_PLC_Config

Server Configuration Section 7 Configure IEC 60870 Driver (Option)

Inserting New Objects

The Insert New Object and Create New dialog boxes are used to create new objects, including new Serial, and Network Channels.

The Insert New Object Dialog Box

The Insert New Object dialog box, see Figure 107, displays a different set of options depending on the type of object selected and the types of objects already configured under it.

Table 45 describes the types of objects that are available for insertion as a child in the Insert New Object settings dialog box, depending on which object is currently selected.

Figure 107. Insert New Object Dialog Box

Table 45. Available Objects

Selected Object Insert New Object Dialog Box Options

Server Configuration

Any of:

Serial Channel

Network Channel

Fail-over Channel (not supported)

Serial Channel One of:

Radio (not supported)

Dial-up Connection (not supported)

IEC 60870 Unit

Network Channel Only: Network Host

158 3BSE035041R5001

Page 159: 3BSE035041R5001_PLC_Config

Section 7 Configure IEC 60870 Driver (Option) Server Configuration

To insert a new object:

1. In the Configuration Window, from the Edit menu, click or, from the Edit menu, select Define New. The Insert New Object dialog box appears.

2. Select the type of object you want to create from the list, and then click OK. The Create New dialog box appears.

The Create New Dialog Box

The middle frame of the Create New dialog box, see Figure 108, displays dynamic channel settings that contain a different set of options depending on the type of object you are creating.

To create a newly inserted object:

1. In the Create New dialog box, enter a name for the object. This name is part of the item ID that globally identifies data items under the object. You can also enter a description of the object.

2. Set the Channel Settings as required, see the following sub-sections.

3. Click OK. The object is created.

Table 46 describes the components that are common to all version of the Create New dialog box.

Network Host One of:

Dial-up Connection (not supported)

IEC 60870 Unit

IEC 60870 Unit None

In order to use the object for communication, you must enable the object. This can be done at any time.

Table 45. Available Objects (Continued)

Selected Object Insert New Object Dialog Box Options

3BSE035041R5001 159

Page 160: 3BSE035041R5001_PLC_Config

Server Configuration Section 7 Configure IEC 60870 Driver (Option)

Viewing and Editing Serial Channels

The Serial Channel Settings dialog box is used to both view and to edit channel settings. This is virtually the same as the Create New dialog box for serial channels, with the exception that it appears after the object has been created.

The Serial Channel Settings dialog box includes two tabs, the Communication tab and the Data Acquisition tab. Clicking on these tabs lead to the Communications and Data Acquisition settings respectively.

Figure 108. Create New Dialog Box

Table 46. Create New Dialog Box

Component Description

Name Name of the object, which becomes an element of the item ID for data items under the object. Automatically converted to title case for display purposes.

Enabled Enable or disable communication for the object.

Description Optional, user-defined text (64-character maximum) for documentation purposes.

160 3BSE035041R5001

Page 161: 3BSE035041R5001_PLC_Config

Section 7 Configure IEC 60870 Driver (Option) Server Configuration

The Serial Channel Settings Communication Tab

The Serial Channel Settings Communication settings, see Figure 109, include those for setting the device, baud, parity, and so on.

Table 47 describes all the components of the Serial Channel Settings Communication settings.

Figure 109. Serial Channel Communication Settings

Table 47. Serial Channel Communication Settings

Component Description

Device Local communications resource name (that is COMM port).

Baud Baud rate at which the communications device operates.

Parity Parity scheme to be used: none, odd, even, mark, space.

Data bits Number of bits in the bytes transmitted and received (4-8).

Stop bits Number of stop bits to be used (1, 1½, or 2).

RTS line RTS (request-to-send) line/flow control. Must be DISABLED when working with radio modems that require key up and key down delays. (Radio is not supported.)

DTR line DTR (data-terminal-ready) line/flow control.

3BSE035041R5001 161

Page 162: 3BSE035041R5001_PLC_Config

Server Configuration Section 7 Configure IEC 60870 Driver (Option)

To edit serial channel communications settings:

1. In the Configuration Window, select a serial channel under Server Configuration. The Serial Channel Settings dialog box appears.

2. Click the Communication tab to view and edit communication settings for this serial channel.

3. When you have edited the settings, either click the Data Acquisition tab to edit the data acquisition settings, or click Apply to apply your changes now.

The Serial Channel Settings Data Acquisition Tab

The Serial Channel Settings Data Acquisition settings, see Figure 110, include those for setting delay times and intervals.

DSR flow control Indicates whether the DSR (data-set-ready) signal is monitored for output flow control. If this option is set and DSR is turned off, output is suspended until DSR is sent again.

DSR sensitivity Indicates whether the communications driver is sensitive to the state of the DSR signal. If this option is set, the driver ignores any bytes received, unless the DSR modem input line is high.

CTS flow control Indicates whether the CTS (clear-to-send) signal is monitored for output flow control. If this option is set and CTS is turned off, output is suspended until CTS is sent again.

XON/XOFF flow control

Indicates whether XON/XOFF flow control is used during transmission and reception.

Log bytes transmitted Indicates whether bytes transmitted on this channel are logged (at medium detail level).

Log bytes received Indicates whether bytes received on this channel are logged (at medium detail level).

Table 47. Serial Channel Communication Settings (Continued)

Component Description

162 3BSE035041R5001

Page 163: 3BSE035041R5001_PLC_Config

Section 7 Configure IEC 60870 Driver (Option) Server Configuration

To edit serial channel data acquisition settings:

1. In the Configuration Window, select a serial channel under Server Configuration. The Serial Channel Settings dialog box appears.

2. Click the Data Acquisition tab to view and edit data acquisition settings for this serial channel.

3. When you have edited the settings, either click the Communications tab to edit the communications settings, or click Apply to apply your changes now.

Table 48 describes all the components of the Serial Channel Settings Data Acquisition settings.

Figure 110. Serial Channel Data Acquisition Settings

Table 48. Serial Channel Data Acquisition Settings

Component Description

Inter-device delay Minimum amount of time (milliseconds) between the last request/response to/from one unit and the next request to another unit on this channel.

Reconnect delay Minimum amount of time (seconds) to wait before attempting to recover communications after the communication channel itself has failed.

3BSE035041R5001 163

Page 164: 3BSE035041R5001_PLC_Config

Server Configuration Section 7 Configure IEC 60870 Driver (Option)

Viewing and Editing Network Channels

The Network Channel Settings dialog box, see Figure 111, is used to both view and to edit network channel settings. This is virtually the same as the Create New dialog box for network channels, with the exception that it appears after the object has been created.

The Network Channel Settings include those for setting the protocol, inter-device and reconnect delays, and threshold rate.

Table 49 describes all the components of the Network Channel Settings dialog box.

To edit network channel settings:

1. In the Configuration Window, select a network channel under a serial channel. The Network Channel Settings dialog box appears.

2. Edit the network settings for this network channel.

3. When you have edited the settings, click Apply to apply your change.

Threshold rate Maximum achievable scan interval (seconds) for the channel. The server polls items with update rates faster than this on a continuous basis. Changing this option requires the server to re-optimize communication with all units on this channel.

Schedule all polls When this option is set, rather than polling them continuously, the server schedules items with update rates faster than the threshold rate to poll at the threshold rate. Changing this option requires the server to re-optimize communication with all units.

Read interval timeout The maximum amount of time (milliseconds) between the reception of one character and the arrival of the next. A value of zero indicates no limit.

DCD back-off delay The minimum amount of time (milliseconds) for DCD to be low before transmitting to avoid collisions.

DCD back-off random Maximum amount of extra random time (milliseconds) for DCD to be low before transmitting. Set both to zero to ignore DCD.

Table 48. Serial Channel Data Acquisition Settings (Continued)

Component Description

164 3BSE035041R5001

Page 165: 3BSE035041R5001_PLC_Config

Section 7 Configure IEC 60870 Driver (Option) Server Configuration

Figure 111. Network Channel Settings

Table 49. Network Channel Settings

Component Description

Protocol Internet protocol (IP) type. Normally use Stream for TCP/IP.

Inter-device delay Minimum amount of time (milliseconds) between the last request/response to/from one unit and the next request to another unit on this channel.

Reconnect delay Minimum amount of time (seconds) to wait before attempting to recover communications after the communication channel itself has failed.

Threshold rate Maximum achievable scan interval (seconds) for the channel. The server polls items with update rates faster than this on a continuous basis. Changing this option requires the server to re-optimize communication with all units on this channel.

Schedule all polls When this option is set, rather than polling them continuously, the server schedules items with update rates faster than the threshold rate to poll at the threshold rate. Changing this option requires the server to re-optimize communication with all units.

3BSE035041R5001 165

Page 166: 3BSE035041R5001_PLC_Config

Server Configuration Section 7 Configure IEC 60870 Driver (Option)

Viewing and Editing Network Hosts

The Network Host Settings dialog box is used to both view and to edit network host settings. This is virtually the same as the Create New dialog box for network hosts, with the exception that it appears after the object has been created.

The Network Host Settings, see Figure 112, include those for setting the protocol, inter-device and reconnect delays, and threshold rate.

Table 50 describes all the components of the Network Host Settings dialog box.

Log bytes transmitted Indicates whether bytes transmitted on this channel are logged (at medium detail level).

Log bytes received Indicates whether bytes received on this channel are logged (at medium detail level).

Figure 112. Network Host Settings

Table 50. Network Host Settings

Component Description

Host name / IP DNS host name or “dotted quad” IP address. Blank indicates that the socket binds to a local address and behaves as a server.

Service name / Port IP service name or port number.

Table 49. Network Channel Settings (Continued)

Component Description

166 3BSE035041R5001

Page 167: 3BSE035041R5001_PLC_Config

Section 7 Configure IEC 60870 Driver (Option) Server Configuration

To edit network host settings:

1. In the Configuration Window, select a network host under a network channel. The Network Host Settings dialog box appears.

2. Edit the network host settings for this host.

3. When you have edited the settings, click Apply to apply your change.

Viewing and Editing IEC 60870 Units

The IEC 60870 Unit Settings dialog box is used to both view and to edit IEC 60870 unit settings. This is virtually the same as the Create New dialog box for IEC 60870 units, with the exception that it appears after the object has been created.

The IEC 60870 Unit Settings dialog box includes three tabs, the Communication tab, the Data Acquisition tab, and the Advanced tab. Clicking on these tabs lead to the Communication, Data Acquisition, and Advanced settings respectively.

The IEC 60870 Unit Settings Communication Tab

The IEC 60870 Unit Settings Communication settings, see Figure 113, include those for setting the link address, protocol, base poll time, time bias, originator address, and the field sizes for the link address, cause of transmission, common address, and object address.

Table 51 describes all the components of the IEC 60870 Unit Settings Communication settings.

To edit IEC 60870 unit settings:

1. In the Configuration Window, select a IEC 60870 unit under a Serial Channel or Network Host. The IEC 60870 Unit Settings dialog box appears.

2. Click the Communication tab to view and edit communication settings for this IEC 60870 unit.

3. When you have edited the settings, either click the Data Acquisition or Advanced tab to edit these settings, or click Apply to apply your changes now.

3BSE035041R5001 167

Page 168: 3BSE035041R5001_PLC_Config

Server Configuration Section 7 Configure IEC 60870 Driver (Option)

Figure 113. IEC 60870 Communication Settings

Table 51. IEC 60870 Communication Settings

Component Description

Link address IEC 60870-5 link address (0-65535). Unit disconnects and reconnects if this parameter changes.

Protocol Indicates which protocol the unit supports (IEC 60870-5-101 or IEC 60870-5-104)

Base poll time Normalization time for scheduling polls, stored as UTC HH:MM:SS. Unit re-optimizes if this parameter changes.

Time bias Minutes to add to a timestamp from the controlled station to convert it to UTC.

Originator address Cause of transmission originator address (if cause size is 2).

Link address (Field sizes subsection)

Size (in bytes) of the link address field (0, 1, or 2).

Cause of TX Size (in bytes) of the cause of transmission field (1 or 2).

Common address Size (in bytes) of the common address field (1 or 2).

Object address Size (in bytes) of the information object address fields (1, 2, or 3)

168 3BSE035041R5001

Page 169: 3BSE035041R5001_PLC_Config

Section 7 Configure IEC 60870 Driver (Option) Server Configuration

The IEC 60870 Unit Settings Data Acquisition Tab

The IEC 60870 Unit Settings Data Acquisition settings, see Figure 114, include those for setting the inter-message delay, reply time-out, retries, reconnect delay, reconnect retries, max interrogate time, command time-out and reset process delay.

To edit IEC 60870 unit settings:

1. In the Configuration Window, select a IEC 60870 unit under a Serial Channel or Network Host. The IEC 60870 Unit Settings dialog box appears.

2. Click the Data Acquisition tab to view and edit data acquisition settings for this IEC 60870 unit.

3. When you have edited the settings, either click the Communications or the Advanced tab to edit these settings, or click Apply to apply your changes now.

Table 52 describes all the components of the IEC 60870 Unit Settings Data Acquisition settings.

When creating a new IEC 60870 Unit object, a check box appears next to the Link address field and, if selected, the edit box is disabled. Leave the check box selected to have the server automatically choose the next available station address on the channel.

Figure 114. IEC 60870 Data Acquisition Settings

3BSE035041R5001 169

Page 170: 3BSE035041R5001_PLC_Config

Server Configuration Section 7 Configure IEC 60870 Driver (Option)

The IEC 60870 Unit Settings Advanced Tab

The IEC 60870 Unit Settings Advanced Tab, includes settings, see Figure 115, for balanced transmission, confirm user data, send short ACK, receive short ACK, allow commands, optimistic commands, allow C_RD_NA_1, and latch monitor data.

Table 52. IEC 60870 Data Acquisition Settings

Component Description

Inter-message delay Minimum amount of time (milliseconds) between the last request/response to/from this unit and the next request to this same unit.

Reply timeout Maximum amount of time (milliseconds) to wait for the response to a request.

Retries Maximum number of times to re-send a request and wait for a response before concluding that communication has failed with the unit.

Reconnect delay Minimum amount of time (seconds) to wait before attempting to reconnect after communication has failed with a unit.

Reconnect retries Maximum number of times to re-send a request and wait for a response when trying to reconnect after communication has failed with a unit.

Max interrogate time Maximum amount of time (seconds) to allow a unit to be interrogated. A value of zero indicates that interrogation must be halted manually.

Command timeout Maximum amount of time (milliseconds) to wait for the response to an application command (regardless of link communication).

Reset process delay Minimum amount of time (seconds) to wait before attempting to reconnect after receiving a reset process activation confirmation.

Figure 115. IEC 60870 Advanced Settings

170 3BSE035041R5001

Page 171: 3BSE035041R5001_PLC_Config

Section 7 Configure IEC 60870 Driver (Option) Server Configuration

To edit IEC 60870 unit optimization settings:

1. In the Configuration Window, select a IEC 60870 unit under a Serial Channel or Network Host. The IEC 60870 Unit Settings dialog box appears.

2. Click the Advanced tab to view and edit advanced settings for this IEC 60870 unit.

3. When you have edited the settings, either click the Communications or Data Acquisition tab to edit these settings, or click Apply to apply your changes now.

Table 53 describes all the components of the IEC 60870 Unit Settings Advanced settings.

Table 53. IEC 60870 Advanced Settings

Component Description

Balanced transmission

Indicates whether the link is balanced (any station can transmit spontaneously) as opposed to unbalanced (only the controlling station can transmit spontaneously).

Confirm user data Indicates whether to request confirmation of user data transmissions. No effect on broadcast units.

Send short ACK Indicates whether to transmit single-character acknowledgements rather than fixed-length control frames.

Receive short ACK Indicates whether to accept single-character acknowledgements from the controlled station rather than just fixed-length control frames.

Allow commands Allow/disallow output operations to unit.

Optimistic commands Indicates whether to update a command item with the written value and an uncertain (non-specific) quality immediately after issuing the activation/deactivation command and before receiving the confirmation response.

3BSE035041R5001 171

Page 172: 3BSE035041R5001_PLC_Config

Server Configuration Section 7 Configure IEC 60870 Driver (Option)

Viewing and Editing Server Defaults

The Server Defaults dialog box, see Figure 116, is used to both view and to edit server default settings, which are used as the initial settings when creating a new object of that type. The Server Defaults dialog box includes tabs for each object type, including Serial Channel, Network Channel, IEC 60870 Unit, and Network Host. Clicking on these tabs leads to the respective server defaults for that object type.

Allow C_RD_NA_1 Indicates whether to use single-read commands (C_RD) to perform instantaneous polls for monitor items. Otherwise, a device read does nothing.

Latch monitor data When true, items “freeze” at their last value/quality/timestamp rather than going to bad qualities when the unit is set off scan.

Do not use the Fail-over Channel, Dial-up Connection or Radio tabs, since these object types are not supported.

Figure 116. Server Defaults Settings

Table 53. IEC 60870 Advanced Settings (Continued)

Component Description

172 3BSE035041R5001

Page 173: 3BSE035041R5001_PLC_Config

Section 7 Configure IEC 60870 Driver (Option) Alias Configuration

To edit server default settings:

1. In the Server Default Setting dialog box, click the tab with the type of object for which you want to set server defaults to view and edit the default configuration settings.

2. When you have edited the settings, either click another tab to edit the more settings, or click Apply to apply your changes now.

Removing Objects

You can easily remove any object you have created, but a warning message, see Figure 117, will appear if you remove an object that has data items to which the IEC driver hold references.

To remove an object:

1. In the Configuration Window, select the object you want to remove under Server Configuration.

2. From the Edit menu, select Delete or click .

If the client holds references to data items somewhere under the selected object, a warning message appears.

3. To mark the object for later deletion, click Yes. To leave the object unmodified, click No.

Items marked for deletion are disabled and a red X appears over the icon on the right side of the window when the object is selected.

Alias Configuration

The IEC 60870 driver provides the ability to create user-defined aliases that can be used in place of regular items. This feature is particularly useful when the item path

Figure 117. Warning Message

3BSE035041R5001 173

Page 174: 3BSE035041R5001_PLC_Config

Alias Configuration Section 7 Configure IEC 60870 Driver (Option)

for a given server is very complex or difficult to remember (for example, Com1.R1.Unit1.41.4.123).

This sub-section shows you how to create and edit aliases, using the Configuration Window.

Inserting Alias Groups

Alias Groups are used to contain one or more configured aliases. To insert an Alias Group:

1. In the Configuration Window, select Alias Configuration or a previously configured Alias Group.

2. From the Edit menu, select Insert Alias Group or click . A new Alias Group folder appears.

3. Enter a new name for the Alias Group, and then press ENTER. The Alias Group is renamed.

Renaming Alias Groups

Alias Groups can be renamed after they have been created. To rename an Alias Group:

1. In the Configuration Window, select an Alias Group.

2. From the Edit menu, select Rename or click . The Alias Group is renamed.

Inserting New Aliases

Use the Insert New Alias dialog box, see Figure 118, to insert a new Alias into an Alias Group or on its own, directly under the Alias Configuration node.

Figure 118. Insert New Alias Dialog Box

174 3BSE035041R5001

Page 175: 3BSE035041R5001_PLC_Config

Section 7 Configure IEC 60870 Driver (Option) Alias Configuration

Table 54 describes all the components of the Insert New Alias dialog box.

The Insert New Alias dialog box can be expanded to display Scaling Options, see Figure 119. Available forms of scaling include: linear, square root, gain/offset, and simple text expressions.

Table 54. Insert New Alias Dialog Box

Component Description

Name Name for the alias (unique within the alias group).

Item PathFully-qualified item ID for the item to which the alias refers. Click the ellipsis button to display the Item Path Browser dialog box used to select an existing item on the server.

Alternatively, leave the item path blank to use the alias as a general in-memory variable. When doing so, either define the data type for the alias point as something other than “Default”, or else set the requested data type for reading and explicitly define the data type when writing values to the alias.

Data Type Coerce the value of the item to the specified type unless “Default” selected. Also serves as the “canonical” data type for the alias.

Read only Prevent the client from writing values to the alias if selected.

Update Rate Update rate (milliseconds) to use with the “Poll when inactive” option.

Poll when inactive Continue updating the value for the alias at the specified update rate if selected, even if the alias is not accessed.

Save Save changes to the alias and hide the dialog box.

Save & Create New Save changes to the alias and begin configuring a new one.

Default to new Pressing Enter activates the “Save & Create New” button rather than the Save button if selected.

Scaling >> Enable scaling for the alias (displays scaling options).

<< No Scaling Disable scaling for the alias (hides scaling options).

Cancel Discard changes to (abandon creation of) the alias and hide the dialog box.

3BSE035041R5001 175

Page 176: 3BSE035041R5001_PLC_Config

Alias Configuration Section 7 Configure IEC 60870 Driver (Option)

Table 55 describes the Scaling Options for the Insert New Alias dialog box.

Figure 119. Scaling Options

Table 55. Scaling Options

Tab Component Description

Linear & Square Root

Raw High Maximum expected raw value from the item.

Raw Low Minimum expected raw value from the item.

Scaled High Maximum desired scaled value for the alias (corresponds to Raw High).

Scaled Low Minimum desired scaled value for the alias (corresponds to Raw Low).

Clamp High Clamp the scaled value at the high limit to prevent it from going out of range.

Clamp Low Clamp the scaled value at the low limit to prevent it from going out of range.

Gain/Offset Gain Scaling factor. (No limits are assumed.)

Offset Scaling offset.

Expression Input Simple text equation to apply to incoming values (reads). Click the

ellipsis button to display the Expression Wizard dialog box used to help build a formula.

Output Simple text equation to apply to outgoing values (writes). Click the

ellipsis button to display the Expression Wizard dialog box used to help build a formula.

176 3BSE035041R5001

Page 177: 3BSE035041R5001_PLC_Config

Section 7 Configure IEC 60870 Driver (Option) Alias Configuration

To insert a new Alias:

1. In the Configuration Window, select Alias Configuration or a previously configured Alias Group.

The Contents table for that Alias Group is displayed on the right side of the Configuration Window, see Figure 120, listing the Aliases, if any, it contains.

2. From the Edit menu, select Insert New Alias. The Insert New Alias dialog box, see Figure 118, appears.

3. Enter a name for the Alias in the Name text box.

4. Enter the item Path and ID for the item to which the Alias refers, or click Browse to navigate to the item.

Consider the following:

• The data type for scaled values is double-precision real unless the Alias data type is specified.

• The item values must be numeric for linear, square root, and gain/offset scaling to work.

• The item values must be non-negative for square root scaling to work. Otherwise, the scaled value will be -1 with a bad quality.

• The server may be unable to load configuration files containing illegal scaling expressions, and may fail to start up properly. If this occurs, rename the configuration file so that the server will not load in on start up and create a new configuration file. Alternatively, edit the XML file to correct the bad alias settings.

It is usually better to create a new alias under an Alias Group rather than directly under the Alias Configuration node.

Figure 120. Contents Table

3BSE035041R5001 177

Page 178: 3BSE035041R5001_PLC_Config

Alias Configuration Section 7 Configure IEC 60870 Driver (Option)

5. Click Scaling to enable scaling for the Alias. Click No Scaling to disable scaling and hide the Scaling Options.

The Scaling Options are displayed at the bottom of the Insert New Alias dialog box, see Figure 119.

6. Configure the Scaling Options as required, see Table 55, by clicking the appropriate tab for the form of scaling you require.

Available forms of scaling include: linear, square root, gain/offset, and simple text expressions.

7. Configure the remaining fields as required, see Table 54.

8. Click Save to save the Alias.

Editing Aliases

Aliases can be edited after they have been created, using the Edit Alias dialog box. This is virtually the same as the Insert New Alias dialog box, with the exception that it appears after the Alias has been created.

To edit an Alias:

1. In the Configuration Window, select an Alias, and then double-click or press ENTER. The Edit Alias dialog box appears.

2. Make the changes you require.

Removing Aliases

You can easily remove any Alias you have created. To remove an Alias:

1. In the Configuration Window, select one or more Aliases.

2. From the Edit menu, select Delete Alias. The Alias is removed.

178 3BSE035041R5001

Page 179: 3BSE035041R5001_PLC_Config

Section 7 Configure IEC 60870 Driver (Option) Saving the Configuration

Removing Aliases

You can easily remove any Alias Group you have created. To remove an Alias Group:

1. In the Configuration Window, select an Alias Group.

2. From the Edit menu, select Delete Alias Group or click . The Alias Group is removed.

Exporting Aliases

Use the Export Aliases dialog box to export all currently configured aliases to a CSV file. To export all currently configured Aliases:

1. From the File menu, select Export Aliases or click . The Export Aliases dialog box appears.

2. Enter a file name for the CSV export file.

3. Click Save. The Aliases are exported.

Importing Aliases

Use the Import Aliases dialog box to clear all Aliases and import new ones from a CSV file. To import Aliases from a CSV file:

1. From the File menu, select Import Aliases or click . The Import Aliases dialog box appears.

2. Browse to the CSV file name.

3. Click Open. The old Aliases are cleared and the new ones are imported.

Saving the Configuration

When you have completed configuration of the server, use the Save Configuration dialog box to save the configuration to an XML file.

To save the configuration to an XML file:

1. From the File menu, select Save As or click (alternatively, you can select Save or click ). The Save Configuration dialog box appears.

3BSE035041R5001 179

Page 180: 3BSE035041R5001_PLC_Config

Clearing the Configuration Section 7 Configure IEC 60870 Driver (Option)

2. Enter a file name if you are saving the file for the first time.

3. Click Save. The configuration is saved.

Clearing the Configuration

You can clear the configuration if you want to start a new configuration. To clear the configuration:

1. From the File menu, select New or click .

If the client is still connected to the server, a warning message appears.

2. Click OK. The configuration is cleared.

Loading a Saved Configuration

If you have saved a configuration, you can clear the current configuration and then load the saved configuration file.

To clear the current configuration and load a saved configuration from an existing file:

1. From the File menu, select Open or click . The Open Configuration dialog box appears.

2. Browse for the configuration file you want to load.

3. Click Open.

If the client is still connected to the server, a warning message appears.

4. Click OK. The old configuration is cleared and the new configuration is loaded from the file.

180 3BSE035041R5001

Page 181: 3BSE035041R5001_PLC_Config

Section 7 Configure IEC 60870 Driver (Option) Notation for Accessing Data Items

Notation for Accessing Data ItemsThis sub-section describes data items used in the IEC 60870 driver.

IEC 60870 ITEMS

The server supports A.T[:Q].X notation for addressing individual objects on a unit.

• The server tries to extract a valid object address from a given item ID.

• The server accepts any valid integer in the range of 1 to 65535 (as applicable) for the logical station/sector address A (the “common address” of the application service data unit).

• The server accepts any valid mnemonic for the type identifier T (that is M_ME, C_SC_NA, and so on).

• If the mnemonic is for a command or a parameter, then the server checks for and accepts any valid integer between 0 and 255 appended to the mnemonic with a colon for the command qualifier Q (that is C_IC_NA:20). The server assumes a value of 0 if the qualifier is not present.

• The server accepts any valid integer in the range of 0 to 16777215 (as applicable) for the information object address X.

• The server requires at least the channel and unit names prefixed to the object address, each element separated by a period (that is COM1.RTU1.1.M_SP.1), in order to differentiate between objects on different units and different communication channels.

Data Items

The server supplies the following data items with the specified data types and access rights for each IEC 60870 unit (common address field omitted for brevity).

Monitor Items

The server supplies the following read-only data items for access to monitored information objects. The server exposes the quality descriptor fields as part of the item data quality word.

3BSE035041R5001 181

Page 182: 3BSE035041R5001_PLC_Config

IEC 60870 ITEMS Section 7 Configure IEC 60870 Driver (Option)

The server issues single-read commands (C_RD) when the client requests an instantaneous poll (read from DEVICE) for these items, with the exception of M_EI, when configured to do so.

Command Items

The server supplies the following read-write data items for issuing control commands.

Process control:

The server supplies the following data items for issuing process commands in the control direction.

Table 56.

Item ID Data Type OV SB BL NT IV Comments

M_SP.X VT_BOOL * Single-point information (OFF, ON). OV only applies to packed change events (ASDU 20).

M_DP.X VT_UI1 Double-point information (INTERMEDIATE, OFF, ON, INDETERMINATE).

M_ST.X VT_I2 Step position with transient state indication.

M_BO.X VT_UI4 Bit string.

M_ME.X VT_R8 Measurement (normalized/scaled/floating point).

M_IT.X VT_I4 Integrated total.

M_EI.0 VT_UI1 End of initialization (most recent cause).

P_ME:Q.X VT_R8 Parameter of measurement.

Qualifier (Q): 1-63 = kind of parameter.

182 3BSE035041R5001

Page 183: 3BSE035041R5001_PLC_Config

Section 7 Configure IEC 60870 Driver (Option) IEC 60870 ITEMS

The server issues the specified activation command when the client writes a control value to one of these items. If the controlled station responds with a positive confirmation, then the server updates the data item with the written value and a good quality and returns a success result. If the controlled station responds with a negative confirmation or error message, or does not respond at all, then the server updates the data item with a bad quality and returns a failure result.

If the controlled station issues an activation termination for the command (at a later time), then the server updates the data item with the written value, a good quality, and a "constant" limit to indicate that the command is now complete.

Table 57.

Item ID Data Type Qualifier (Q) Comments

C_SC_NA:Q.X VT_UI1 0 = default

4 = short pulse

8 = long pulse

12 = persistent

+128 = select

Single command

C_SC_TA:Q.X VT_UI1 Single command with time.

C_DC_NA:Q.X VT_UI1 Double command.

C_DC_TA:Q.X VT_UI1 Double command with time.

C_RC_NA:Q.X VT_UI1 Regulating step command.

C_RC_TA:Q.X VT_UI1 Regulating step command with time.

C_SE_NA:Q.X VT_R8 0 = default

+128 = select

Set point command - normalized.

C_SE_TA:Q.X VT_R8 Set point command with time - normalized.

C_SE_NB:Q.X VT_R8 Set point command - scaled.

C_SE_TB:Q.X VT_R8 Set point command with time - scaled.

C_SE_NC:Q.X VT_R8 Set point command - floating-point.

C_SE_TC:Q.X VT_R8 Set point command with time - floating-point.

C_BO_NA.X VT_UI4 N/A Bit string command.

C_BO_TA.X VT_UI4 N/A Bit string command with time.

3BSE035041R5001 183

Page 184: 3BSE035041R5001_PLC_Config

Technical Aspects of Low Bandwidth and Noisy Communication Section 7 Configure IEC 60870

For single, double, regulating step, and set-point commands, the server issues a deactivation command for the last control message sent for that item when the client writes an empty value. If the controlled station responds with a positive confirmation, then the server updates the data item with an empty value and a good quality and returns a success result. If the controlled station responds with a negative confirmation or error message, or does not respond at all, then the server updates the data item with a bad quality and returns a failure result.

For single, double, and regulating step commands, the server combines the written value with the qualifier specified in the item ID using a bit-wise OR operation to create the qualifier code actually sent with the activation command. This allows the client to perform different operations on the same information object using a single data item.

The server updates the item with the written value and an uncertain quality after sending the activation/deactivation command and before receiving confirmation when configured to do so.

Technical Aspects of Low Bandwidth and Noisy Communication

In general, most PLC Connect applications involve communication with large fields of remote units over a slow medium. As a consequence, it may take a relatively long time to collect/exchange all of the necessary data from/with the field. Such applications require the use of an efficient and orderly transaction exchange mechanism in order to transfer data reliably.

This sub-section describes how the IEC 60870 driver implements reliable, optimized communication for supervisory control and data acquisition.

Channels

The IEC 60870 driver supports the channels of communication described in the following sections.

184 3BSE035041R5001

Page 185: 3BSE035041R5001_PLC_Config

Section 7 Configure IEC 60870 Driver (Option) Poll Optimization

Serial

The IEC 60870 driver supports direct serial communication via RS232, RS422, RS485, and so on. In addition, the server:

• supports a variety of settings for baud rate, data bits, parity, and stop bits.

• supports RTS/CTS flow control as well as other common types of flow control (DSR/DTR, software XON/XOFF).

• supports DCD transmission collision avoidance with random back-off time.

• allows you to preset control line states (RTS, DTR) to accommodate line converters (RS232/RS485, RS232/RS485, and so on).

Network

The IEC 60870 driver supports network communication via Internet Protocol (IP). In addition, the server:

• establishes client connections to both TCP/IP and UDP/IP servers.

• accepts incoming connections and responds to requests from TCP/IP or UDP/IP clients.

• supports direct network communication with a single device or with multiple devices through a terminal server.

Poll Optimization

The IEC 60870 driver organizes poll requests as efficiently as possible.

The server provides values for data items in item groups at the requested update rate for those groups (fastest rate used when more than one group references the same items). If the requested update rate is too fast for the server to handle, it makes a “best effort” to update as fast as possible. Internally, the server tries to keep the data items at least as fresh as indicated by the update rate. The server will not, however, send updates to the client any faster than the update rate in order to avoid overwhelming it.

Poll optimization involves the destruction and re-creation of communication packets for reading in the most efficient manner. During the optimization process, the server gathers the requested data items into bundles with similar scan rates, and then uses

3BSE035041R5001 185

Page 186: 3BSE035041R5001_PLC_Config

Transactions Section 7 Configure IEC 60870 Driver (Option)

those bundles to generate packets. Optimization is most successful when it generates the fewest number of packets to contain all items with the same scan rate.

Once the server has completed the optimization process and has generated the necessary packets to read the requested data, it then determines whether to queue the packets for transmission. Queued packets are transmitted to the unit at the earliest opportunity. Once all packets have been sent, the queue is emptied and the unit relinquishes control of the circuit to the next unit.

Transactions

The IEC 60870 driver employs a robust transaction exchange mechanism for supervisory control and data acquisition. The server completes all same-priority transactions for a particular unit before moving on to the next unit, but interrupts lower-priority transactions in order to carry out higher-priority transactions, (after the current transaction has completed). Demand operations, such as writes and device reads, have the highest priority.

Continuous

The IEC 60870 driver polls all units continuously, in a cyclic, round robin fashion (one after another) in order of the unit station numbers, when configured to do so. The server optimizes together low-priority items with scan times faster than a configured threshold rate and then polls them continually.

Any packet with a scan rate less than the threshold rate is queued immediately following optimization. Also, any packets with a scan rate less than the threshold rate is immediately re-queued when the queue is emptied.

Threshold Rate

In some cases, it may take minutes or even hours for the server to perform all of the communication operations necessary to finish one complete poll of all units on a channel. This has a significant impact on the optimization and scheduling of read operations. The Threshold Rate is used by the server to distinguish between scan rates that are attainable and those that are not.

The Threshold Rate indicates the fastest scan rate (in milliseconds) that the channel can realistically provide. This allows the polling mechanism to generate larger, more efficient packets for items with scan rates faster than the Threshold Rate, to be sent

186 3BSE035041R5001

Page 187: 3BSE035041R5001_PLC_Config

Section 7 Configure IEC 60870 Driver (Option) Transactions

“as fast as possible”. Items with scan rate equal to or slower than the Threshold Rate are optimized as normal and scheduled to send at their specified rate.

For example, if it takes approximately five minutes to collect all the desired information from a large field of units, then it is not possible for a particular item to receive an update every ten seconds without interrupting the round-robin polling sequence. In such a case, a Threshold Rate of 300,000 milliseconds would be appropriate, as it would allow the driver to optimize all items scanning faster than five-minute intervals into fewer packets.

Configuring the Threshold Rate for best performance may require some experimentation. The Poll Time and Overrun statistics may help to determine the best setting. Alternatively, select a smaller Threshold Rate and configure all fast items to have scan rates below the Threshold Rate and all slow items to have scan rates well above the selected rate.

Interrogation

Use the Interrogate control item to place a particular unit on a communication channel into interrogate mode. This has the effect of interleaving high-priority polls for that unit into the round-robin sequence. The interleaved polls only request items with scan rates less than the Threshold Rate; scheduled reads continue in the normal fashion (unaffected).

For example, in a field of ten units, if unit 3 is placed into interrogate mode, all of its continuous polls will be sent after unit 1 has finished sending, and again after unit 2 has finished sending, and again after unit 4, and so on. In other words, the polling sequence changes from 1...2...3...4...and so on to 1...3...2...3...4...3...and so on.

This option might be used when activity on a specific unit is of particular interest for a period of time, and operators are not able to wait for the complete round-robin sequence to finish. Only one unit on a channel may be placed into interrogate mode at a time. Naturally, the interleaved polls increase the total amount of time required to poll all units on the channel.

Scheduled

The polling mechanism manages the schedule during idle processing. Whenever a packet becomes due, it is placed on a queue for transmission at the earliest

3BSE035041R5001 187

Page 188: 3BSE035041R5001_PLC_Config

Transactions Section 7 Configure IEC 60870 Driver (Option)

opportunity. The packet’s next scheduled time is then calculated, usually just by adding the scan interval to the last scheduled time.

When scheduling packets, the IEC 60870 driver calculates the absolute time at which that packet should be sent first (aside from the initial queuing). This first scheduled time is normalized to the base poll time configured for the unit. The server handles scheduled polls due for a unit first before handling continuous polls.

Scheduled packets with the initial poll option are queued immediately. The server always performs optimization when initially establishing or re-establishing communication with a unit. Therefore, the aforementioned packets are queued immediately at these times. The schedule all polls option transforms all continuous polls on a channel into scheduled polls with a scan rate equal to the Threshold Rate. This allows for finer control over precisely when these polls occur.

Priority

Certain types of operations may need to interrupt the regular round-robin polling sequence in order to carry out important tasks. To facilitate this, the “due” queue is sorted, first by the priority level of the packet, and then by the order in which they are queued. Thus, the packet at the front of the queue is also the highest-priority packet to be sent.

When a unit queries the channel to find out whether it is its turn to communicate, it also indicates the priority level of its next packet to be sent. If this level is higher than the level presently being used by any other unit, the requesting unit is granted priority override and takes over communicating on the channel. The unit will retain priority override as long as it continues sending packets at the same priority level, and no other unit requests to send at a higher level.

Once a unit has finished sending all the packets at a certain level, those packets are immediately removed from the queue, allowing them to become due again before lower-priority packets are finished, if necessary. The channel keeps track of the last unit sending at lower levels so that polling continues where it left off when a unit finishes priority override.

Overruns

Whenever it becomes a particular unit’s turn to communicate, it services all of the messages in its own queue until they have all been sent. During this time, duplicate

188 3BSE035041R5001

Page 189: 3BSE035041R5001_PLC_Config

Section 7 Configure IEC 60870 Driver (Option) Integrity

packets cannot be entered into the queue. If a packet becomes due again before it has been removed from the queue, then this constitutes an overrun providing this occurs while communication is still good. Overruns are a symptom that there are communication problems, or that the Threshold Rate needs to be tuned.

Instantaneous

Demand (that is, user-initiated) operations, such as reading from a device or writing control values, bypass the schedule and priority queue and execute immediately, in the order indicated by the client application. These types of operations force the driver to attempt to re-establish communication with failed devices immediately, regardless of the configured re-connection delay.

Integrity

The IEC 60870 driver uses specialized communication algorithms to maintain communication integrity as much as possible. This section describes how the server deals with communication integrity with regard to Transmission, Reception, and Failure and Recovery.

Transmission

Before transmitting a packet, the server may impose a short delay, based on configured settings for the port and the unit. This delay can be used to help slower devices keep up with polling, to avoid overloading the circuit, and, sometimes, to allow unsolicited messages to be received from field devices.

Inter-message delay is configured on a per-unit basis, and indicates the amount of quiet time that must be allowed to pass between receiving a response from and transmitting the next request to the same unit. Inter-device delay is configured on a per-port basis, and indicates the delay that must pass between receiving a response from one unit and transmitting a request to another unit on the same circuit. It is also used whenever a broadcast occurs on the circuit.

Reception

The IEC 60870 driver employs a sliding window algorithm in order to filter out line noise on incoming messages without always having to wait for one entire timeout interval.

3BSE035041R5001 189

Page 190: 3BSE035041R5001_PLC_Config

Diagnostics Section 7 Configure IEC 60870 Driver (Option)

The server attempts to read sufficient bytes for a fixed-size response header. If the header is not valid, then the server discards the first byte of the header and repeats the process until the timeout interval passes. If the header is valid, then the server attempts to read sufficient bytes for the remainder of the message (length in header) including the CRC. If the CRC is not valid, then the server discards the first byte of the header and repeats the process until the timeout interval passes. If the CRC is valid, then the server considers the response valid and processes the content.

Failure and Recovery

The IEC 60870 driver uses the Reply Timeout and Retry settings in order to determine when communication has failed with a particular unit.

Whenever a request sent to a unit fails to receive a valid response within the timeout period, the polling mechanism repeats the request up to the specified number of Retries. If the proper response is still not received, the unit is considered to be in communication failure mode. The server also concludes that communication has failed with a particular unit when the number of consecutive failed demand operations is greater than the Retries setting for that unit.

The server polls units experiencing communication failure at a slower rate, based on the Reconnect Delay, using the configured number of Reconnect Retries for each attempt. However, the server attempts to re-establish communication with failed units immediately when it executes demand operations for that unit.

In addition, the server uses the reconnect delay for the channel when it cannot connect to the communication medium (for example, when it is unable to open the COMM port) to avoid pinning the CPU.

DiagnosticsThe server supplies diagnostic information to assist operators and support personnel with troubleshooting communication problems and software faults.

Logging

If difficulties occur with a server then the log files can be extremely valuable for troubleshooting. By default, the server log very little information. The General Logging tab of the Options dialog in the main configuration window contains

190 3BSE035041R5001

Page 191: 3BSE035041R5001_PLC_Config

Section 7 Configure IEC 60870 Driver (Option) Troubleshooting

settings to control server logging (for more information, see General Logging Options on page 155).

General Activity Logging records information about the internal workings of the IEC 60870 server. It is useful for troubleshooting problems with configuration and device communication. Interface Activity Logging records information about the client/server communication. It is useful for troubleshooting compliance issues.

The higher the log level, the more information is recorded. However, server performance may decrease at higher log levels. The recommended operating level is Medium. More log levels are available for both types of logging which record more detailed information, as well as the ability to output log statements to a console window at run time.

In general, the server logs all errors and other information of immediate importance to the user at the low detail level, all warnings and other information of moderate importance to the user at a medium detail level, and additional information concerning the normal functioning of the software at a high detail level. The server logs also further information of concern to support personnel at debug detail level.

The server includes an option on each communication channel to log all bytes transmitted and/or received for that channel at a medium detail level. In combination with output to a console window this may serve as a protocol analyzer. The server also logs communication events such as communication recovery, invalid CRCs, error responses, incomplete responses, and time-outs.

TroubleshootingPlease check the following list of Problems and Solutions before contacting ABB Service. The solutions are discussed in the following sub-section.

• Client unable to create or read items under configured object (device).

• Server does not retain settings

3BSE035041R5001 191

Page 192: 3BSE035041R5001_PLC_Config

Problems and Solutions Section 7 Configure IEC 60870 Driver (Option)

Problems and Solutions

Client unable to create or read items under configured object (device).

Problem: The client is unable to create or read items under a configured object (device).

Solution: Check the object configuration, see sub-section Server Configuration on page 157. Ensure that the Enabled check box is selected.

Server does not retain settings

Problem: The IEC 60870 server does not retain its previous settings and needs to be re-configured each time it starts up.

Solution: In the Configuration Window, select Options from the View menu. Under the General tab, ensure that the Load configuration on start-up check box is selected and that the correct file name appears in the edit box (see sub-section General Options on page 154).

192 3BSE035041R5001

Page 193: 3BSE035041R5001_PLC_Config

INDEX

AAddress 30 to 31Alarm 65, 69, 113, 116

Icon 38, 47, 49Alarm and Event List 69AlarmControl Aspect 65AlarmState

Icon 47Property 45

AlarmWarningCombo Icon 47Alias 152Aspect

AlarmControl 65Faceplate 58Faceplate Element 59

Aspect Link 59 to 60

BBuffer Size 141Bulk Data Manager 112, 119Button 62 to 63

Rules 64

CCalculation Type 93 to 94, 96Call

Cyclic 133Disconnect 122Manually Ordered 127Permanent 127Prioritized 122Time Limited 127

Call Time 134

Change of State 98Client 73Communication

Parameter 27, 29Settings 140

Communication Port 128Communication Server 149COM-port 131 to 132Config View 59Configuration 149

Deploy 31Configuration Window 149 to 150Connection 127, 131

Add 132Configure 132Setup 131

Connectivity 15ConnectPLC Method 123Control Blocked Signals 69Control Network 19, 25

Setup 17Control of Signal Value 102Control Structure 37 to 38Controller 30 to 31, 113, 127, 139, 141, 150

Address 30 to 31Buffer Size 141Collect Historical Data 141Data Buffer 141Dialed 127Driver 26Index Register 141Name 144Setup 139, 145 to 146Time Stamp 142

3BSE035041R5001 193

Page 194: 3BSE035041R5001_PLC_Config

IndexIndex

Cyclic Call 127, 135Call Time 134Setup 133

DData Buffer 141Data Items 181Database 74DCOM 153Deploy 31, 46, 55Design Window 39 to 40, 46

Grid 38Dial Editor 130Dial Manager 121, 128Dial Manager Access 125Dial Supervisor 141Dialed Communication 118 to 119, 127

Configuration 129Dialed Controller 127Dialed History

Configuration Example 143DialHistoryType 143Dialing Rules 128Disabled Control Signals List 69Disconnect 122DisconnectPLC Method 123Display Tool 46DLL 90, 92 to 94, 97, 103 to 104, 108

Interface 97Driver 26, 149 to 150

EElement 39 to 40, 50Event 69, 97, 99 to 101, 103, 108, 116Event Extended Options 108Expression 60Expression Builder 41, 43, 53

FFaceplate

Aspect Link 59 to 60Button 62Create 58Edit 59Indicator 59Property 66

Faceplate 3Way Valve 56Faceplate Advanced 56Faceplate Element Aspect 59Faceplate Standard 56Feature 15Force

Lock 55, 62Signal List 69Signal Value 101

Function 15

GGeneric Control Network Configuration 19, 25GetLineStatus Method 124Graphic Aspect

Deploy 46Graphic Display Aspect 46 to 47, 50, 55Graphic Element

Basic 38Connect 40Create 39Deploy 55Library 38Optimized 38, 50Resize 40

Graphic Element Aspect 46Graphic Library 38

PLC Process Icons 38, 41PLC Subelements 38, 41

Graphic Property 41, 43Window 46, 53

194 3BSE035041R5001194 3BSE035041R5001

Page 195: 3BSE035041R5001_PLC_Config

Index

Graphics 37See also Process Graphics

Graphics Builder 37Connect Element 40Design Window 38 to 40, 46Expression Builder 41, 43Graphic Library 38Properties Window 41Toolbox 39

HHardware Address 30 to 31Hierarchical Log 144History 141

Configuration Dialed 143Log 144Settings 145 to 146

IIcon 38, 44, 47, 49

Indicator 60IEC 60870 149

Configuration 149Configuration Window 149 to 150Controlling Station 149Data Items 181Driver 149 to 150Supported Features 149

IEC 60870 Server 149 to 150, 191 to 192Browse for Items 150Defaults 153Edit 150, 154, 157Settings 151

IEC 60870 Unit 150, 158, 169, 172, 181Edit 167, 169, 171Settings 167 to 171

IEC 60870-5-101 149, 168IEC 60870-5-102 149IEC 60870-5-103 149IEC 60870-5-104 149, 168

Incoming Connection 127Index Register 141Indicator 59

Icon 60Industrial IT 800xA 15Inheritance 38, 44Input Rules 64Interface 75, 90, 97, 108Introduction 72, 90, 97IsForced Property 45Items 181

LLibrary 38Line

Add 132Setup 131

Link 59 to 60List

Alarm 69Alarm and Event 69Control Blocked Signals 69Event 69Forced Signals 69

Lock 55, 62Log 144

MManually Controllable Signals List 69Manually Ordered Call 127Method 75, 103Modem 128, 135

Check 133

OObject 58, 113

See also Process ObjectObject Type Structure 38, 40

3BSE035041R5001 195

Page 196: 3BSE035041R5001_PLC_Config

IndexIndex

OLEChangeState 109OLE Interface 108WriteState 110

OPC Status 41Optimized 50Optimized Graphic Elements 38Option 149

Dialed Controller 127

PParameters 96Permanent Call 127PLC 15, 113, 118 to 119, 141PLC Alarm List 69PLC Connect 15PLC Faceplate Templates 58, 65PLC Process Icons 38 to 39, 41, 51PLC Server 128PLC Subelements 38 to 39, 41, 48PLC Time Stamp 142Port 128, 131 to 132Pre Treatment 90, 92, 96Prioritized 122Priority 136

Guidelines 136Setup 135

Process 128Process Graphics 37

Connect 40Graphics Builder 37Inheritance 38, 44Object Type Structure 38, 40Process Object 37 to 38Process Object Type 38See also Graphics Builder

Process Object 40, 58, 113Create 17Inheritance 38Process Graphics 37 to 38

Process Object Configuration 21Process Object Type 41, 58

Inheritance 38Process Graphics 38

Process Signal 40Create 17

Properties Window 41Property 41, 43, 46, 53, 66, 75, 112

Alarm 113, 116Controller 113Dialed Communication 118 to 119Event 116Process Object 113Signal 114

Property Pages 41, 49Protocol 135, 140

Add 130Configure 131IEC 60870-5-101 149, 168IEC 60870-5-102 149IEC 60870-5-103 149IEC 60870-5-104 149, 168Priority 136Server 149Setup 130

RReal Time Database 72Remote Controller 127RTDB 72RTU 15Rules 64, 128

SScheduled Call 127Server 73, 90, 121, 128, 149 to 151, 191 to 192Signal 114

Block Control 102History 146See also Process Signal

196 3BSE035041R5001196 3BSE035041R5001

Page 197: 3BSE035041R5001_PLC_Config

Index

Signal Type 114Stamp 142Status

Codes 86Icon 38, 44OPC 41

StatusBox 45, 51, 54Switchboard 140

TTime 134, 142Time Limited Call 127Time Stamp 142Toolbox 39Tools 151

UUnit 150, 158, 169Update 31

VVariable Access 73, 75, 87View 151

WWarning Icon 38, 47, 49WarningLevel

Icon 47Windowless 46Windows Registry Database 111Workplace 55

XXML

File 150

3BSE035041R5001 197

Page 198: 3BSE035041R5001_PLC_Config

IndexIndex

198 3BSE035041R5001198 3BSE035041R5001

Page 199: 3BSE035041R5001_PLC_Config
Page 200: 3BSE035041R5001_PLC_Config

3BSE035041R5001. Printed in Sweden June 2006Copyright © 2004-2006 by ABB. All Rights Reserved® Registered Trademark of ABB.™ Trademark of ABB.

Automation Technology ProductsMannheim, Germanywww.abb.de/controlsystems

Automation Technology Products Wickliffe, Ohio, USAwww.abb.com/controlsystems

Automation Technology ProductsVästerås, Swedenwww.abb.com/controlsystems

http://www.abb.com