IndustrialIT

800xA - System PLC Connect
System Version 5.0

Configuration

IndustrialIT
800xA - System PLC Connect
System Version 5.0

Configuration

NOTICE
This document contains information about one or more ABB products and may include a description of or a reference to one or more standards that may be generally relevant to the ABB products. The presence of any such description of a standard or reference to a standard is not a representation that all of the ABB products referenced in this document support all of the features of the described or referenced standard. In order to determine the specific features supported by a particular ABB product, the reader should consult the product specifications for the particular ABB product. The information in this document is subject to change without notice and should not be construed as a commitment by ABB. ABB assumes no responsibility for any errors that may appear in this document. In no event shall ABB be liable for direct, indirect, special, incidental or consequential damages of any nature or kind arising from the use of this document, nor shall ABB be liable for incidental or consequential damages arising from use of any software or hardware described in this document. This document and parts thereof must not be reproduced or copied without written permission from ABB, and the contents thereof must not be imparted to a third party nor used for any unauthorized purpose. The software or hardware described in this document is furnished under a license and may 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 Low Voltage Directive 72/23/EEC.

TRADEMARKS
All rights to copyrights, registered trademarks, and trademarks reside with their respective owners.

Copyright © 2004-2006 by ABB. All rights reserved. Portions Copyright © 2002 Matrikon Inc. All rights reserved.

Release: Document number:

June 2006 3BSE035041R5001

TABLE OF CONTENTS
About This Book
General ............................................................................................................................11 Document Conventions ...................................................................................................11 Warning, Caution, Information, and Tip Icons................................................................11 Terminology.....................................................................................................................12 Related Documentation ...................................................................................................13

Section 1 - Introduction
Welcome to PLC Connect ...............................................................................................15 Release Information .............................................................................................16

Section 2 - Getting Started
Introduction .....................................................................................................................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

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 Graphics
Introduction ..................................................................................................................... 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

Table of Contents

Section 5 - Openness
Introduction .....................................................................................................................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

7

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

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

9

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 Logging .......................................................................................................... 189 .......................................................................................................... 190 Diagnostics .................................................................................................................... 190 Troubleshooting............................................................................................................. 191 Problems and Solutions ..................................................................................... 192

INDEX

10

3BSE035041R5001

About This Book
General
This manual describes how to engineer and maintain PLC Connect.

Document Conventions
Microsoft 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 Icons
This 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

Terminology

About This Book

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

Terminology
A 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.
Term/Acronym RTDB Description 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

About This Book

Related Documentation

Related Documentation
A 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

Related Documentation

About This Book

14

3BSE035041R5001

Section 1 Introduction
Welcome to PLC Connect
PLC 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

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

Section 2 Getting Started
Introduction
This 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. 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.

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.

3BSE035041R5001

17

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 Types
This 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

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.

Figure 1. PLC Branch Object
Configuration Example (Started)

1. 2. 3.

In Plant Explorer, select the Object Type Structure. Select the PLC branch object. 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 Real Extended Signal Type Create String Extended Signal Type

Create Integer Extended Signal Type Create Binary Extended Signal Type Create Composite Process Object Type Create Basic Process Object Type

Figure 2. Generic Control Network Configuration Aspect

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.

3BSE035041R5001

19

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. For more information on the PLC Uploader aspect, refer to the online help.

Configuration Example (Continued)

4. 5. 6. 7.

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

button to

In the displayed dialog box, enter the signal type name. In this example, ‘TemperatureType’ is used. Click OK. The new type is created as part of the PLC branch object. Expand the PLC branch object to view the created signal type, see also Figure 3.

Figure 3. Created Integer Signal Type 8. In the Generic Control Network Configuration aspect, click the create a new real signal type named ‘VolumeType’. button and

20

3BSE035041R5001

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 create a new composite process object type.

button to

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.

Figure 4. Created Composite Process Object Type 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.

Figure 5. Process Object Configuration Aspect
Add Signal Type Instance

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

button to add an

3BSE035041R5001

21

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.

Figure 6. Add Integer Signal Type Instance 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.

Figure 7. Added Signal Type Instance 19. The last part of the instance name shows its type, see also Figure 8.

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

22

3BSE035041R5001

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.

Figure 9. Created Tank Object Type
Create Pump and Valve Object Types

21. Similarly, create a pump object type and a valve object type. a. b. Create two composite process object types, and relevant signal types. Add instances of the created signal types to the composite process object types.

Figure 10 shows the object types used in this example.

Figure 10. Example Pump Object Type (Left) and Valve Object Type (Right)
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 process object type. button to add an instance of another composite

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.

3BSE035041R5001

23

Create Process Object Type

Section 2 Getting Started

Figure 11. Add Object Type Instance 27. Expand the ‘TankType’ object type to view the added instance, see also Figure 12.

Figure 12. Added Object Type Instance 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.

Figure 13. Added Pump and Valve Object Type Instances 29. Expand the added object instances to view the finished ‘TankType’ object type, see Figure 14.

24

3BSE035041R5001

Section 2 Getting Started

Creating Instances of Process Objects and Signals

Figure 14. Finished ‘TankType’ Object Type

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.

Figure 15. Generic Control Network Object
Configuration Example (Started)

1. 2. 3.

In Plant Explorer, select the Control Structure. Select the relevant Generic Control Network object. 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.

3BSE035041R5001

25

Create Controller Object

Section 2 Getting Started

Create Binary Extended Signal Create Composite Process Object Create Basic Process Object Create Controller Object

Create Integer Extended Signal Create Real Extended Signal Create String Extended Signal Delete Object

Figure 16. Generic Control Network Configuration Aspect

Create Controller Object
A controller object represent a controller containing process signals.
Configuration Example (Continued)

4. 5. 6.

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

button to

In the displayed dialog box, enter the controller name. In this example, ‘TankController’ is used. Select the protocol to use for communication with the controller, see also Figure 17.

Figure 17. Selected Communication Protocol 7. 8. Click Edit Driver. In the displayed dialog box, you can edit the driver configuration for the selected communication protocol, see Figure 18.

26

3BSE035041R5001

Section 2 Getting Started

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

Figure 19. Created Controller Object

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.

3BSE035041R5001

27

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. 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 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. For more information on the settings, refer to the PLC Connect online help. 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.

28

3BSE035041R5001

Section 2 Getting Started

Create Process Object

Figure 21. Object Information Settings for Comli 22. Expand the controller object to view the created process objects, see also Figure 22.

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

Figure 23. Object Type Structure (Left), and Control Structure (Right) 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.

3BSE035041R5001

29

Connect Process Signal

Section 2 Getting Started

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

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.

Figure 25. Icon Indicating a Not Connected Process Signal 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.

30

3BSE035041R5001

Section 2 Getting Started

Deploy

Figure 26. Signal Configuration Aspect 28. Select Connected, and then enter the relevant signal hardware address, see also Figure 27. The address format depends on the used communication protocol. 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.

Figure 27. Entered Signal Hardware Address 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. The Deploy aspect can optionally be placed on process objects and controller objects. 32. Select the Deploy aspect, see also Figure 28.

3BSE035041R5001

31

Configuring Instances of Process Objects and Signals

Section 2 Getting Started

Figure 28. Deploy Aspect 33. Click Deploy. The new configuration will take affect.

Configuring Instances of Process Objects and Signals
You 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. 2. Select the Object Type Structure. Select the PLC branch object, and then a signal type. In this example, ‘TemperatureType’ is selected, see also Figure 29.

Figure 29. Selected Signal Type 3. Select the Signal Configuration aspect, and the Range tab.

32

3BSE035041R5001

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.) 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. Enter an engineering unit, see also Figure 30. (You can use Character Map to add special characters.)

5. 6.

Figure 30. Range Tab for a Signal Type 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. 9. Select the Control Structure. 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.

Figure 31. Selected Signal 10. Select the Signal Configuration aspect, and the Range tab.

3BSE035041R5001

33

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.

Figure 32. Range Tab for a Signal 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.

Figure 33. Individual Settings 12. Click Apply. 13. The icon indicates that the process signal now has individual signal settings, see also Figure 34.

Figure 34. Icon Indicating Individual Signal Settings
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.

34

3BSE035041R5001

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–120 to -10–150, then the default range for the signal will also be changed from -50–120 to -10–150. However, individual settings are not affected by the changed defaults, see also Figure 35.

Figure 35. Changed Default Settings
Another Inheritance Example

The table below describes the behavior when settings are changed. Table 1. Changed Settings
Changed Settings 1. Using default signal settings (in Control Structure) 2. Changing signal type settings (in Object Type Structure) 3. Entering individual signal settings (in Control Structure) Signal Type Range (Object Type Structure) Signal Range (Control Structure)

0–100 0–200 0–200

0–100 0–200 0–500

3BSE035041R5001

35

Configuring Instances of Process Objects and Signals

Section 2 Getting Started

Table 1. Changed Settings
Changed Settings 4. Changing signal type settings (in Object Type Structure) 5. Reverting to default signal settings (in Control Structure) Signal Type Range (Object Type Structure) Signal Range (Control Structure)

0–300 0–300

0–500 0–300

36

3BSE035041R5001

Section 3 Create Process Graphics
Introduction
This sub-section contains examples of how to create PLC Connect specific graphics, and a faceplate from the PLC Faceplate Templates. 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).

Basic Graphic Example
This 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.
Status Icon

Figure 36. Tank Graphics

3BSE035041R5001

37

Basic Graphic Example

Section 3 Create Process Graphics

An alternative presentation of status is available, see Alternative Graphic Example on page 47, and Figure 56 on page 50.
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. 2. 3. 4. In Plant Explorer, select the Object Type Structure. Select the tank object type the tank object is based on. Add a Graphic Element aspect. It will be used to create the graphics for a single tank object. Right-click the added aspect, and select Edit. The Graphics Builder is started. 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.
Add Graphic Libraries

Graphic libraries that contain PLC Connect specific graphic elements are: • • 5. 6. 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. Select Tools > Graphic Libraries. For this example, select both PLC Process Icons and PLC Subelements. Do not add graphic libraries if you do not use them. 7. Click OK. In the toolbox, the added elements will be shown under the tabs PLC Process Icons and PLC Subelements, see Figure 37.

38

3BSE035041R5001

Section 3 Create Process Graphics

Basic Graphic Example

Figure 37. Toolbox Icons
Create Graphic Elements

8. 9.

Select the PLC Process Icons tab in the toolbox. Under the tab, double-click the StatusBox icon, see Figure 38.

Figure 38. StatusBox Icon Double-clicking creates the object with default size. 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.

Figure 39. Moved Element 11. Select the PLC Subelements tab in the toolbox.

3BSE035041R5001

39

Basic Graphic Example

Section 3 Create Process Graphics

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

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

Figure 41. Moved Tank Element 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.

40

3BSE035041R5001

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. 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. 15. Select the created tank element. 16. In the Properties window, select the ValueRef property, see Figure 42.

Figure 42. Selected Property 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.

Figure 43. Property Pages Dialog Box 19. Click Browse. The Select Object Dialog is displayed.

3BSE035041R5001

41

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.

Figure 44. Selected Signal Type 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.

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

Figure 46. Connected ValueRef Property

42

3BSE035041R5001

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.

Figure 47. Selected 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.

3BSE035041R5001

43

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

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

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

44

3BSE035041R5001

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

Basic Graphic Example

Section 3 Create Process Graphics

IndicationLocal can also be used as an arbitrary indication. InducationManual can also be used to indicate manual mode.
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. 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. 40. Resize the design window to cover only the created graphic elements.

Figure 51. Resized Element
Build the Graphic Aspect

41. In the toolbar, click . The Graphic Element aspect will be built (and saved). The tank graphics is now finished. 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

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.

Figure 52. Inserted Tank Graphics

Alternative Graphic Example
In 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. 2.

In Plant Explorer, select the Object Type Structure. Select the valve object type the valve object is based on.

3BSE035041R5001

47

Alternative Graphic Example

Section 3 Create Process Graphics

3.

Add an AlarmStatus aspect for the valve object type. 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.

Create and Connect the Graphics

4. 5. 6. 7.

Add a Graphic Element aspect for the valve object type. Select the added Graphic Element aspect and click Edit. The Graphics Builder is started. In the Graphics Builder, add the graphic library PLC Subelements to the toolbox. 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.

Figure 53. PLC Subelements 8. Create an AlarmState and a WarningLevel element beside the valve element.

Figure 54. Valve Element (Left), Alarm and Warning Elements (Right) 9. Select the valve element. The direction of the valve (horizontal or vertical) is determined by the Direction property. 10. Via the Properties window, connect the “AnswerOpenedRef” property to the process signal corresponding to whether the valve is opened or not.

48

3BSE035041R5001

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. If desired, you need only connect one of the process signals.

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.

Figure 55. Process Object Type Reference 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.

3BSE035041R5001

49

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. The valve can also be equipped with indications for manual mode and operator notes

Figure 56. Graphic Display Part

Optimized Graphic Example
Some 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).

50

3BSE035041R5001

Section 3 Create Process Graphics

Optimized Graphic Example

Startup

1. 2. 3. 4. 5.

In Plant Explorer, select the Object Type Structure. Select the relevant motor object type. Add a Graphic Element aspect. Select to edit the Graphic Element aspect. The Graphics Builder is started. 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.

Figure 57. Toolbox Icon (Left), Created Element (Right) 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 58. Changed Properties (Left), Affected Element (Right)

3BSE035041R5001

51

Optimized Graphic Example

Section 3 Create Process Graphics

Add a Motor

8.

Create a MotorSimple element.

Figure 59. Toolbox Icon (Left), Created Element (Right) 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 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

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.

Figure 61. UserControl Property 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

Figure 62. Final Appearance
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 63. Connected Value Property

3BSE035041R5001

53

Optimized Graphic Example

Section 3 Create Process Graphics

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

Figure 64. Connected StatusBox Properties

54

3BSE035041R5001

Section 3 Create Process Graphics

Faceplate Example

IndicationLocal can also be used to indicate an arbitrary indication.

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.

Figure 65. Inherited Graphic Element Aspect 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.

Figure 66. Inserted Motor Graphics

Faceplate Example
It 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. 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

Faceplate Example

Section 3 Create Process Graphics

These are only example faceplates. You usually design and create your own faceplates from scratch. 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 67. Standard, Advanced and 3Way Valve Faceplates Figure 68 on page 57 shows the different part of a faceplate. The object and force lock buttons are described below.

56

3BSE035041R5001

Section 3 Create Process Graphics

Faceplate Example

Figure 68. Faceplate Parts
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. Table 2. Object Lock States
Button Description Property Value

Process object is not locked. Click to lock the process object.

Lock State = 0

Lock State = 3 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.

3BSE035041R5001

57

Add Faceplate Aspect

Section 3 Create Process Graphics

Table 2. Object Lock States
Button Description Property Value

Process object is locked from another workplace. Force Lock If 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.

Lock State = 1 If Lock State = 1

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. 2. 3. 4. 5. 6. In Plant Explorer, select the Object Type Structure. Select the PLC Faceplate Templates object type. Right-click the Faceplate Standard aspect, and select Copy. Select the process object type the process object is based on. Right-click in its aspect list, and select Paste. The aspect is pasted into the aspect list. Rename the aspect to the desired name.

58

3BSE035041R5001

Section 3 Create Process Graphics

Add Faceplate Aspect

Edit the Faceplate Aspect

7. 8.

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

Figure 69. Faceplate Standard Aspect 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 70. Indicators Tab

3BSE035041R5001

59

Add Faceplate Aspect

Section 3 Create Process Graphics

When needed, indicator icons for PLC Connect can be found in the folder \...\ABB Industrial IT\Operate IT\PLC Connect\Bin\Icons\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.

Figure 71. Expressions Dialog Box 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.

60

3BSE035041R5001

Section 3 Create Process Graphics

Add Faceplate Aspect

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

Figure 72. Selected Object Type 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.

Figure 73. Updated Object Column
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.

Figure 74. Selected Operator Note Aspect 18. Click in the bottom-most box in the Object column, and again select the process object type.

3BSE035041R5001

61

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.

Figure 75. Updated Aspect Links 20. Select the Buttons Tab
Buttons Tab

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

Figure 76. Button Tab 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.

62

3BSE035041R5001

Section 3 Create Process Graphics

Add Faceplate Aspect

Figure 77. Selected LOCK Property 22. Click in the top-most box in the Property value column and enter “3”. It corresponds to forcing the lock. This means that Lock State will be set to the value “3”, see also Table 2 on page 57.
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.

Figure 78. Selected Signal Type 25. Click OK. The bottom-most box in the Object column will now show the signal type.

3BSE035041R5001

63

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.

Figure 79. Connected Buttons
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. 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

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.

Figure 80. Input Rule Example 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.

Figure 81. Expanded Input Rule Example 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. 2. 3. Select the Object Type Structure. Select the PLC Faceplate Templates object type. Right-click the AlarmControl aspect, and select Copy.

3BSE035041R5001

65

Faceplate as Default Aspect

Section 3 Create Process Graphics

4. 5. 6. 7.

Select your process object type. Right-click in its aspect list, and select Paste. The aspect is pasted into the aspect list. Right-click the pasted aspect and select Build. 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. 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).

Configure Faceplate Position
The Faceplate will by default pop-up in the lower left corner. How to configure Faceplate Position (at cursor) is described in the manual Industrial IT 800xA - Engineering Graphics (3BSE030335Rxxxx)

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. 3. 4. Select a User object in a User Group, and then the Graphics Profile Values aspect. Select FaceplateAutoLockObject from the Names list, and Basic rule from the Rules list. In the Datasource area, select the Local option button.

66

3BSE035041R5001

Section 3 Create Process Graphics

Configure Object Lock Behavior

5. 6.

Select the Value check box. and click Apply. Repeat Step 2 to Step 5 for all users who are to use the process graphics.

Figure 82. Configuring Object Lock Behavior.

3BSE035041R5001

67

Configure Object Lock Behavior

Section 3 Create Process Graphics

68

3BSE035041R5001

Section 4 Alarm and Event List Configurations
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

Section 4 Alarm and Event List Configurations

70

3BSE035041R5001

Section 5 Openness
Introduction
This 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 Processes
You 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

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. 2. 3. 4. 5. 6. 7. 8. Start a Plant Explorer Workplace. Select the Service Structure. Select the object named “PLC Server, Service”. Select the Service Group object for the desired control network. Select the Service Group Definition aspect. Select the Special Configuration tab. Click Help and refer to the information on how to add the application as an extension process. 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

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.

Figure 83. Client and Server Nodes

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.

3BSE035041R5001

73

Subscription

Section 5 Openness

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

Figure 84. Variable Access 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.

74

3BSE035041R5001

Section 5 Openness

Variable Access Interface

Figure 85. Subscription
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. 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

Variable Access Properties and Methods

Section 5 Openness

Table 3. Properties and Methods
Class Variables Variables Variables Variables Variables Variables Variables Variables Variables Variables Variables Variables Variables Variables Variables Variables Init(...) Init2(...) Valid As Boolean Changed As Boolean Subscribe (…) As Boolean SubscribeByCalcType(…) As Boolean GetEvent(…) As Boolean GetQueueInfo(…) As Boolean ClearQueueInfo() Item(…) As Variable ReadValue(…) As Boolean WriteValue(…) As Long ForceLock(…) As Long ReleaseLock(…) As Long LockedBy(…) As Long GetGUID(…) As Long Methods/properties

Variable Variable Variable Variable Variable Variable

ReadValue(…) As Boolean WriteValue(…) As Long ReadMeasure(…) As Boolean ReadAttributes(…) As Boolean ReadLimit(…) As Boolean WriteLimit(…) As Long

76

3BSE035041R5001

Section 5 Openness

Variable Access Properties and Methods

Table 3. Properties and Methods (Continued)
Class Variable Variable Variable Variable Variable Variable Variable Variable Variable Variable Variable Variable Variable Variable Variable Variable Methods/properties ForceLock(…) As Long ReleaseLock(…) As Long LockedBy(…) As Long Lower As Double Upper As Double LowerControlLim As Double (Read/Write) UpperControlLim As Double (Read/Write) IsInverted As Boolean IsEvent As Boolean IsTimeStamped As Boolean IsBlocked As Boolean IsControllable As Boolean IsControlBlocked As Boolean IsForced As Boolean Name As String GUID As String

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-xxxxxxxxxxxxxxx}”, 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>”. 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.

3BSE035041R5001

77

Properties and Methods for the Class Variables

Section 5 Openness

Properties and Methods for the Class Variables
Init Syntax: Init(pSysCtxId As AfwSystemContextId, pSGId As AfwServiceGroupId)

Used to identify the server. pSysCtxId (in): the System Context Id. pSGId (in): the Service Group Id.
Init2 Syntax: Init2(pObject As AfwObject)

Used to identify the server. pObject (in): an object in the PLC Generic Control Network tree.
Valid Syntax: Valid As Boolean

Always TRUE. (Exists only for backward compatibility reasons).
Changed Syntax: 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

Section 5 Openness

Properties and Methods for the Class Variables

SubscribeByCalcType Syntax: SubscribeByCalcType(lQueueMaxSize As Long lCalcTypeLow 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 queue lPeakQueueSize(out): returns peak size value of the queue lTotalQueuedEvents(out): returns number of queued events
ClearQueueInfo Syntax: ClearQueueInfo()

Clears diagnostic information for a queue.

3BSE035041R5001

79

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. There are also variants of the ReadValue method, see More on Reading and Writing on page 88.
WriteValue

If you write data to a signal connected to an external IO then that data will be written to the controller.
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.

80

3BSE035041R5001

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. There are also variants of the WriteValue method, see More on Reading and Writing on page 88.
ForceLock Syntax: 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.
ReleaseLock Syntax: 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.
LockedBy Syntax: 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.
GetGUID Syntax: GetGUID( sVarName As String, sGUID As String ) As Long

3BSE035041R5001

81

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

It is recommended to instead use the method ReadValue in the class Variables, see also ReadValue on page 80.
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

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

82

3BSE035041R5001

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.
ReadMeasure Syntax: 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.
ReadAttributes Syntax: 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

Properties and Methods for the Class Variable

Section 5 Openness

ReadLimit Syntax: 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.
WriteLimit Syntax: WriteLimit(lLimitNumber As Long,lTypeLimiter As Long, fOnLimit As Double, fOffLimit As Double) As Long

Affects only RTDB, and not configuration values set in PLC Connect configuration aspects. 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.
ForceLock Syntax: 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.

84

3BSE035041R5001

Section 5 Openness

Conditions When Writing a Variable Value

ReleaseLock Syntax: 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.
LockedBy Syntax: 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. 2. If the signal is blocked or forced nothing happens, but error status is returned. 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. On an internal, real or integer signal, a check is performed on limiters. On an internal binary signal, which is an event or an alarm, a possible change of state will be further event handled. 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. 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

3. 4. 5.

6.

3BSE035041R5001

85

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)
Variables WriteValuesEx WriteValueEx ReleaseLock WriteValues WriteValue ForceLock ForceLock LockedBy GetGuid Variable ReleaseLock WriteValue X X X X X X WriteLimit X X X X LockedBy X X X X

Value

Description

0

Other error, not specified below.

X X

X X

X X

X 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. 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. 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. 32004 Internal error in RTDB. 32009 Value is outside defined control limits.

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X X

X X

X X

X X

X

X

86

3BSE035041R5001

Section 5 Openness

OPC Quality(In/Out)

Table 4. Returned Status Codes(1)
Variables WriteValuesEx WriteValueEx ReleaseLock WriteValues WriteValue ForceLock ForceLock LockedBy GetGuid Variable ReleaseLock WriteValue WriteLimit X X X 87 LockedBy

Value

Description

32101 Limit (number or type) is not valid. 32105 Variable is not reserved.
(1) X marks methods returning the status code.

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.

3BSE035041R5001

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. If you write data to a signal connected to an external IO then that data will be written to the controller.

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. These methods are only available for usage from C++, not Visual Basic.

88

3BSE035041R5001

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

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. One and only one DLL can be used per server.

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.

90

3BSE035041R5001

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

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). Calls are automatically blocked when deploy is in progress.

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. Table 5. Interfaces
Class PLCExternal5 PLCExternal5 PLCExternal5 PLCExternal5 PLCExternal5 PLCExternal5 PLCExternal5 Initialize() ReInitialize() OnlineNotification() ValueChanged(…) ValueLimit(…) OnControl(…) Terminate() Method

Initialize Syntax: 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.

92

3BSE035041R5001

Section 5 Openness

Properties and Methods for the Variable Pre Treatment

ReInitialize Syntax: Reinitialize()

Enables the DLL to make arbitrary preparations after deploy. Must not run too long.
OnlineNotification Syntax: 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.
ValueChanged Syntax: 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>”. 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. 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.
ValueLimit Syntax: 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,

3BSE035041R5001

93

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>”. . 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. 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.
OnControl Syntax: 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>”. 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. 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.
Terminate Syntax: Terminate()

Enables the DLL to make arbitrary preparations at termination.

94

3BSE035041R5001

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

If you write data to a signal connected to an external IO then that data will be written to the controller.
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.

3BSE035041R5001

95

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 Pre calculation parameter Type string Comment Sent to the variable pre treatment interface. Used in the method ValueChanged (the parameter sPreParam). Sent to the variable pre treatment interface. Used in the method ValueLimit (the parameter sPreLimParam).

Limit pre calculation parameter string

96

3BSE035041R5001

Section 5 Openness

Sample Code

To configure calculation parameters: You cannot perform calculations on signals that are SoftPoints. 1. 2. 3. 4. In Plant Explorer, select the Control structure. Select the relevant signal. Select the Signal Configuration aspect. 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. All transition times in the event handling DLL are in local time.

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,

3BSE035041R5001

97

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. Table 7. Interfaces
Class EventExternal EventExternal EventExternal EventExternal EventExternal EventExternal EventExternal Initialize() ChangeOfState(…) AcknowledgeEvent(…) AlterEventMonitoring(…) OpForce(…) AlterControlMonitoring(…) OpControl(…) Method

The PreEvent.dll is loaded by the Event Server at program start and activated if found.
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 8. ChangeOfState Parameters
Parameter sVarName dtTransitionTime lCurrentState lNewState Meaning Name of signal Time for event (in local time) Current state New state Limitation Read only Read only Read only

98

3BSE035041R5001

Section 5 Openness

DLL Interface

Table 8. ChangeOfState Parameters (Continued)
Parameter lSeverity lClass lEventType sEventText lEventTextGroup bLog bPrint vntPrinters vntOleServers vntSummaryAlarms lDelay lNoOfTransitions sNotifyAddress Priority Alarm class Event type Event text Number of event text group Logging of event, yes or no For future use For future use Name of the OLE servers Name of the summary alarms Time delay in seconds Number of transitions after acknowledgement When detected notify address Greater than or equal to 0 Set at acknowledgement TRUE or FALSE Meaning Limitation

sRecommendedView For future use Acknowledgement of Event

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

3BSE035041R5001

99

DLL Interface

Section 5 Openness

Table 9. AcknowledgeEvent Parameters
Parameter sVarName dtTransitionTime lSeverity lClass lEventType bLog bPrint vntOpPrinters vntOleServers sAckAddress Meaning Name of signal Time for event (in local time) Priority Alarm class Event type Logging, yes or no For future use For future use Name of the OLE servers When acknowledged notify address Limitation Read only Read only Read only Read only 1, 2 or 3; Read only TRUE or FALSE

Blocking/Deblocking of Event

The Event Server calls the method AlterEventMonitoring. The parameters in Table 10 are included in the method call. Table 10. AlterEventMonitoring Parameters
Parameter sVarName dtTransitionTime bEnable lSeverity Name of signal Time for event (in local time) TRUE if blocked FALSE if deblocked Priority Read only Meaning Limitation Read only Read only

100

3BSE035041R5001

Section 5 Openness

DLL Interface

Table 10. AlterEventMonitoring Parameters (Continued)
Parameter lClass lEventType bLog bPrint vntOpPrinters vntOleServers Alarm class Event type Logging, yes or no For future use For future use Name of the OLE servers Meaning Limitation Read only 1, 2 or 3. Read only TRUE or FALSE

Forcing of Signal Values

The Event Server calls the method OpForce. The parameters in Table 11 are included in the method call. Table 11. OpForce Parameters
Parameter sVarName dtTransitionTime bEnable bLog bPrint vntOpPrinters vntOleServers Meaning Name of signal Time for event (in local time) TRUE if forced FALSE if force free Logging, yes or no For future use For future use Name of the OLE servers Limitation Read only Read only Read only TRUE or FALSE

3BSE035041R5001

101

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. Table 12. AlterControlMonitoring Parameters
Parameter sVarName dtTransitionTime bEnable bLog bPrint vntOpPrinters vntOleServers Control of Signal Value Meaning Name of signal Time for event (in local time) TRUE if blocked FALSE if deblocked Logging, yes or no For future use For future use Name of the OLE servers Limitation Read only Read only Read only TRUE or FALSE

The Event Server calls the method OpControl. The parameters in Table 13 are included in the method call. Table 13. OpControl Parameters
Parameter sVarName dtTransitionTime bLog bPrint vntOpPrinters vntOleServers Meaning Name of signal Time for event (in local time) Logging, yes or no For future use For future use Name of the OLE servers Limitation Read only Read only TRUE or FALSE

102

3BSE035041R5001

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. 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. • • 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. Table 14. Event Types
Event type 1 Alarm An event that can be acknowledged both when active and not active. Event type 2 Event Cannot be acknowledged. Event type 3 Event with acknowledgement May be acknowledged when active and will then assume the state not active, and acknowledged.

3BSE035041R5001

103

Event States

Section 5 Openness

Event States
Table 15 lists possible event states. Table 15. Event States
Event State 1 2 3 4 5 6 Disabled Inactive and acknowledged Inactive and not acknowledged Active and acknowledged Active and not acknowledged Auto disabled by the system Description

Initialize
Syntax: Initialize()

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

ChangeOfState
Syntax: 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.

104

3BSE035041R5001

Section 5 Openness

AcknowledgeEvent

AcknowledgeEvent
Syntax: 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.

AlterEventMonitoring
Syntax: 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.

OpForce
Syntax: 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.

AlterControlMonitoring
Syntax: 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

OpControl

Section 5 Openness

OpControl
Syntax: 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 inactive inactive inactive inactive active active active + + + + + + + + not acknowledged not acknowledged acknowledged acknowledged acknowledged acknowledged not acknowledged not acknowledged -> -> -> -> -> -> -> -> active active active active inactive inactive inactive inactive + not acknowledged + acknowledged + not acknowledged + acknowledged + acknowledged + acknowledged + not acknowledged + acknowledged

106

3BSE035041R5001

Section 5 Openness

Limitations for lSeverity

Permitted changes of state for event type 2 are listed in Table 17. Table 17. State Changes for Event Type 2
inactive inactive active + + + acknowledged acknowledged acknowledged -> -> -> active inactive inactive + acknowledged + acknowledged + acknowledged

Permitted changes of state for event type 3 are listed in Table 18. Table 18. State Changes for Event Type 3
inactive inactive inactive active + + + + acknowledged acknowledged not acknowledged not acknowledged -> -> -> -> active active inactive inactive + + + + Not acknowledged acknowledged Acknowledged acknowledged

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.

3BSE035041R5001

107

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

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. Table 19. Configure Parameters
Parameter String pstrPrivateData Description 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. Handle to the main window. The special application can use this handle as the parent of the dialog box it creates, if possible.

Long hParentWnd

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 20. ChangeState Parameters
Parameter String strPrivateData Description String describing the setting of the Special Application called (compare with the Configure function).

3BSE035041R5001

109

OLE Interface

Section 5 Openness

Table 20. ChangeState Parameters (Continued)
String strTagName String strParentObject Integer iItemNum Integer iPriority Integer iClass String strGroupText Integer iEventType The name of the signal the event relates to. The name of the parent object the signal above belongs to. The item number of the signal the event relates to in the parent object. The event priority. Is only applicable for alarms. The event class. Is only applicable for alarms. The event group text. 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 Boolean iChangeState Variant vValue Date dTransitionTime The event text, which describes the event. True if the event is turning on, else FALSE. For future use. Time and date of the event in local time.

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

110

3BSE035041R5001

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. Table 21. WriteState Parameters
Parameter String strAppName String strTagName Integer iChangeState String strEventText String strUser String strPassword String strOptions Variant vValue Date dTransitionTime Description Special application name The name of the signal the event relates to in the format “ObjectName SignalName”. The state of the signal. 3 = signal ON, 4 = signal OFF. The event text. For future use. For future use. For future use. For future use. Time and date of the event (in local time).

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.

3BSE035041R5001

111

Example

Section 5 Openness

1. 2. 3. 4. 5.

Build the Test.exe file from the sample code. Start the Windows Registry Editor. Select Start > Run. In the displayed Open box, enter "regedit" to open the registry editor. Locate the following entry:
HKEY_CLASSES_ROOT\Test.EventOleServer\

This entry was created when you built the Test.exe file. 6. 7. Locate the “Clsid” key below the entry. 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

Section 5 Openness

Accessible Properties

Alarm Event Settings Aspect

Table 22.
Property Name Location Server Data Event tab LimitAutoDisable Limit auto disable box Integer Yes Data Type Writable Comment

PLC Controller Configuration Aspect

Table 23.
Property Name CommInfo DriverInfo FileName Location Communication information box (not shown) (not shown) Process Object Configuration Aspect Data Type String String String Writable Yes No Yes Comment

Table 24.
Property Name ObjectInfo Location Object information box Data Type String Writable Yes Comment

3BSE035041R5001

113

Accessible Properties

Section 5 Openness

Signal Configuration Aspect

Table 25.
Property Name IsInstance Location (not shown) Data Type Writable Comment Whether it is a signal or signal type

Boolean No

ID tab ItemType Variable type box Integer No Binary = 0 Integer = 1 Real = 2 String = 3 Internal = 0 External = 1

ItemUsage Address

Not Connected/Connected option buttons Address box Common tab

Integer String

Yes Yes

UseDefSignalValues Inverted UpdateInterval

Use default signal values check box Inverted check box Update interval box Calculations dialog box

Boolean Yes Boolean Yes Integer Yes

CalcEnabled CalcTypeNo CalcEdge

Accessible for data access check box Calculation type drop-down list Edge selection box

Boolean Yes Integer Integer Yes Yes Leading = 0 Trailing = 1 Both = 2

CalcHysteresis

Hysteresis box

Real

Yes

114

3BSE035041R5001

Section 5 Openness

Accessible Properties

Table 25.
Property Name CalcParameter CalcEnablePreCalc CalcPreParameter CalcEnableLimCalc CalcLimParameter Location Left-hand Parameter box Enable pre treatment check box Parameter box below Enable pre treatment check box Enable limit pre treatment check box Parameter box below Enable limit pre treatment check box Controllable tab UseDefControllableValues Use default controllable values check box Controllable LogOpActions Is controllable check box Log operator actions check box Common - Advanced dialog box CtrlLimEnable CtrlLimHigh CtrlLimLow CtrlResponseEnabled CtrlResponseVar CtrlResponseDelay Control Limits check box High box Low box Response check box Variable box Delay time box Range tab Boolean Yes Real Real Yes Yes Boolean Yes Boolean Yes Boolean Yes Data Type String Writable Yes Comment

Boolean Yes String Yes

Boolean Yes String Yes

Boolean Yes String Integer Yes Yes

3BSE035041R5001

115

Accessible Properties

Section 5 Openness

Table 25.
Property Name UseDefRange Location Use default integer values check box or Use default real values check box LowLimit HighLimit LowLimitPLC HighLimitPLC Unit Precision Low limit box High limit box Low limit in PLC box High limit in PLC box Engineering unit box Single/Double Precision option buttons Alarm Event Configuration Aspect Real Real Real Real String Integer Yes Yes Yes Yes Yes Yes Data Type Writable Comment

Boolean Yes

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. Table 26.
Property Name Location Limiter tab UseDefLimValuesX LimNameX LimTypeX Use default limiter values check box Name box Type drop-down list Boolean Yes String Integer Yes Yes Max = 1 Min = 0 Data Type Writable Comment

116

3BSE035041R5001

Section 5 Openness

Accessible Properties

Table 26.
Property Name LimitX LimHysteresisX Limit box Hysteresis box Event tab UseDefEventValuesX IsEventX TimeStampFromPLCX LogStatusChgOffX LogStatusChgOnX AlarmTextGroupNameX Use default event values check box Is an event check box Time stamped from controller check box Boolean Yes Boolean Yes Boolean Yes Location Data Type Real Real Writable Yes Yes Comment

Log status changes 'Off' check Boolean Yes box Log status changes 'On' check Boolean Yes box Alarm text group drop-down list Event2 tab String Yes

MMSNotifyVariableX EventTextRow1X EventTextBulkX

Box under the When detected String notify variable check box First row of event text box Extended event text box Alarm tab String String

Yes Yes Yes

UseDefAlarmValuesX IsAlarmX AckTypeX

Use default alarm values check box Is an alarm check box Acknowledgement selection box

Boolean Yes Boolean Yes Integer Yes Normal = 0 None = 1 Disappears = 2

3BSE035041R5001

117

Accessible Properties

Section 5 Openness

Table 26.
Property Name PriorityX(1) TimeDelayX Location Priority box Time delay box Alarm2 tab MMSAckVariableX Box under the When acknowledged notify check box Class box String Yes Data Type Integer Integer Writable Yes Yes Comment

ClassX

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.

PLC Dial Configuration Aspect

Table 27.
Property Name IndexCorrection IndexRegister NoOfRegisters PhoneNumber PLCNo Protocol SchedTries Location Index Correction box Index Register box Number Of Registers box Phone Number box Controller Identity box Protocol drop-down list # tries box Data Type Integer String Integer String String String Integer Writable Yes Yes Yes Yes Yes Yes Yes Comment

118

3BSE035041R5001

Section 5 Openness

Example - Change Signal Properties with Bulk Data Manager

Dial Log Configuration Aspect

Table 28.
Property Name UseDefaultPLCValues IndexCorrection IndexRegister NoOfRegisters StartRegister HistoryLog Location Use Default PLC Values check box Index Correction box Index Register box # Registers box Start Register box History Log drop-down list Data Type Writable Comment

Boolean Yes Integer String Integer String String Yes Yes Yes Yes Yes

Example - Change Signal Properties with Bulk Data Manager
1. 2. Start Plant Explorer. Start Excel.

Set up Options

3. 4. 5. 6.

In Excel, click the Activate BDM button Select Bulk Data Manager > Options.

in the Bulk Data Manager toolbar.

Under the General tab, select to Identify Objects by ARD with path. Under the Transaction tab, select By Object as Transaction mode.

Set up Properties

7. 8. 9.

In Plant Explorer, select the Control Structure. Select the desired Generic Control Network object. Select the Control Structure aspect, and then drag it from Plant Explorer to cell A1 in Excel.

3BSE035041R5001

119

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.

Figure 87. Configuration Properties 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.

Figure 88. Column Order
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.

120

3BSE035041R5001

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

Figure 89. Property Values 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. How to configure dialed communication is described in the Section 6, Configure Dialed Communication (Option).

3BSE035041R5001

121

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 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. 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. 2. 3. 4. 5. 6. Time Limit Manual Close Permanent History: Single Controller Cyclic Prioritized

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

122

3BSE035041R5001

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. Table 29. Accessible Call Types
Type of call Manual Close Time Limit Permanent History: Single Controller Prioritized DisconnectPLC Enumeration ManualNormalDMTypeOfCall ManualTMODMTypeOfCall ManualPermanentDMTypeOfCall ManualHistoryDMTypeOfCall PrioritizedDMTypeOfCall

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.

3BSE035041R5001

123

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. 2. Use subscription to wait for real time events. Subscription is available in the Real Time Data Access interface. When the expected event occurs, check the status of relevant connections (lines) with the GetLineStatus method.

124

3BSE035041R5001

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

Sample

Section 5 Openness

126

3BSE035041R5001

Section 6 Configure Dialed Communication (Option)
Introduction
This 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

Basic Preparations

Section 6 Configure Dialed Communication (Option)

Basic Preparations
Before 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. For more information on how to install a modem and set up dialing rules, refer to the modem and Windows documentation.

Create Dialed Controllers

3. 4. 5.

In Plant Explorer, select the desired Generic Control Network object. 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. 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). 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

7.

128

3BSE035041R5001

Section 6 Configure Dialed Communication (Option)

Basic Configuration Example

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. 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: – – – 9. 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.

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 Example
This 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.

3BSE035041R5001

129

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. 2. 3. 4. 5. In Plant Explorer, select the Control Structure. Select the desired Generic Control Network object. Add a Dial Editor aspect. Select the added aspect. 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.

Figure 91. Protocol Setup Tab 6. 7. Under the tab, click Add. The New Protocol dialog box is displayed. Enter a protocol name.

130

3BSE035041R5001

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: Use the Control Panel in Windows to enter these settings. Refer to the Windows documentation for more information. – – – – – 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.

3BSE035041R5001

131

Set up Connections

Section 6 Configure Dialed Communication (Option)

Figure 92. Line Setup Tab 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. 2. 3.

Under the tab, click Add. Enter a name in displayed dialog box. Click OK. The dialog box is closed, and the connection added to the table.

Configure the Connection

4. 5. 6. 7.

Select the added connection in the table. Select a COM port from the Port drop-down list. Select a defined protocol from the Protocol drop-down list. 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.

132

3BSE035041R5001

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. Table 30. Modem Check Examples
Answer “Modem answered OK” “No answer from modem” Description The text string “OK” was received as a reply. 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.

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

3BSE035041R5001

133

Set up Cyclic Calls

Section 6 Configure Dialed Communication (Option)

Figure 93. Cyclic Call Setup Tab 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. 2. 3. 4. 5.

Under the tab, click Add. Enter the call time in hours and minutes in the displayed dialog box. Click Apply in the dialog box. A new call time column is added to the table. If desired, repeat Step 2 to Step 3 for each other call time you want to add. 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). When you want to clear a scheduled call, click in the cell again.

7. 8.

Click Apply. Right-click a cell in the table.

134

3BSE035041R5001

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. You can use the context menu to edit call times, schedule or clear multiple calls, and so on.

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.

Figure 94. Priority Setup Tab 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 settings are for priority levels and not for specific modems. The top-most row corresponds to the top-most priority, and so on downwards.

3BSE035041R5001

135

Priority Guidelines

Section 6 Configure Dialed Communication (Option)

Set or Change Priority Levels for a Protocol

1. 2. 3. 4. 5. 6. 7.

Under the Priority Setup tab, select the tab for the protocol. In the first row, click in the 1st choice column to change the primary use. In the first row, click in the 2nd choice column to change the secondary use. Repeat Step 2 to Step 3 for each additional row. Click Apply. Repeat Step 1 to Step 5 for each other protocol tab. 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

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. Table 31. Five Outgoing Connections
1st choice 2nd choice Cyclic Manual

Manual Cyclic Manual Cyclic Manual

Cyclic

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. 2. 3. The first manual call is served immediately, as one modem has been reserved for manual calls only. The second manual request is queued and will get a modem as soon as one of the cyclic calls completes. 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 32. One Outgoing Connection
1st choice Manual Cyclic 2nd choice

3BSE035041R5001

137

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: Table 33. Three Outgoing Connections
1st choice Manual Cyclic Manual Cyclic Manual 2nd choice

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 34. Many Outgoing Connections
1st choice Manual Cyclic Manual Manual Cyclic Cyclic Manual 2nd choice

138

3BSE035041R5001

Section 6 Configure Dialed Communication (Option)

Set up Dialed Controllers

Table 34. Many Outgoing Connections (Continued)
1st choice Cyclic (...) (Manual) (...) (Cyclic) 2nd choice

• • •

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. 2. In the Control Structure, select a dialed controller part of the Generic Control Network object. 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.

3BSE035041R5001

139

Set up Dialed Controllers

Section 6 Configure Dialed Communication (Option)

Figure 95. PLC Dial Configuration Aspect
Enter Communication Settings

3. 4.

From the Protocol drop-down list, select a defined protocol to use. 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”. Some switchboards require a Wait command before you get an outside line, for example, 0W01234567.

5. 6. 7.

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". Click Apply. Repeat Step 1 to Step 6 for each other dialed controller in the control network.

Finish the Basic Configuration Example

8. 9.

Deploy the configuration for the control network. For more information on how to deploy a configuration, refer to the PLC Connect online help. 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.

140

3BSE035041R5001

Section 6 Configure Dialed Communication (Option)

Dialed History

Dialed History
Dialed 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.

Figure 96. Signal Sampling 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.

3BSE035041R5001

141

PLC Time Stamp

Section 6 Configure Dialed Communication (Option)

Figure 97. Controller Data Buffer 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

142

3BSE035041R5001

Section 6 Configure Dialed Communication (Option)

Dialed History Configuration Example

Figure 98. PLC Time Stamp Registers 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 Example
This 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. 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.

2.

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

3BSE035041R5001

143

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

When the controller name is longer than 22 characters, use only the first 22 characters. – define the object as a structure, that is, select Structure when entering object information for the object.

The signals in the created object are not connected. Don’t change their initial configuration. 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. 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

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. 2. In the Control Structure, select a dialed controller. Select the PLC Dial Configuration aspect, see Figure 100 for an example.

Figure 100. Entered History Settings In the aspect, you can enter default history settings. The communication settings were entered earlier on as part of the basic configuration example. 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. 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. 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. 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.

4.

5.

3BSE035041R5001

145

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

Click Apply. 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. 2. 3. In the Control Structure, select the signal part of a dialed controller. Add a Dial Log Configuration aspect. Select the added aspect.

In the aspect, you can enter signal history settings, see Figure 101 for an example. 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.

Figure 101. Dial Log Configuration Aspect

146

3BSE035041R5001

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. Make sure to select a direct log, and not any hierarchical 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. 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.

6.

7. 8. 9.

Click Apply. Repeat Step 1 to Step 6 for each other signal part of a dialed controller. Deploy the configuration for each affected control network.

10. The dial history configuration is now finished.

3BSE035041R5001

147

Enter Signal History Settings

Section 6 Configure Dialed Communication (Option)

148

3BSE035041R5001

Section 7 Configure IEC 60870 Driver (Option)
Introduction
The IEC driver provides communication with controllers by the IEC60870-5 protocol suite. The protocols 101 (serial) and 104 (network) are supported. The protocols 102 and 103 are not supported. The IEC 60870 driver includes support for: • • • • IEC 60870 controlling station, including transmission protocols IEC 60870-5101 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.

Figure 102. IEC Driver

3BSE035041R5001

149

Configuration Window

Section 7 Configure IEC 60870 Driver (Option)

An IEC 60870 unit (mentioned later in this section) is the same as a controller.

Configuration Window
Limited 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.

Figure 103. Configuration Window 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.

150

3BSE035041R5001

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 Main menu Main toolbar Current configuration Server Configuration

Description Provides access to the File, Edit, View, Tools, and Help menus. Provides shortcut buttons for commands in the main menu (contextsensitive). Displays a tree of configuration objects currently defined in the server. Select an object to display its current settings in the right-hand panel. 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 Statistics panel Reset Statistics Clients Server Time Displays the current settings of the object presently selected in the tree. Displays available statistics for the object presently selected in the tree: Sent, Received, Timed out, Retried, Failed, and Overrun. Resets statistics on the object presently selected in the current configuration tree. Displays the total number of clients presently connected to the server. Displays the current time.

Table 36. File Menu
Command New Open Description Clear the current configuration and start a new one. 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

Commands

Section 7 Configure IEC 60870 Driver (Option)

Table 36. File Menu (Continued)
Command Save Description 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 the current configuration to an XML file. Displays the Save Configuration dialog box to prompt for a new file name.

Save As

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 Close Not to be used. Hide the main configuration window.

Table 37. Edit Menu in the Server Configuration Node
Command Undo/Can't Undo Delete Not implemented. 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”. Display the Insert New Object dialog box used to create a new configuration object under the currently selected configuration object. Description

Define New

Table 38. Edit Menu in the Alias Configuration Node
Command Undo/Can't Undo Rename Not implemented. Rename the currently selected alias group. Description

152

3BSE035041R5001

Section 7 Configure IEC 60870 Driver (Option)

Commands

Table 38. Edit Menu in the Alias Configuration Node (Continued)
Command Delete Alias Group Delete Alias Insert Alias Group Insert New Alias Description Remove the currently selected alias group and all subordinate groups and aliases. Remove the currently selected aliases. Create a new alias group under the currently selected alias group. Display the Insert New Alias dialog box used to create a new alias under the currently selected alias group.

Table 39. View Menu
Command Statistics Properties Reset Statistics Defaults Refresh Options Description Display/hide general communication statistics for the currently selected object. Not implemented. Reset all statistics for the currently selected object to zero. Display the Server Defaults dialog box used to configure the default settings for the various types of communication objects available in the server. Rebuild the tree display of the server configuration and fully expand all branches. Display the Options dialog box used to change general server options.

Table 40. Tools Menu
Command DCOM Configuration Not supported Description

3BSE035041R5001

153

The Options Dialog Box

Section 7 Configure IEC 60870 Driver (Option)

Table 41. Help Menu
Command About Description Display information about the software, which is re-licensed from Matrikon Inc.

The Options Dialog Box
The Options dialog box is used to edit the protocol server options. Do not use the Interface Logging tab. Interface logging is not supported.

General Options

The General settings allow you to edit general server options. To view the General Options: 1. 2. In the Configuration Window, from the View menu, select Options. The Options dialog box appears. Click the General tab to display the General Options settings dialog box, see Figure 104.

Figure 104. General Options

154

3BSE035041R5001

Section 7 Configure IEC 60870 Driver (Option)

The Options Dialog Box

Table 42 describes the commands in the General Options settings dialog box. To have General Options Settings changes take effect, shut down and restart the PLC Connect node. Table 42. General Options
Command Description

Save current configuration Automatically saves the current configuration to the specified file on shutdown before shutting down if selected. Backup copies Load configuration on start-up Filename Automatically keep up to the specified number of backup copies of the configuration file when saving the configuration. Automatically load a configuration from the specified file when starting up if selected. Full 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. Automatically launch the configuration utility when starting up as a local executable (rather than a Windows service) if selected. Prevent the client from adding items other than configured aliases if selected.

Launch configuration program on start-up Restrict items to preconfigured aliases only

General Logging Options

The General Logging settings allow you to edit general logging options. To view the General Logging Options: 1. 2. In the Configuration Window, from the View menu, select Options. The Options dialog box appears. 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.

3BSE035041R5001

155

The Options Dialog Box

Section 7 Configure IEC 60870 Driver (Option)

Figure 105. General Logging Options Table 43. General Logging Options
Command Enable activity logging Commit all log file writes Overwrite old log information General Activity Logging Filename Filter String Filtering Filename Description Enable/disable general activity logging at the specified detail level (High, Medium, Low, or None) if selected. Flush the file buffer after each message logged in case the server is crashing. Overwrite the old log file each time the server starts up if selected. Otherwise, rename the old log file with an underscore (“_”) prefix. 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. Match string for filtered log. 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

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. 2. In the Configuration Window, from the View menu, select Options. The Options dialog box appears. Click the Advanced tab to display the Advanced Options settings dialog box. The Advanced Options settings dialog box appears, see Figure 106.

Figure 106. Advanced Options Table 44 describes the commands in the Advanced Options settings dialog box. To have Advanced Logging Options Settings changes take effect, shut down and restart the PLC Connect node. Table 44. Advanced Options
Command OPC Group Update Rate (minimum) Time granularity Description 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. Determines the maximum resolution for data change detection. Time granularity should always be equal to or less than the minimum group update rate.

Server Configuration
The protocol server requires some configuration. This sub-section shows you how to create and edit objects, using the Configuration Window.

3BSE035041R5001

157

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.

Figure 107. Insert New Object Dialog Box 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. Table 45. Available Objects
Selected Object 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 Insert New Object Dialog Box Options

158

3BSE035041R5001

Section 7 Configure IEC 60870 Driver (Option)

Server Configuration

Table 45. Available Objects (Continued)
Selected Object Network Host One of: Dial-up Connection (not supported) IEC 60870 Unit IEC 60870 Unit None Insert New Object Dialog Box Options

To insert a new object: 1. 2. In the Configuration Window, from the Edit menu, click or, from the Edit menu, select Define New. The Insert New Object dialog box appears. 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. Set the Channel Settings as required, see the following sub-sections. Click OK. The object is created. In order to use the object for communication, you must enable the object. This can be done at any time. Table 46 describes the components that are common to all version of the Create New dialog box.

2. 3.

3BSE035041R5001

159

Server Configuration

Section 7 Configure IEC 60870 Driver (Option)

Figure 108. Create New Dialog Box Table 46. Create New Dialog Box
Component Name Description 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. Enable or disable communication for the object. Optional, user-defined text (64-character maximum) for documentation purposes. Viewing and Editing Serial Channels

Enabled Description

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.

160

3BSE035041R5001

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.

Figure 109. Serial Channel Communication Settings Table 47 describes all the components of the Serial Channel Settings Communication settings. Table 47. Serial Channel Communication Settings
Component Device Baud Parity Data bits Stop bits RTS line Description Local communications resource name (that is COMM port). Baud rate at which the communications device operates. Parity scheme to be used: none, odd, even, mark, space. Number of bits in the bytes transmitted and received (4-8). Number of stop bits to be used (1, 1½, or 2). 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 (data-terminal-ready) line/flow control.

DTR line

3BSE035041R5001

161

Server Configuration

Section 7 Configure IEC 60870 Driver (Option)

Table 47. Serial Channel Communication Settings (Continued)
Component DSR flow control Description 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. 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. 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. Indicates whether XON/XOFF flow control is used during transmission and reception.

DSR sensitivity

CTS flow control

XON/XOFF flow control

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

To edit serial channel communications settings: 1. 2. 3. In the Configuration Window, select a serial channel under Server Configuration. The Serial Channel Settings dialog box appears. Click the Communication tab to view and edit communication settings for this serial channel. 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.

162

3BSE035041R5001

Section 7 Configure IEC 60870 Driver (Option)

Server Configuration

Figure 110. Serial Channel Data Acquisition Settings To edit serial channel data acquisition settings: 1. 2. 3. In the Configuration Window, select a serial channel under Server Configuration. The Serial Channel Settings dialog box appears. Click the Data Acquisition tab to view and edit data acquisition settings for this serial channel. 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. Table 48. Serial Channel Data Acquisition Settings
Component Inter-device delay Reconnect delay Description Minimum amount of time (milliseconds) between the last request/response to/from one unit and the next request to another unit on this channel. Minimum amount of time (seconds) to wait before attempting to recover communications after the communication channel itself has failed.

3BSE035041R5001

163

Server Configuration

Section 7 Configure IEC 60870 Driver (Option)

Table 48. Serial Channel Data Acquisition Settings (Continued)
Component Threshold rate Description 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. 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.

Schedule all polls

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. 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. 2. 3. In the Configuration Window, select a network channel under a serial channel. The Network Channel Settings dialog box appears. Edit the network settings for this network channel. When you have edited the settings, click Apply to apply your change.

164

3BSE035041R5001

Section 7 Configure IEC 60870 Driver (Option)

Server Configuration

Figure 111. Network Channel Settings Table 49. Network Channel Settings
Component Protocol Inter-device delay Reconnect delay Threshold rate Description Internet protocol (IP) type. Normally use Stream for TCP/IP. Minimum amount of time (milliseconds) between the last request/response to/from one unit and the next request to another unit on this channel. Minimum amount of time (seconds) to wait before attempting to recover communications after the communication channel itself has failed. 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. 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.

Schedule all polls

3BSE035041R5001

165

Server Configuration

Section 7 Configure IEC 60870 Driver (Option)

Table 49. Network Channel Settings (Continued)
Component Description

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

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.

Figure 112. Network Host Settings Table 50 describes all the components of the Network Host Settings dialog box. Table 50. Network Host Settings
Component Host name / IP Service name / Port Description DNS host name or “dotted quad” IP address. Blank indicates that the socket binds to a local address and behaves as a server. IP service name or port number.

166

3BSE035041R5001

Section 7 Configure IEC 60870 Driver (Option)

Server Configuration

To edit network host settings: 1. 2. 3. In the Configuration Window, select a network host under a network channel. The Network Host Settings dialog box appears. Edit the network host settings for this host. 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. 2. 3. In the Configuration Window, select a IEC 60870 unit under a Serial Channel or Network Host. The IEC 60870 Unit Settings dialog box appears. Click the Communication tab to view and edit communication settings for this IEC 60870 unit. 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

Server Configuration

Section 7 Configure IEC 60870 Driver (Option)

Figure 113. IEC 60870 Communication Settings Table 51. IEC 60870 Communication Settings
Component Link address Protocol Base poll time Time bias Originator address Link address (Field sizes subsection) Cause of TX Common address Object address Description IEC 60870-5 link address (0-65535). Unit disconnects and reconnects if this parameter changes. Indicates which protocol the unit supports (IEC 60870-5-101 or IEC 608705-104) Normalization time for scheduling polls, stored as UTC HH:MM:SS. Unit re-optimizes if this parameter changes. Minutes to add to a timestamp from the controlled station to convert it to UTC. Cause of transmission originator address (if cause size is 2). Size (in bytes) of the link address field (0, 1, or 2). Size (in bytes) of the cause of transmission field (1 or 2). Size (in bytes) of the common address field (1 or 2). Size (in bytes) of the information object address fields (1, 2, or 3)

168

3BSE035041R5001

Section 7 Configure IEC 60870 Driver (Option)

Server Configuration

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

Figure 114. IEC 60870 Data Acquisition Settings To edit IEC 60870 unit settings: 1. 2. 3. In the Configuration Window, select a IEC 60870 unit under a Serial Channel or Network Host. The IEC 60870 Unit Settings dialog box appears. Click the Data Acquisition tab to view and edit data acquisition settings for this IEC 60870 unit. 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.

3BSE035041R5001

169

Server Configuration

Section 7 Configure IEC 60870 Driver (Option)

Table 52. IEC 60870 Data Acquisition Settings
Component Inter-message delay Reply timeout Retries Reconnect delay Reconnect retries Max interrogate time Command timeout Reset process delay Description Minimum amount of time (milliseconds) between the last request/response to/from this unit and the next request to this same unit. Maximum amount of time (milliseconds) to wait for the response to a request. Maximum number of times to re-send a request and wait for a response before concluding that communication has failed with the unit. Minimum amount of time (seconds) to wait before attempting to reconnect after communication has failed with a unit. 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. Maximum amount of time (seconds) to allow a unit to be interrogated. A value of zero indicates that interrogation must be halted manually. Maximum amount of time (milliseconds) to wait for the response to an application command (regardless of link communication). Minimum amount of time (seconds) to wait before attempting to reconnect after receiving a reset process activation confirmation.

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.

Figure 115. IEC 60870 Advanced Settings

170

3BSE035041R5001

Section 7 Configure IEC 60870 Driver (Option)

Server Configuration

To edit IEC 60870 unit optimization settings: 1. 2. 3. In the Configuration Window, select a IEC 60870 unit under a Serial Channel or Network Host. The IEC 60870 Unit Settings dialog box appears. Click the Advanced tab to view and edit advanced settings for this IEC 60870 unit. 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 Balanced transmission Confirm user data Send short ACK Receive short ACK Allow commands Description Indicates whether the link is balanced (any station can transmit spontaneously) as opposed to unbalanced (only the controlling station can transmit spontaneously). Indicates whether to request confirmation of user data transmissions. No effect on broadcast units. Indicates whether to transmit single-character acknowledgements rather than fixed-length control frames. Indicates whether to accept single-character acknowledgements from the controlled station rather than just fixed-length control frames. 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

Server Configuration

Section 7 Configure IEC 60870 Driver (Option)

Table 53. IEC 60870 Advanced Settings (Continued)
Component Allow C_RD_NA_1 Description Indicates whether to use single-read commands (C_RD) to perform instantaneous polls for monitor items. Otherwise, a device read does nothing. When true, items “freeze” at their last value/quality/timestamp rather than going to bad qualities when the unit is set off scan.

Latch monitor data

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

172

3BSE035041R5001

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. When you have edited the settings, either click another tab to edit the more settings, or click Apply to apply your changes now.

2.

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.

Figure 117. Warning Message To remove an object: 1. 2. In the Configuration Window, select the object you want to remove under Server Configuration. 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

3BSE035041R5001

173

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. 2. 3. In the Configuration Window, select Alias Configuration or a previously configured Alias Group. From the Edit menu, select Insert Alias Group or click folder appears. . A new Alias Group

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. 2. In the Configuration Window, select an Alias Group. 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

Section 7 Configure IEC 60870 Driver (Option)

Alias Configuration

Table 54 describes all the components of the Insert New Alias dialog box. Table 54. Insert New Alias Dialog Box
Component Name Item Path Description Name for the alias (unique within the alias group). Fully-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 inmemory 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 Read only Update Rate Poll when inactive Save Save & Create New Default to new Scaling >> << No Scaling Cancel Coerce the value of the item to the specified type unless “Default” selected. Also serves as the “canonical” data type for the alias. Prevent the client from writing values to the alias if selected. Update rate (milliseconds) to use with the “Poll when inactive” option. Continue updating the value for the alias at the specified update rate if selected, even if the alias is not accessed. Save changes to the alias and hide the dialog box. Save changes to the alias and begin configuring a new one. Pressing Enter activates the “Save & Create New” button rather than the Save button if selected. Enable scaling for the alias (displays scaling options). Disable scaling for the alias (hides scaling options). Discard changes to (abandon creation of) the alias and hide the 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.

3BSE035041R5001

175

Alias Configuration

Section 7 Configure IEC 60870 Driver (Option)

Figure 119. Scaling Options Table 55 describes the Scaling Options for the Insert New Alias dialog box. Table 55. Scaling Options
Tab Component Description Maximum expected raw value from the item. Minimum expected raw value from the item. Maximum desired scaled value for the alias (corresponds to Raw High). Minimum desired scaled value for the alias (corresponds to Raw Low). Clamp the scaled value at the high limit to prevent it from going out of range. Clamp the scaled value at the low limit to prevent it from going out of range. Scaling factor. (No limits are assumed.) Scaling offset. 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.

Linear & Raw High Square Root Raw Low Scaled High Scaled Low Clamp High Clamp Low Gain/Offset Gain Offset Expression Input

176

3BSE035041R5001

Section 7 Configure IEC 60870 Driver (Option)

Alias Configuration

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.

To insert a new Alias: 1. In the Configuration Window, select Alias Configuration or a previously configured Alias Group. It is usually better to create a new alias under an Alias Group rather than directly under the Alias Configuration node. 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.

Figure 120. Contents Table 2. 3. 4. From the Edit menu, select Insert New Alias. The Insert New Alias dialog box, see Figure 118, appears. Enter a name for the Alias in the Name text box. Enter the item Path and ID for the item to which the Alias refers, or click Browse to navigate to the item.

3BSE035041R5001

177

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

Configure the remaining fields as required, see Table 54. 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. 2. In the Configuration Window, select an Alias, and then double-click or press ENTER. The Edit Alias dialog box appears. Make the changes you require.

Removing Aliases

You can easily remove any Alias you have created. To remove an Alias: 1. 2. In the Configuration Window, select one or more Aliases. From the Edit menu, select Delete Alias. The Alias is removed.

178

3BSE035041R5001

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. 2. In the Configuration Window, select an Alias Group. From the Edit menu, select Delete Alias Group or click removed. . The Alias Group is

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. 2. 3. From the File menu, select Export Aliases or click dialog box appears. Enter a file name for the CSV export file. Click Save. The Aliases are exported. . The Export Aliases

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. 2. 3. From the File menu, select Import Aliases or click dialog box appears. Browse to the CSV file name. Click Open. The old Aliases are cleared and the new ones are imported. . The Import Aliases

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

Clearing the Configuration

Section 7 Configure IEC 60870 Driver (Option)

2. 3.

Enter a file name if you are saving the file for the first time. 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. 2. 3. From the File menu, select Open or click box appears. . The Open Configuration dialog

Browse for the configuration file you want to load. 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

Section 7 Configure IEC 60870 Driver (Option)

Notation for Accessing Data Items

Notation for Accessing Data Items
This 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

IEC 60870 ITEMS

Section 7 Configure IEC 60870 Driver (Option)

Table 56.
Item ID M_SP.X Data Type VT_BOOL OV * SB BL NT IV Comments Single-point information (OFF, ON). OV only applies to packed change events (ASDU 20). Double-point information (INTERMEDIATE, OFF, ON, INDETERMINATE). Step position with transient state indication. Bit string. Measurement (normalized/scaled/floating point). Integrated total. End of initialization (most recent cause). Parameter of measurement. Qualifier (Q): 1-63 = kind of parameter.

M_DP.X

VT_UI1

M_ST.X M_BO.X M_ME.X M_IT.X M_EI.0 P_ME:Q.X

VT_I2 VT_UI4 VT_R8 VT_I4 VT_UI1 VT_R8

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.

182

3BSE035041R5001

Section 7 Configure IEC 60870 Driver (Option)

IEC 60870 ITEMS

Table 57.
Item ID C_SC_NA:Q.X C_SC_TA:Q.X C_DC_NA:Q.X C_DC_TA:Q.X C_RC_NA:Q.X C_RC_TA:Q.X C_SE_NA:Q.X C_SE_TA:Q.X C_SE_NB:Q.X C_SE_TB:Q.X C_SE_NC:Q.X C_SE_TC:Q.X C_BO_NA.X C_BO_TA.X Data Type VT_UI1 VT_UI1 VT_UI1 VT_UI1 VT_UI1 VT_UI1 VT_R8 VT_R8 VT_R8 VT_R8 VT_R8 VT_R8 VT_UI4 VT_UI4 N/A N/A 0 = default +128 = select Qualifier (Q) 0 = default 4 = short pulse 8 = long pulse 12 = persistent +128 = select Comments Single command Single command with time. Double command. Double command with time. Regulating step command. Regulating step command with time. Set point command - normalized. Set point command with time normalized. Set point command - scaled. Set point command with time - scaled. Set point command - floating-point. Set point command with time - floatingpoint. Bit string command. Bit string command with time.

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.

3BSE035041R5001

183

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

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

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

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

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

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

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.

Diagnostics
The 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

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.

Troubleshooting
Please 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

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

INDEX
A
Address 30 to 31 Alarm 65, 69, 113, 116 Icon 38, 47, 49 Alarm and Event List 69 AlarmControl Aspect 65 AlarmState Icon 47 Property 45 AlarmWarningCombo Icon 47 Alias 152 Aspect AlarmControl 65 Faceplate 58 Faceplate Element 59 Aspect Link 59 to 60 Change of State 98 Client 73 Communication Parameter 27, 29 Settings 140 Communication Port 128 Communication Server 149 COM-port 131 to 132 Config View 59 Configuration 149 Deploy 31 Configuration Window 149 to 150 Connection 127, 131 Add 132 Configure 132 Setup 131 Connectivity 15 ConnectPLC Method 123 Control Blocked Signals 69 Control Network 19, 25 Setup 17 Control of Signal Value 102 Control Structure 37 to 38 Controller 30 to 31, 113, 127, 139, 141, 150 Address 30 to 31 Buffer Size 141 Collect Historical Data 141 Data Buffer 141 Dialed 127 Driver 26 Index Register 141 Name 144 Setup 139, 145 to 146 Time Stamp 142

B
Buffer Size 141 Bulk Data Manager 112, 119 Button 62 to 63 Rules 64

C
Calculation Type 93 to 94, 96 Call Cyclic 133 Disconnect 122 Manually Ordered 127 Permanent 127 Prioritized 122 Time Limited 127 Call Time 134

3BSE035041R5001

193

Index

Cyclic Call 127, 135 Call Time 134 Setup 133

F
Faceplate Aspect Link 59 to 60 Button 62 Create 58 Edit 59 Indicator 59 Property 66 Faceplate 3Way Valve 56 Faceplate Advanced 56 Faceplate Element Aspect 59 Faceplate Standard 56 Feature 15 Force Lock 55, 62 Signal List 69 Signal Value 101 Function 15

D
Data Buffer 141 Data Items 181 Database 74 DCOM 153 Deploy 31, 46, 55 Design Window 39 to 40, 46 Grid 38 Dial Editor 130 Dial Manager 121, 128 Dial Manager Access 125 Dial Supervisor 141 Dialed Communication 118 to 119, 127 Configuration 129 Dialed Controller 127 Dialed History Configuration Example 143 DialHistoryType 143 Dialing Rules 128 Disabled Control Signals List 69 Disconnect 122 DisconnectPLC Method 123 Display Tool 46 DLL 90, 92 to 94, 97, 103 to 104, 108 Interface 97 Driver 26, 149 to 150

G
Generic Control Network Configuration 19, 25 GetLineStatus Method 124 Graphic Aspect Deploy 46 Graphic Display Aspect 46 to 47, 50, 55 Graphic Element Basic 38 Connect 40 Create 39 Deploy 55 Library 38 Optimized 38, 50 Resize 40 Graphic Element Aspect 46 Graphic Library 38 PLC Process Icons 38, 41 PLC Subelements 38, 41 Graphic Property 41, 43 Window 46, 53

E
Element 39 to 40, 50 Event 69, 97, 99 to 101, 103, 108, 116 Event Extended Options 108 Expression 60 Expression Builder 41, 43, 53

194

3BSE035041R5001

Index

Graphics 37 See also Process Graphics Graphics Builder 37 Connect Element 40 Design Window 38 to 40, 46 Expression Builder 41, 43 Graphic Library 38 Properties Window 41 Toolbox 39

H
Hardware Address 30 to 31 Hierarchical Log 144 History 141 Configuration Dialed 143 Log 144 Settings 145 to 146

Incoming Connection 127 Index Register 141 Indicator 59 Icon 60 Industrial IT 800xA 15 Inheritance 38, 44 Input Rules 64 Interface 75, 90, 97, 108 Introduction 72, 90, 97 IsForced Property 45 Items 181

L
Library 38 Line Add 132 Setup 131 Link 59 to 60 List Alarm 69 Alarm and Event 69 Control Blocked Signals 69 Event 69 Forced Signals 69 Lock 55, 62 Log 144

I
Icon 38, 44, 47, 49 Indicator 60 IEC 60870 149 Configuration 149 Configuration Window 149 to 150 Controlling Station 149 Data Items 181 Driver 149 to 150 Supported Features 149 IEC 60870 Server 149 to 150, 191 to 192 Browse for Items 150 Defaults 153 Edit 150, 154, 157 Settings 151 IEC 60870 Unit 150, 158, 169, 172, 181 Edit 167, 169, 171 Settings 167 to 171 IEC 60870-5-101 149, 168 IEC 60870-5-102 149 IEC 60870-5-103 149 IEC 60870-5-104 149, 168

M
Manually Controllable Signals List 69 Manually Ordered Call 127 Method 75, 103 Modem 128, 135 Check 133

O
Object 58, 113 See also Process Object Object Type Structure 38, 40

3BSE035041R5001

195

Index

OLE ChangeState 109 OLE Interface 108 WriteState 110 OPC Status 41 Optimized 50 Optimized Graphic Elements 38 Option 149 Dialed Controller 127

P
Parameters 96 Permanent Call 127 PLC 15, 113, 118 to 119, 141 PLC Alarm List 69 PLC Connect 15 PLC Faceplate Templates 58, 65 PLC Process Icons 38 to 39, 41, 51 PLC Server 128 PLC Subelements 38 to 39, 41, 48 PLC Time Stamp 142 Port 128, 131 to 132 Pre Treatment 90, 92, 96 Prioritized 122 Priority 136 Guidelines 136 Setup 135 Process 128 Process Graphics 37 Connect 40 Graphics Builder 37 Inheritance 38, 44 Object Type Structure 38, 40 Process Object 37 to 38 Process Object Type 38 See also Graphics Builder Process Object 40, 58, 113 Create 17 Inheritance 38 Process Graphics 37 to 38

Process Object Configuration 21 Process Object Type 41, 58 Inheritance 38 Process Graphics 38 Process Signal 40 Create 17 Properties Window 41 Property 41, 43, 46, 53, 66, 75, 112 Alarm 113, 116 Controller 113 Dialed Communication 118 to 119 Event 116 Process Object 113 Signal 114 Property Pages 41, 49 Protocol 135, 140 Add 130 Configure 131 IEC 60870-5-101 149, 168 IEC 60870-5-102 149 IEC 60870-5-103 149 IEC 60870-5-104 149, 168 Priority 136 Server 149 Setup 130

R
Real Time Database 72 Remote Controller 127 RTDB 72 RTU 15 Rules 64, 128

S
Scheduled Call 127 Server 73, 90, 121, 128, 149 to 151, 191 to 192 Signal 114 Block Control 102 History 146 See also Process Signal

196

3BSE035041R5001

Index

Signal Type 114 Stamp 142 Status Codes 86 Icon 38, 44 OPC 41 StatusBox 45, 51, 54 Switchboard 140

T
Time 134, 142 Time Limited Call 127 Time Stamp 142 Toolbox 39 Tools 151

U
Unit 150, 158, 169 Update 31

V
Variable Access 73, 75, 87 View 151

W
Warning Icon 38, 47, 49 WarningLevel Icon 47 Windowless 46 Windows Registry Database 111 Workplace 55

X
XML File 150

3BSE035041R5001

197

Index

198

3BSE035041R5001

3BSE035041R5001. Printed in Sweden June 2006 Copyright © 2004-2006 by ABB. All Rights Reserved ® Registered Trademark of ABB. ™ Trademark of ABB.

http://www.abb.com Automation Technology Products Wickliffe, Ohio, USA www.abb.com/controlsystems Automation Technology Products Västerås, Sweden www.abb.com/controlsystems Automation Technology Products Mannheim, Germany www.abb.de/controlsystems

Sign up to vote on this title
UsefulNot useful