Вы находитесь на странице: 1из 68

maxLINKS

User’s Guide
277623 Rev. A
Refer to this publication for complete and accurate information that helps you better operate and service Metso
Automation MAX Controls equipment. Your comments and suggestions are welcome.
Metso Automation MAX Controls, Inc.
1180 Church Road
Lansdale, PA 19446
Attention: Manager, Technical Publications

Copyright 2000-2002 by Metso Automation MAX Controls Inc.


Printed in the United States of America
All rights reserved

Metso Automation MAX Controls Inc. • 277623 •


Contents

CHAPTER 1 ...................................................................................................................... 1-1

Introduction................................................................................................................................................................. 1-1
Overview....................................................................................................................................................................1-1
Main Frame Module...........................................................................................................................................1-1
Core Libraries ....................................................................................................................................................1-1
Helper Librarians ...............................................................................................................................................1-2
Transport Libraries ............................................................................................................................................1-3
Startup of maxLINKS ............................................................................................................................................1-3
Accessing the maxLINKS Window ...................................................................................................................1-3

CHAPTER 2 ...................................................................................................................... 2-1

Using the Mini Configurator ..................................................................................................................................... 2-1


Getting Started ...........................................................................................................................................................2-1
Creating Text File to Define Templates and Points ...........................................................................................2-1
Using the Mini Configurator Utility.......................................................................................................................2-2
Starting up Mini Configurator Automatically ....................................................................................................2-2
Stop on Error Checkbox.....................................................................................................................................2-4
Viewing Statistics when File Is Downloaded.....................................................................................................2-4

CHAPTER 3 ...................................................................................................................... 3-1

Creating a Configuration File.................................................................................................................................... 3-1


Overview....................................................................................................................................................................3-1
General Format ..................................................................................................................................................3-1
Other Keywords: ................................................................................................................................................3-2
Configuring Immediate Data Services ...................................................................................................................3-2
Station Configuration.........................................................................................................................................3-3
Link Configuration.............................................................................................................................................3-3
Device Configuration.........................................................................................................................................3-4
Services and Members Configuration ................................................................................................................3-5
Full Name Registration ......................................................................................................................................3-7
Global or Local ..................................................................................................................................................3-7
Services with Members ......................................................................................................................................3-8
User Types .........................................................................................................................................................3-9
A Bit More Detail … .......................................................................................................................................3-10
Scheduling Policies..............................................................................................................................................3-13
Background Refresh - Default..........................................................................................................................3-13
Fixed Scheduling..............................................................................................................................................3-13
No Background Refresh...................................................................................................................................3-14

Metso Automation MAX Controls Inc. • 277623 •


CHAPTER 4.......................................................................................................................4-1

Configuration of the Underlying Layers (Helper and Transport DLLs) .............................................................. 4-1
Overview................................................................................................................................................................... 4-1

CHAPTER 5.......................................................................................................................4-1

Alarm Services Configuration ................................................................................................................................... 5-1


Alarm Example ................................................................................................................................................. 5-1
Alarm Members ................................................................................................................................................ 5-2

CHAPTER 6 ......................................................................................................................6-1

Configuring Redundant maxLINKS ......................................................................................................................... 6-1


Overview................................................................................................................................................................... 6-1
Configurations................................................................................................................................................... 6-1
Readable Members................................................................................................................................................ 6-1
Writeable Members............................................................................................................................................... 6-3
Configuration Examples........................................................................................................................................ 6-3
Activate Redundancy ........................................................................................................................................ 6-3
MASTER / SLAVE Configuration examples.................................................................................................... 6-4
DUAL Configuration example .......................................................................................................................... 6-5
SINGLE Configuration examples ..................................................................................................................... 6-5
Redundancy operation........................................................................................................................................... 6-5
MASTER / SLAVE context .............................................................................................................................. 6-5
MASTER operation .......................................................................................................................................... 6-6
SLAVE operation.............................................................................................................................................. 6-7
DUAL context................................................................................................................................................... 6-8
DUAL operation ............................................................................................................................................... 6-8
SINGLE context................................................................................................................................................ 6-9
SINGLE operation ............................................................................................................................................ 6-9

CHAPTER 7 ......................................................................................................................7-1

Link status and MsvSpy ............................................................................................................................................. 7-1


Overview................................................................................................................................................................... 7-1
Link status members.............................................................................................................................................. 7-2
Using the MsvSpy Utility...................................................................................................................................... 7-2

APPENDIX A .................................................................................................................... A-1

ModbusHelper DLL Service Selector and Properties............................................................................................. A-1


Overview...................................................................................................................................................................A-1

APPENDIX B .................................................................................................................... B-1

msvComTransport DLL Service Selectors and Properties......................................................................................B-1


Overview...................................................................................................................................................................B-1

APPENDIX C .................................................................................................................... C-1

iv Metso Automation MAX Controls Inc. • 277623•


MsvDPUComTransport DLL Service Selectors and Properties.............................................................................C-1

APPENDIX D.................................................................................................................... D-1

msvModbusPlus Transport DLL Service Selectors and Properties .......................................................................D-1


Overview...................................................................................................................................................................D-1

APPENDIX E.....................................................................................................................E-1

BOSHelper DLL Service Selectors and Properties..................................................................................................E-1


Overview................................................................................................................................................................... E-1
Selector General Format ....................................................................................................................................... E-1
Selector Type Identifier ........................................................................................................................................ E-2
Selector Object Number........................................................................................................................................ E-2
Selector Variable Name ........................................................................................................................................ E-3
Blower Variable Names .................................................................................................................................... E-3
Sequence Variable Names................................................................................................................................. E-4
Simple example of a configuration ....................................................................................................................... E-5
BOSHelper Properties........................................................................................................................................... E-6

APPENDIX F ..................................................................................................................... F-1

MsvODBCHelper DLL Service Selectors and Properties ....................................................................................... F-1


Selector General Format ........................................................................................................................................... F-1
Selector Direction ............................................................................................................................................. F-1
Selector Table ................................................................................................................................................... F-1
Selector Key, Column ....................................................................................................................................... F-1
Selector Field Value.......................................................................................................................................... F-1
Selector Time .................................................................................................................................................... F-2
Service Address ................................................................................................................................................ F-2
Service properties ............................................................................................................................................. F-2

APPENDIX G ................................................................................................................... G-1

Allen-BradleyHelper DLL Service Selectors and Properties ................................................................................. G-1


Overview...................................................................................................................................................................G-1
PLC-2 Addressing.................................................................................................................................................G-2
PLC-2/1774-PLC Addressing ...........................................................................................................................G-2
PLC-3 Addressing.................................................................................................................................................G-3
PLC-5 Addressing.................................................................................................................................................G-4
Logical ASCII Addressing....................................................................................................................................G-4

APPENDIX H.................................................................................................................... H-1

ModbusHelper32 DLL Service Selector and Properties ........................................................................................ H-1


Overview...................................................................................................................................................................H-1
Chapter 1

Introduction

Overview
maxLINKs is the module of the maxSTATION software that interfaces the maxDNA
system to external devices that are not produced by Metso Automation MAX
Controls. This represents a wide and heterogeneous class of equipment ranging from
machinery control subsystems often implemented with PLCs like sootblowers or
burner management systems, to some specific devices like turbine controls or
chemical analysis instrumentation needed in water treatment. From the hardware
perspective, maxLINKS is a workstation running Windows NT/2000; this ensures
that a large number of hardware/software solutions can be found on the market to
satisfy the need to interface to a specific environment.

It is possible that the maxLINKS workstation will be mounted inside a cabinet, near
the DPUs, and in that case, a rugged industrial computer may be needed to host the
program.

maxLINKS is a multifaceted interface, which can be used to integrate many external


devices into the maxDNA system interacting with the control and/or the supervision
areas.

To support this, maxLINKS is modular in design, built around a set of components


that can be connected together to build different configurations.

Basically, maxLINKS is comprised of the following modules:

§ The main frame.


§ The maxLINKS core libraries.
§ The maxLINKS helper libraries.
§ The maxLINKS transport libraries.

Main Frame Module


The main frame module is used to load the core libraries, schedule them and to allow
the user to call basic dialogs to show their internal status.

Core Libraries
The core libraries, which have their own specific tasks, are always loaded regardless
of the maxLINKS configuration in use. The only currently implemented core library
is Immediate Data acquisition. Core libraries can be added at a later date as needed.

Metso Automation MAX Controls Inc. • 277623 •


maxLINKS User’s Guide

For example, if direct support of events and alarms is required in maxLINKS


because this information needs to be acquired from an external system instead of
being computed inside the box.

Helper Librarians
Even though maxLINKS can be configured for many different kinds of
environments, maxLINKS stability is maintained by keeping to a minimum the
number of embedded functions in the main maxLINKS module.

Different environments have different configuration needs, different ways of


addressing data and different performances and loads on the system hosting
maxLINKS.

The invariant part of maxLINKS is mainly an interface between the Software


Backplane and one or more dynamic link libraries called helper libraries.

1-2 Metso Automation MAX Controls Inc. • 277623 •


Introduction

Helper libraries take care of the specific needs of an environment and interface it to
the maxLINKS module through the helper interface that remains stable (it is
presumed) for each environment that a specific helper DLL interfaces.

Transport Libraries
Helper libraries may or may not contain the code for the communication over a
media. They can use other libraries to send and receive data (we will call them
transport libraries beyond this point) which expose a transport interface used by the
helper libraries to ask for message delivery.

The transport libraries also implement the helper interface to allow access through
the same mechanisms used for field variables, to information inside the libraries
containing statuses and/or statistics about the communication media.

From this point the word maxLINKS refers to the invariant part of the software,
while the sum of maxLINKS and one or more helper and transport libraries is
referred to as a configuration.

The functions of maxLINKS are essentially targeted to the following areas:

• Configuration of services and members.


• Configuration of the underlying layers (helper and transport DLLs).
• Response to the Software Backplane for Read/Write/Subscribe on the
configured points.

Startup of maxLINKS
To start maxLINKS manually locate the file maxLINKS.exe in c:\Mcs\Links\ and
double click on it.

To start maxLINKS automatically at MAXSTATION startup, add the following line


to the bottom of the c:\custom\sbp\start.ini file.

0, c:\mcs\Links\maxLINKS.exe, maxLINKS

Once maxLINKS is started, it will automatically place the following icon on the
Tray Area.

Accessing the maxLINKS Window


Click the maxLINKS icon to open the following window:

Metso Automation MAX Controls Inc. • 277623 • 1-3


maxLINKS User’s Guide

The window contains the following information:

Component: This displays the name of one of the maxLINKS modules


that has been loaded.

Status: This indicates the status of this particular maxLINKS


modules, such as “loaded.”

1-4 Metso Automation MAX Controls Inc. • 277623 •


Chapter 2

Using the
Mini Configurator

Getting Started
Creating Text File to Define Templates and Points
To define points used in maxLINKS, create a text file in Notepad. The formatted text
file may be edited and downloaded to maxLINKS using Mini Configurator. Refer to
this chapter for a description of the Mini Configurator and how to use it to edit and
download a point configuration.

Refer to the following chapters for a description of the format and commands that
compose a configuration file.

The following figure shows a finished configuration file incorporating commands for
creating points.

Metso Automation MAX Controls Inc. • 277623 •


maxLINKS User’s Guide

Using the Mini Configurator Utility


Use the Mini Configurator to edit a configuration file and download the file to
maxSTORIAN.

To access the Mini Configurator utility:

Click the Start button on the Windows NT Task Bar, point to Programs, maxDNA,
maxSTORIAN Utilities, and then click MiniConf to open the Configurator Dialog.

Starting up Mini Configurator Automatically


To start the utility automatically, add the following line to the bottom of the
c:\custom\sbp\start.ini file after the entry for maxLINKS:

0,c:\mcs\links\maxLINKS.exe, maxLINKS
2,c:\mcs\sbp\MiniConf.exe, MiniConf,
c:\mcs\links\Configurations\Config1.txt

Note: In order to allow MiniConf to execute without user intervention, it is necessary


to specify the full pathname of the configuration file that is to be downloaded.

2-2 Metso Automation MAX Controls Inc. • 277623 •


Using the Mini Configurator

If for some reason, the file can not be located, the MiniConf dialog box will remain
displayed on the screen, waiting for the user to specify and download a valid
Configuration file.

When you open the utility, by default it searches for configuration files in the
c:\Mcs\Sbp directory, but you can specify a different directory and place your
configuration files where you choose. The Configurator dialog lists the name of the
configuration file in the Configuration File field. Click the Browse button to the right
of the field to locate other configuration files.

Click the Edit buttons to edit a configuration file in notepad. See the following
figure:

Click Download to download the configuration in the currently selected


Configuration File for immediate use by maxLINKS. You may view the statistics as
the configuration is being downloaded.

Click the Stop button to cease the downloading of the currently selected
Configuration File.

Click the Resume button to once again start the download of the currently selected
Configuration File that was previously paused or stopped.

Click the Pause button to stop the download of the currently selected Configuration
File currently in progress. It will remain paused, or stopped, until you restart it using
the Resume button.

Metso Automation MAX Controls Inc. • 277623 • 2-3


maxLINKS User’s Guide

Stop on Error Checkbox


Check the Stop on Error checkbox to cause the download to stop whenever an error
is encountered. If this is not checked, it will simply continue with the next command
after an error and go to completion of the entire Configuration file.

Viewing Statistics when File Is Downloaded


When a configuration is created and downloaded, statistics appear on the main Mini
Configurator dialog. See the following figure.

The main portion of the MiniConf window lists the services (configured points)
along with the following current statistics.

Status: The SBP status associated with each command line. The Software
backplane, used to configure these points, registers them as services
and members.
Service: This consists as the first portion of the entered command from the
Configuration file.
Type: The type of data which was passed as a parameter on this particular
command. This is of type: PCHAR, FLOAT, or LONG.
Data: The data portion of the command which was passed, such as which
type of storage to use, which compression to use, the min or max time,
or the delta.

Configuration Errors: (located near the upper right corner). This indicates the total
number of software backplane (sbp) errors that were encountered during the
download of the Configuration.

2-4 Metso Automation MAX Controls Inc. • 277623 •


Chapter 3

Creating a Configuration File

Overview
The Configuration file is the means by which you will configure points for use in
maxLINKS. The file is a text file of the format shown below. This file is used as
input into the Mini Configurator, which will download this information to
maxLINKS. Refer to this chapter for a discussion of the format and commands
necessary for maxLINKS configuration.

General Format
Each line in the configuration file represents a write instruction in the general form:

<service name> <type> <value>

Metso Automation MAX Controls Inc. • 277623 •


maxLINKS User’s Guide

Where:

<service name> Is the service to write to (e.g.


_MSV_IMMDATA.ADD_SERVICE).

<type> Is the type of the write data among the following:

VAR_BYTE,
VAR_SHORT,
VAR_LONG,
VAR_FLOAT,
VAR_DOUBLE,
VAR_UBYTE,
VAR_USHORT,
VAR_TIME,
VAR_PCHAR

<value> is the value to write.

Other Keywords:
# A #char as the first character in a line marks that line as a
comment (# this is a comment line).

PAUSE The word PAUSE instead of a service name stops the


configuration download at that point; the configuration can be
resumed using the RESUME button.

DELAY The word DELAY, instead of a service name, followed by a


decimal number, stops the configuration download at that point
for the specified amount of seconds (DELAY 15 halts the
configuration download for 15 seconds).

REWIND The word REWIND, instead of a service name, restarts the


configuration download from the beginning.

Configuring Immediate Data Services


To configure maxLINKS immediate data, use the following main steps:

§ Station configuration
§ Link configuration
§ Devices configuration
§ Services configuration
§ Members configuration

Here is an example:

3-2 Metso Automation MAX Controls Inc. • 277623 •


Creating a Configuration File

§ A PLC that uses the Modbus protocol is connected to the serial line COM1
at 9600 baud.
§ Read Registers 100, 102 and 105 as well as Coils 200, 204 and 230.

NOTE: Lines in BOLD are lines to write in the configuration file.

Station Configuration
The station configuration is mandatory if there are redundant devices. To configure
stations write to the following members of _MSV_IMMDATA:

NET_A MAXnet Network A

NET_B MAXnet Network B

PORT IP Port for Primary<>Secondary communication (Default


8000).

LOCAL_STATION Station number of this box.

REMOTE_STATION Station number of the other box.

A station configuration example:

_MSV_IMMDATA.NET_A PCHAR 195.100.38.0

_MSV_IMMDATA.NET_B PCHAR 196.100.38.0

_MSV_IMMDATA.PORT PCHAR 3400

_MSV_IMMDATA.LOCAL_STATION PCHAR 34

_MSV_IMMDATA.REMOTE_STATION PCHAR 35

Link Configuration
To configure the link, create a service representing the link to use as a destination for
additional configurations.

_MSV_IMMDATA.ADD_SERVICE PCHAR ComStatus

If the PLC is on a serial line, associate the service with the appropriate transport:

_MSV_IMMDATA.ComStatus.HELPER PCHAR MsvComTransport

And to specify the COM port to work on:

_MSV_IMMDATA.ComStatus.SELECTOR PCHAR COM1

Lastly, commit the configuration:

Metso Automation MAX Controls Inc. • 277623 • 3-3


maxLINKS User’s Guide

_MSV_IMMDATA.ComStatus.COMMIT ULONG 0

After the commitment, specify parameters of the new service:

_MSV_IMMDATA.ComStatus.BAUD.SET_PROPERTY PCHAR 9600

_MSV_IMMDATA.ComStatus.BITS.SET_PROPERTY PCHAR 8

_MSV_IMMDATA.ComStatus.PARITY.SET_PROPERTY PCHAR EVEN

_MSV_IMMDATA.ComStatus.STOP_BITS.SET_PROPERTY PCHAR 1

From this point the hardware and a service (ComStatus) are configured reflecting the
status of the communication line.

The kind of information available on ComStatus and the available properties


depends on the nature of the transport library used. Refer to the Appendices for the
particular information for each library.

Device Configuration
Devices are an important concept in maxLINKS configuration since there is a one to
one correspondence between device designators and software backplane
connections. A device represents a physical apparatus offering one or more service
and members. Communications failure will make the quality of the relevant software
backplane connection go bad, resulting in the software backplane looking for another
route to reach the data (if any).

A device is not a communication line; more than one device can be accessed through
a single communication line, and a failure of one device does not affect other devices
that may be using the same communication line.

Alarms on communication lines are handled through services offered by the transport
libraries while alarms on the devices are handled through the services offered by the
helper libraries.

The following line initializes the device for the previous example:

_MSV_IMMDATA.ADD_DEVICE PCHAR PLC

Then some configuration must be done:

_MSV_IMMDATA.PLC.HELPER PCHAR ModbusHelper

(use the Modbus protocol library).

_MSV_IMMDATA.PLC.TRANSPORT PCHAR MsvComTransport

(use the COM port transport library).

_MSV_IMMDATA.PLC.ADDRESS PCHAR COM1

(use com1)

3-4 Metso Automation MAX Controls Inc. • 277623 •


Creating a Configuration File

_MSV_IMMDATA.PLC.REDUNDANCY_MODE PCHAR PRIMARY

(this box is the primary data source for that device)

_MSV_IMMDATA.PLC.SCAN_TIME ULONG 15000000

(programs a base scan time of 15 seconds)

_MSV_IMMDATA.PLC.COMMIT PCHAR PLC

(commits the device)

The device recognizes and supports four redundancy modes:

SINGLE Device has NO redundancy.

PRIMARY Device is the primary data source for data.

SECONDARY Device is the secondary data source for data.

DUAL Device is one of the redundant sources for data.

The main difference between DUAL and PRIMARY/SECONDARY is that device


scanning is synchronized for PRIMARY/SECONDARY while it is done in parallel
in a DUAL configuration.

Services and Members Configuration


Once a device is created, services can be added to it.

_MSV_IMMDATA.PLC.ADD_SERVICE PCHAR REGISTER_100

(create the service named “register_100”)

_MSV_IMMDATA.PLC. REGISTER_100.SELECTOR PCHAR 1:03:100

(link this service with the register 100)

_MSV_IMMDATA.PLC. REGISTER_100.COMMIT PCHAR REGISTER_100

(commits the service)

There are two forms of the commit command:

Writing a name (REGISTER_100) causes it to be used as the UNIQUE identifier for


the service.

Writing ULONG 0 causes the service to be available through the full name
(/PLC/REGISTER_100), but only if the FULLNAME flag was previously raised.

Metso Automation MAX Controls Inc. • 277623 • 3-5


maxLINKS User’s Guide

NOTE: In the previous example the name REGISTER_100 can be used again as a
service in another device but NOT again in a commit command since these
identifiers are checked to be unique.

_MSV_IMMDATA.PLC.ADD_SERVICE PCHAR REGISTER_102

(create the service named “register_102”)

_MSV_IMMDATA.PLC. REGISTER_102.SELECTOR PCHAR 1:03:102

(link this service with the register 102)

_MSV_IMMDATA.PLC. REGISTER_102.COMMIT ULONG 0

(commits the service)

_MSV_IMMDATA.PLC.ADD_SERVICE PCHAR
REGISTER_105

(create the service named “register_105”)

_MSV_IMMDATA.PLC. REGISTER_105.SELECTOR PCHAR 1:03:105

(link this service with the register 105)

_MSV_IMMDATA.PLC. REGISTER_105.COMMIT ULONG 0

(commit the service)

_MSV_IMMDATA.PLC.ADD_SERVICE PCHAR COIL_200

(create the service named “coil_200”)

_MSV_IMMDATA.PLC. COIL_200.SELECTOR PCHAR 1:01:200

(link this service with the coil 200)

_MSV_IMMDATA.PLC. COIL_200.COMMIT ULONG 0

(commit the service)

_MSV_IMMDATA.PLC.ADD_SERVICE PCHAR COIL_204

(create the service named “coil_204”)

_MSV_IMMDATA.PLC. COIL_204.SELECTOR PCHAR 1:01:204

(link this service with the coil 204)

_MSV_IMMDATA.PLC. COIL_204.COMMIT ULONG 0

(commit the service)

3-6 Metso Automation MAX Controls Inc. • 277623 •


Creating a Configuration File

If the full name is enabled, after the commitment the services will be registered in
Registration and Routing (RRS) as:

/PLC/REGISTER_100
/PLC/REGISTER_102
/PLC/REGISTER_105
/PLC/COIL_200
/PLC/COIL_204

Full Name Registration


To enable or disable the full name registration, 1 or 0 must be written to the
FULL_NAME member of the _MSV_IMMDATA service:

_MSV_IMMDATA.FULL_NAME ULONG 0

(Disable full name registration)

_MSV_IMMDATA.FULL_NAME ULONG 1

(Enable full name registration)

The default is full name registration disabled.

In the commit command instead of ULONG 0 a string can be written, and in that
case this will be used as a unique identifier for the service.

_MSV_IMMDATA.PLC.ADD_SERVICE PCHAR COIL_230

(create the service named “coil_230”)

_MSV_IMMDATA.PLC. COIL_230.SELECTOR PCHAR 1:01:230

(link this service with the coil 230)

_MSV_IMMDATA.PLC. COIL_230.COMMIT PCHAR A4SG039

(commits the service)

If full name registration is enabled this service will be registered as/PLC/COIL_230


and as A4SG039.

Global or Local
If registrations are intended to be global (that is, known to all maxSTATIONs) then
the EXPORT member of _MSV_IMMDATA must be set to 1.

_MSV_IMMDATA.EXPORT ULONG 0

(the services declared after this command are local to this maxSTATION; this is the
default)

Metso Automation MAX Controls Inc. • 277623 • 3-7


maxLINKS User’s Guide

_MSV_IMMDATA.EXPORT ULONG 1

(the services declared after this command are exported to all other maxSTATIONs)

Services with Members


It is also possible to create more complex services with members.

First, a container service is created with a size of two elements.

_MSV_IMMDATA.PLC.ADD_SERVICE PCHAR VALVE

_MSV_IMMDATA.PLC.VALVE.TYPE PCHAR BYTE

_MSV_IMMDATA.PLC.VALVE.SIZE ULONG 2

_MSV_IMMDATA.PLC.VALVE.SELECTOR PCHAR 01:05:124

_MSV_IMMDATA.PLC.VALVE.COMMIT PCHAR A4SG465

Then two members are mapped to the service at the desired offset.

_MSV_IMMDATA.PLC.VALVE.ADD_MEMBER PCHAR OPENED

_MSV_IMMDATA.PLC.VALVE.OPENED.OFFSET ULONG 0

_MSV_IMMDATA.PLC.VALVE.OPENED.COMMIT ULONG 0

_MSV_IMMDATA.PLC.VALVE.ADD_MEMBER PCHAR CLOSED

_MSV_IMMDATA.PLC.VALVE.CLOSED.OFFSET ULONG 1

_MSV_IMMDATA.PLC.VALVE.CLOSED.COMMIT ULONG 0

Members are never registered.

If full name registration is enabled, members can be accessed as:

/PLC/VALVE.OPENED /PLC/VALVE.CLOSED (full name form) -or-

A4SG465. OPENED A4SG465. OPENED (unique id form)

Otherwise just the last form is available.

Members can also specify a completely new and different set of attributes such as:

_MSV_IMMDATA.PLC.VALVE.ADD_MEMBER PCHAR DESCRIPT

_MSV_IMMDATA.PLC.VALVE. DESCRIPT.TYPE PCHAR PCHAR

_MSV_IMMDATA.PLC.VALVE. DESCRIPT.SIZE ULONG 0

_MSV_IMMDATA.PLC.VALVE. DESCRIPT.HELPER PCHAR ODBChelper

3-8 Metso Automation MAX Controls Inc. • 277623 •


Creating a Configuration File

_MSV_IMMDATA.PLC.VALVE. DESCRIPT.ADDRESS PCHAR ConfDataBase

_MSV_IMMDATA.PLC.VALVE. DESCRIPT.SELECTOR PCHAR


R,POINTS,A4SG465,TAG,DESCRIPTION

_MSV_IMMDATA.PLC.VALVE. DESCRIPT.COMMIT ULONG 0

The previous configuration adds a member to the /PLC/VALVE service (A4SG465)

This new member uses the ODBC library to access the configuration database, and is
mapped on a field containing the description of the service.

Accessing /PLC/VALVE.DESCRIPT or A4SG465.DESCRIPT retrieves a string of


up to 60 characters with such information.

User Types
When services represent the same thing, and they have a few members, the
configuration can be annoying.

In that case a user type can be configured and then used in any place where a type is
required.

In the previous example of the valve a MYVALVE data type can be declared as
follows:

First, a container service is created with a size of two elements:

_MSV_IMMDATA.ADD_USERTYPE PCHAR MY_VALVE_TYPE

_MSV_IMMDATA. MY_VALVE_TYPE.TYPE PCHAR BYTE

_MSV_IMMDATA. MY_VALVE_TYPE.SIZE ULONG 2

_MSV_IMMDATA. MY_VALVE_TYPE.COMMIT ULONG 0

Then two members are mapped on the type at the desired offset:

_MSV_IMMDATA. MY_VALVE_TYPE.ADD_MEMBER PCHAR OPENED

_MSV_IMMDATA. MY_VALVE_TYPE.OPENED.OFFSET ULONG 0

_MSV_IMMDATA. MY_VALVE_TYPE.OPENED.COMMIT ULONG 0

_MSV_IMMDATA. MY_VALVE_TYPE.ADD_MEMBER PCHAR CLOSED

_MSV_IMMDATA. MY_VALVE_TYPE.CLOSED.OFFSET ULONG 1

_MSV_IMMDATA. MY_VALVE_TYPE.CLOSED.COMMIT ULONG 0

Then the configuration of the service will be:

_MSV_IMMDATA.PLC.ADD_SERVICE PCHAR
VALVE

Metso Automation MAX Controls Inc. • 277623 • 3-9


maxLINKS User’s Guide

_MSV_IMMDATA.PLC.VALVE.TYPE PCHAR MY_VALVE_TYPE

_MSV_IMMDATA.PLC.VALVE.SELECTOR PCHAR 01:05:124

_MSV_IMMDATA.PLC.VALVE.COMMIT PCHAR A4SG465

A Bit More Detail …


maxLINKS can configure services in a flexible way allowing different naming
schemes and data access policies.

A point name in maxLINKS is a string of the form:

[{'/' <path component>}] '/' <service> [{'.' <member>}]

§ The path component could be either a simple identifier grouping services and
other path components, or it can be a device designator.
§ The software backplane primitives can be applied only to services and members.
§ Only services and members hold data and they are mapped on the external data
in a way that is independent of the implementation of the relevant helper library;
also, members can have submembers.
§ The naming scheme is flat and/or hierarchic. Applications can specify a unique
identifier or the full path name to access data.
§ Most of the configuration attributes have a “per service” or “per member”
granularity, but member values assigned to devices or path components will be
inherited by elements down in the hierarchy. This dramatically improves the number
of writes that are required to configure maxLINKS because most of the common
parameters can be written once.
§ maxLINKS uses only one service for immediate data configurations:
_MSV_IMMDATA. It has a few members for individual configurations:
ADD_HID - Adds a path component.

ADD_DEVICE - Adds a device.

ADD_SERVICE - Adds a service to a device or to a path component.

ADD_MEMBER - Adds a member to a service.

ADD_USER_TYPE - Adds a user type.

DELETE - Deletes a service, a member, a device or a path


component.

§ Before the deletion of a path component, a device or a service and all of its
dependents must already be deleted. Otherwise, DELETE returns an error value.
§ These members are also predefined in the objects created by the configuration
with the following exceptions:
ADD_HID - Is predefined only in path components and devices.

ADD_DEVICE - Is predefined only in path components.

3-10 Metso Automation MAX Controls Inc. • 277623 •


Creating a Configuration File

ADD_SERVICE - Is predefined only in path components and devices.

ADD_MEMBER - Is predefined only in members and services.

§ The configuration takes place in subsequent steps adding one path component,
device, service or member at a time.

After names are instantiated, some attributes listed in the following table must be
specified:

Attribute name Write type Description


HELPER Null terminated string The name of the helper library that must be
used with that service/member.
TRANSPORT Null terminated string The name of the transport library that must
be used with that service/member.
ADDRESS Null terminated string The address that must be used with that
Unsigned long integer service/member.
ALT_ADDRESS Null terminated string An alternate address that can be used with
Unsigned long integer that service/member.
SELECTOR null terminated string An implementation dependent string for
selecting the appropriate data in the host
environment.
SCAN_TIME Unsigned long integer The value in microseconds for the required
update time. 0xFFFFFFFE is a special value
that means "Low Scan.”
TYPE Null terminated string The requested type for the data. The helper
Unsigned long integer library tries to convert if possible the
original type into the requested type.
OFFSET Unsigned long integer Only for members. Represents the element
number assigned to the member in the
parent memory.
SIZE Unsigned long integer The service size in elements.
ZERO Every numerical type Scaling zero for the point
RANGE Every numerical type Scaling range for the point
REF_ZERO Every numerical type Instrument zero
REF_RANGE Every numerical type Instrument range
DELTA Float Default delta if applicable.

Attribute name Write type Description


FAR_WRITE ULONG Writing 1 to this member causes the response
to the software backplane on writes to be
delayed until an acknowledge is received from
the remote device. Otherwise, the default
behavior is that the response to the software
backplane on writes is issued after the message
is sent to the remote device.
SCHEDULING ULONG Writing 0 to this member causes background
scan for the service/member to be enabled;
This is the default scan policy.

Metso Automation MAX Controls Inc. • 277623 • 3-11


maxLINKS User’s Guide

Writing 1 to this member causes the requested


SCAN_TIME to always be honored in polling
a variable. The min_time members in the
software backplane subscribe requests will be
ignored. Writing 2 to this member causes no
background scan for the service/member.
Scanning will be started after a subscription,
and the first software backplane update is
delayed until the remote device replies.
INIT_VALUE Every An initial value for the service.
numerical
type
FULLNAME ULONG Writing 1 enables the registering of the service
full name.
Writing 0 disables the registering of the
service full name. This is the default.
EXPORT ULONG Writing 1 enables the export of the registered
services.
Writing 0 disables the export of the registered
services. This is the default.
SET_PROPERTY Null Writing to this member causes the requested
terminated property in the helper library to be assigned.
string
COMMIT Unsigned Writing 0 to this member causes the
long null programmed service/member configuration to
terminated be committed to the helper library and causes
string the registration of the service in the RRS.
Optionally a string can be passed; in that case,
this is registered as the unique service name.

Attribute name Write type Description


REDUNDANCY_MODE PCHAR One of the following modes:
- SINGLE
- PRIMARY
- SECONDARY
- DUAL
(Refer to the appropriate appendix for details).
NET_A PCHAR The MAXnet “A” IP address of the
maxLINKS station.
NET_B PCHAR The MAXnet “B” IP address of the
maxLINKS station.
PORT PCHAR The IP port for Primary/Secondary
communications (Default 8000).
LOCAL_STATION PCHAR The station number of this box.
REMOTE_STATION PCHAR The station number of the redundant box.
TAKEOVER ULONG Writing 1 to this member causes the primary
box to try to regain control of the device.
YIELD ULONG Writing 1 to this member causes the primary

3-12 Metso Automation MAX Controls Inc. • 277623 •


Creating a Configuration File

box to yield control of the device to the


secondary box.
REFERENCE PCHAR A write to this member causes the
service/member to maintain a subscription to
the referenced point.
The obtained value is then used to update the
remote data.

Scheduling Policies
Background Refresh - Default
The default scheduling policy for a service/member is Background Refresh.

All the services/members in this state are scanned at a rate specified with the
SCAN_TIME attribute.

If 0xFFFFFFFF is written to SCAN_TIME then those services are scanned when the
communication link (whatever it is) is idle.

Background refresh offers a compromise between communication load and the speed
of the first reply; but as the load of the foreground requests is high as the value sent
in the first update is older, this can cause strange effects if this time becomes too
high. Moreover, there is no guarantee that all the foreground messages can be
scheduled in time.

The following describes the behavior of the software backplane primitives in


Background Refresh mode.

READ WRITE SUBSCRIBE


The data returned are the The data are written to the internal The data returned in the first
actual data in the internal buffer. The helper library is update message are the
buffer. The response message requested to schedule an urgent actual data in the internal
is forwarded upon the message a soon as possible. The buffer. If there is someone
reception of the read request. response message is forwarded asking for a rate higher or
immediately or at the reception of the equal to the one requested in
acknowledge from the remote device the subscription, no further
in accordance with the FAR_WRITE requests are made to the
attribute. helper library; otherwise it
will be requested to
schedule a message at a rate
equal to min_time.

Fixed Scheduling
Writing 1 to the SCHEDULING member sets the scheduling policy for that
service/member to Fixed Scheduling.

Metso Automation MAX Controls Inc. • 277623 • 3-13


maxLINKS User’s Guide

All the services/members in this state are scanned at a rate specified with the
SCAN_TIME attribute.

If 0xFFFFFFFF is written to SCAN_TIME then those services are scanned when the
communication link is idle (this value is not recommended for Fixed Scheduling).

Fixed Scheduling has a heavy communication load, but the message scheduling is
configuration dependent and can be used when it is required to be sure of the
acquisition time or when this is the behavior of the host environment.

The following describes the behavior of the software backplane primitives in Fixed
Scheduling mode.

READ WRITE SUBSCRIBE


The data returned are the The data are written to the internal The data are scanned
actual data in the internal buffer. The response message is every SCAN_TIME
buffer. The response forwarded immediately or at the microseconds and it is
message is forwarded reception of the acknowledge from sent to the client in
upon the reception of the the remote device in accordance accordance with
read request. with the FAR_WRITE attribute. min_time and max_time
in the subscription
request.

No Background Refresh
Writing 2 to the SCHEDULING member sets the scheduling policy for that
service/member to No Background refresh.

None of the services/members in this state are scanned until a request is made for
that point.

Any value written to SCAN_TIME is ignored.

“No background refresh “scheduling has an average light communication load but
the reply suffers a delay due to the initial communication setup that could be very
high for devices connected with slow communication channels.

Moreover, there is no guarantee that all the messages can be scheduled in time, as
the number of requests increase.

The following describes the behavior of the software backplane primitives in No


Background Refresh mode.

READ WRITE SUBSCRIBE


The helper library is requested to The data are written to the internal If there is someone asking for a
schedule an urgent message as buffer. The helper library is rate higher than or equal to the
soon as possible. The response requested to schedule an urgent one requested in the
message is forwarded at the message a soon as possible. The subscription, no further requests

3-14 Metso Automation MAX Controls Inc. • 277623 •


Creating a Configuration File

reception of the data from the response message is forwarded are made to the helper library.
remote device. immediately or at the reception of This subscription uses this
the acknowledge from the remote previously declared service. If
device in accordance with the not, the helper library will be
FAR_WRITE attribute. requested to schedule an urgent
message as soon as possible. At
the reception of this message, the
first update message is sent to
the SBP client and the helper
will be requested to schedule
subsequent messages at a rate
equal to min_time.

Metso Automation MAX Controls Inc. • 277623 • 3-15


Chapter 4

Configuration of the Underlying Layers


(Helper and Transport DLLs)

Overview
Often the helper and the transport require some configuration data to be specified.
Examples include the baud rate and word format information for a serial port. This is
the purpose of the SET_PROPERTY member (Alias: SET).

Each service can have properties and they can be assigned by writing to

<service name>.<property name>.SET_PROPERTY


The property value is always a string and the property names are independent of the
implementation of the helper/transport library (Refer to Appendices).

Since only services have attributes, to write to attributes in a transport library a


service must be instantiated beforehand.

Service selectors for transport library are implementation dependent (Refer to


Appendices).

Metso Automation MAX Controls Inc. • 277623 •


Chapter 5

Alarm Services Configuration

maxLINKS Alarm Services are simple services that add alarm capability to the
points. This is more useful in DBM-based systems, in order to avoid using DPU
resources for simple alarms. Configuration of alarms is done by writing to the
members of the _MSV_ALARM_DATA service.

Alarm Example
Assume that in maxLINKS there is a digital point SB_XA_1_1053 and an analog
point SB_TA_1_1053; here is an example of a configuration for alarms coming from
these two points.

_MSV_ALARM_DATA.ADD_ALARM PCHAR SB_XA_1_1053

_MSV_ALARM_DATA.SB_XA_1_1053.BASE_MSG PCHAR BMS1

(the base message is the first part of the alarm string)

_MSV_ALARM_DATA.SB_XA_1_1053.RISE_MSG PCHAR Air Flow > 25%

(the rise message is added to the base message on rising edge)

_MSV_ALARM_DATA.SB_XA_1_1053.FALL_MSG PCHAR Air Flow < 25%

(the fall message is added to the base message on falling edge)

_MSV_ALARM_DATA.SB_XA_1_1053.EDGE UBYTE 1

(alarm on rising edge)

_MSV_ALARM_DATA.SB_XA_1_1053.ALM_FLAGS ULONG 0

(flags à 2=alarm 1=event 0=both)

_MSV_ALARM_DATA.SB_XA_1_1053.SEVERITY SHORT 1

(alarm severity)

_MSV_ALARM_DATA.SB_XA_1_1053.TYPE_ALARM PCHAR PA

(alarm type)

Metso Automation MAX Controls Inc. • 277623 •


maxLINKS User’s Guide

_MSV_ALARM_DATA.SB_XA_1_1053.COMMIT ULONG 0

(activate point sampling)

_MSV_ALARM_DATA.ADD_ALARM PCHAR SB_TA_1_1053

_MSV_ALARM_DATA. SB_TA_1_1053.BASE_MSG PCHAR BMS1(the base


message is the first part of the alarm string)

_MSV_ALARM_DATA. SB_TA_1_1053.LIMIT_HH FLOAT 90.0

(the HH limit)

_MSV_ALARM_DATA. SB_TA_1_1053.LIMIT_H FLOAT 70.0

(the H limit)

_MSV_ALARM_DATA. SB_TA_1_1053.LIMIT_L FLOAT 40.0

(the L limit)

_MSV_ALARM_DATA. SB_TA_1_1053.LIMIT_HH FLOAT 10.0

(the LL limit)

_MSV_ALARM_DATA. SB_TA_1_1053.DEAD_BAND FLOAT 2.0

(alarm dead band)

_MSV_ALARM_DATA. SB_TA_1_1053.SEVERITY SHORT 1

(alarm severity)

_MSV_ALARM_DATA. SB_TA_1_1053.TYPE_ALARM PCHAR PA

(alarm type)

_MSV_ALARM_DATA.SB_TA_1_1053.ALM_FLAGS ULONG 0

(flags à 2=alarm 1=event 0=both)

_MSV_ALARM_DATA. SB_TA_1_1053.COMMIT ULONG 0

(activate point sampling)

Alarm Members
This is the complete list of the alarm members:

5-2 Metso Automation MAX Controls Inc. • 277623 •


Alarm Services Configuration

Attribute name Write type Description


SCAN_TIME ULONG The sampling time of the point.
Default: 1 second.
DELTA Every numerical type Software Backplane delta.
LIMIT_HH Every numerical type HH limit.
LIMIT_H Every numerical type H limit.
LIMIT_L Every numerical type L limit.
LIMIT_LL Every numerical type LL limit.
DEAD_BAND Every numerical type Alarm deadband
EDGE UBYTE == 1 Alarm on rising edge.
== 0 Alarm on falling edge.
BASE_MSG PCHAR Base message.
RISE_MSG PCHAR Message on rising edge
FALL_MSG PCHAR Message on falling edge
SEVERITY SHORT Alarm severity
ALM_FLAGS ULONG 2=alarm 1=event 0=both
UNIT PCHAR Engineering unit
TYPE_ALARM PCHAR Alarm type among:
PA
SY
OA
EA
SET_DOMAIN PCHAR An SBP domain if required.

FAST_SUBSCRIBE ULONG == 1 Use fast subscribe.


== 0 Use normal subscribe.

The FAST_SUBSCRIBE flag controls the way data is sampled.

The alarm library (MsvAlarmData.dll), just like any maxLINKS core library, can
take advantage of an internal interface (Fast Path API) to access the immediate data
values. This is faster than going to SBP when exchange of data is internal to the
maxLINKS process (such as in this case). The use of the fast subscribe can be
excluded by writing 0 to the FAST_SUBSCRIBE member in the case that SBP
routing is required.

Metso Automation MAX Controls Inc. • 277623 • 5-3


Chapter 6

Configuring Redundant maxLINKS

Overview
maxLINKS can be configured to be redundant. If the primary maxLINKS station
fails than the secondary starts to collect data from the link and to supply these data to
the clients.

Configurations
maxLINKS supports four different device configurations:

MASTER
SLAVE
DUAL
SINGLE

Each configured device in maxLINKS exposes eight predefined members to monitor


the device status, and writeable members for manual operation.

Readable Members
The readable members are:

STATUS

This member displays the device status as a string.

The possible values it can assume depend on the kind of device (MASTER /
SLAVE).

For a MASTER device:

MASTER_DEVICE_CONFIGURATED =2
MASTER_DEVICE_IDLE =3
MASTER_DEVICE_STOP =4
MASTER_DEVICE_DOUBTFUL =5
MASTER_DEVICE_CHANGING =6

Metso Automation MAX Controls Inc. • 277623 •


maxLINKS User’s Guide

MASTER_DEVICE_SCANNING =7
For a SLAVE device:

SLAVE_DEVICE_IDLE =8
SLAVE_DEVICE_SCANNING =9
SLAVE_DEVICE_STOP = 10
SLAVE_DEVICE_CONFIGURATED = 11
SLAVE_DEVICE_CHANGING = 12

For a DUAL device:

DUAL_CONFIGURATED = 13
DUAL_SCANNING = 14
DUAL_SCANNING2 = 15
DUAL_DOUBTFUL = 16
DUAL_STOP = 17
DUAL_CHANGING = 18

For a SINGLE device (default behavior for a device):

SINGLE_DEVICE_SCANNING = 19
SINGLE_DEVICE_CONFIGURATED = 20
SINGLE_DEVICE_CHANGING = 21
SINGLE_DEVICE_STOP = 22

STS

Has the same meaning of STATUS but the value is numerical.

HELPERQUALITY

This member contains the current helper quality.

SCANNING

This member is 1 only if the device is in SCANNING state.

DOUBTFUL

This member is 1 only if the device is in DOUBTFUL state.

CHANGING

This member is 1 only if the device is in CHANGING state.

IDLE

This member is 1 only if the device is waiting.

STOPPED

6-2 Metso Automation MAX Controls Inc. • 277623 •


Configuring Redundant maxLINKS

This member is 1 only if the device is stopped.

Writeable Members
The writeable members are:

START

Writing a 1 to this member starts a previously stopped device. It only works if the
device is in STOPPED state. For a MASTER device START has the same behavior
as TAKEOVER.

STOP

Writing 1 to this member stops a device. It can restarted only writing to the START
member.

If a device is in STOPPED state it ignores all requests.

TAKEOVER

Writing 1 to this member of the MASTER device causes the SLAVE to stop the
scanning and the MASTER to takeover from it.

YIELD

Writing 1 to this member of the MASTER device causes the MASTER to stop itself
and put the SLAVE in the SCANNING state.

Configuration Examples
Activate Redundancy
To use the redundancy capability, the maxLINKS machine must know the network
addresses of the other machine.

Suppose two machines have the names MAXLINKA and MAXLINKB.

MAXLINKA has two network cards with the following network configuration:

NET A: IP 172.16.160.1 NETMASK 255.255.0.0


NET B: IP 172.17.160.1NETMASK 255.255.0.0

MAXLINKB has two network cards with the following network configuration:

NET A: IP 172.16.160.5 NETMASK 255.255.0.0

Metso Automation MAX Controls Inc. • 277623 • 6-3


maxLINKS User’s Guide

NET B: IP 172.17.160.5NETMASK 255.255.0.0

Both maxLINKS instances must belong to the same network; thus, the configuration
will be:

_MSV_IMMDATA.NET_A PCHAR 172.16.160.0


_MSV_IMMDATA.NET_B PCHAR 172.17.160.0

then MAXLINKA will have the following station configuration:

_MSV_IMMDATA.LOCAL_STATION PCHAR 1
_MSV_IMMDATA.REMOTE_STATION PCHAR 5

and MAXLINKB will have the following station configuration; note that the
difference is that the station numbers are swapped.

_MSV_IMMDATA.LOCAL_STATION PCHAR 5
_MSV_IMMDATA.REMOTE_STATION PCHAR 1

Each maxLINKS opens a UDP socket on a port 8000 (by default); this value can be
changed with:

_MSV_IMMDATA.PORT ULONG 5400

Of course if you change the port number, you must configure the same port number
on both maxLINKS.

The redundancy parameters LOCAL_STATION, REMOTE_STATION, NET_A,


NET_B, PORT are relative to the whole configuration and must be specified only
one time in all of the configuration procedure of every maxLINKS instance as the
very first entry.

MASTER / SLAVE Configuration examples


To configure a DEVICE as MASTER the redundancy must be activated as shown
before. Then the following line will be added to the device configuration file before
committing the device:

_MSV_IMMDATA.<DEVICENAME>.REDUNDANCY_MODE PCHAR MASTER

Example:

_MSV_IMMDATA.ADD_DEVICE PCHAR mhi-b

_MSV_IMMDATA.mhi-b.REDUNDANCY_MODE PCHAR MASTER

_MSV_IMMDATA.mhi-b.COMMIT PCHAR mhi-b

To configure a DEVICE as SLAVE the redundancy must be active.

Then the following line must be added to the device configuration file before
committing the device:

6-4 Metso Automation MAX Controls Inc. • 277623 •


Configuring Redundant maxLINKS

_MSV_IMMDATA.<DEVICENAME>.REDUNDANCY_MODE PCHAR SLAVE

Example:

_MSV_IMMDATA.ADD_DEVICE PCHAR mhi-b

_MSV_IMMDATA.mhi-b.REDUNDANCY_MODE PCHAR SLAVE

_MSV_IMMDATA.mhi-b.COMMIT PCHAR mhi-b

Note :

PRIMARY and SECONDARY can be used as aliases for MASTER and SLAVE.

DUAL Configuration example


To configure a DEVICE as SLAVE the redundancy must be active. Then the
following line will be added to the device configuration file before committing the
device:

_MSV_IMMDATA.<DEVICENAME>.REDUNDANCY_MODE PCHAR DUAL

Example:

_MSV_IMMDATA.ADD_DEVICE PCHAR mhi-b

_MSV_IMMDATA.mhi-b.REDUNDANCY_MODE PCHAR DUAL

_MSV_IMMDATA.mhi-b.COMMIT PCHAR mhi-b

SINGLE Configuration examples


Single configuration is the default behavior for a device.

Redundancy operation
MASTER / SLAVE context
In a MASTER / SLAVE context only one of the devices works at a time. If both are
present, the MASTER has the priority, and only if the master has a problem will the
master let the slave start data collection.

The slave will also start autonomously after a timeout on communication with the
master. The device in the SCANNING state will accept subscriptions from the
clients, and updates the other device with the current value coming from the link.

The exchange of roles is controlled by the quality of data, the status of the other
device, or the external commands YIELD and TAKEOVER.

Metso Automation MAX Controls Inc. • 277623 • 6-5


maxLINKS User’s Guide

In each state of the device, the quality value of the connection, displayed by the
Software Backplane Registration and Routing Service, assumes a specific meaning;
in fact, quality value indicates the state of the device. The following section explains
the relationship between state and quality value.

MASTER operation
When the commit for a master device is executed, the master goes to the
MASTER_DEVICE_CONFIGURATED state and sets the quality of the connection
to 50. It changes state only if one of the conditions listed below is true:

A status message from the slave is not received after a timeout. The MASTER goes
in the MASTER_DEVICE_SCANNING state.

§ The slave, already started, is in SLAVE_DEVICE_CONFIGURATED or


SLAVE_DEVICE_CHANGING. The master will wait in the
MASTER_DEVICE_CONFIGURATED state until the slave changes its state or
a status message timeout occurs.
§ The slave is already started and is in SLAVE_DEVICE_IDLE state or
SLAVE_DEVICE_SCANNING state. If the slave is scanning, the master goes in
the MASTER_DEVICE_IDLE state.

When the master device is in the MASTER_DEVICE_SCANNING state, the


services which depend on it become active, and it can accept subscriptions; the
quality of connection reflects the value of the helper quality. The device remains in
this state until one of the conditions listed below is true:

§ The quality of the data is low. The MASTER lets the slave start data collection,
and then puts itself into the MASTER_DEVICE_CHANGING state.
§ The YIELD member of the MASTER device is written. The MASTER lets the
slave start data collection, and then puts itself in the
MASTER_DEVICE_CHANGING state.

When the device is in the MASTER_DEVICE_IDLE state, it is in a state of


inactivity; it waits for some event to change its state and sets the connection quality
to 55.

§ After a status message timeout the MASTER goes in the


MASTER_DEVICE_SCANNING state.
§ If the slave is in SLAVE_DEVICE_IDLE status the master goes in the
MASTER_DEVICE_SCANNING state.

When the device is in the MASTER_DEVICE_DOUBTFUL state, the master has


encountered some problems scanning the link and it has let the slave start data
collection; this happens because the quality of data is low, or it has been told to
release the link with a YIELD command. In this state the quality of connection is set
to 44.

6-6 Metso Automation MAX Controls Inc. • 277623 •


Configuring Redundant maxLINKS

To restart the master one of the conditions listed below must be true:

§ After a status message timeout the master goes in the


MASTER_DEVICE_SCANNING state.
§ A 1 is written to the TAKEOVER member of the device.

When the device is in the MASTER_DEVICE_CHANGING state, it means that it is


working to disable all services, and it is rejecting all the subscriptions. This is a
temporary state; it will stay in this state until all subscriptions are rejected. The
quality of connection is set to 83.

When the device is in the MASTER_DEVICE_STOP state, it means that it is not


working and it is leaving the slave alone. The slave behavior will be the same as that
of a single device. The quality is set to 35, and it will change state only if a 1 is
written to START or TAKEOVER; then the slave will put itself in the
MASTER_DEVICE_IDLE state.

The stop state is used for link maintenance purposes. In this state the master WILL
NOT automatically take control of the link.

SLAVE operation
When a commit on a slave device is executed, it goes to the
SLAVE_DEVICE_CONFIGURATED state and sets the quality of connection to 50.

It will change state only if one of the following conditions is true:

§ A status message timeout occurs; the device goes in the


SLAVE_DEVICE_SCANNING state.
§ The master is already started in the MASTER_DEVICE_CHANGING state; the
slave waits until the MASTER changes state or a status message timeout occurs.
§ The MASTER, already started in the MASTER_DEVICE_CONFIGURATED
state, MASTER_DEVICE_IDLE state, or MASTER_DEVICE_DOUBTFUL
state; the slave goes in the SLAVE_DEVICE_IDLE state.
§ The MASTER is already started in the MASTER_DEVICE_DOUBTFUL state;
the slave goes in the SLAVE_DEVICE_SCANNING state.

When the slave device is in the SLAVE_DEVICE_SCANNING state, all the link
services that depend on it become active, it accepts subscriptions from clients, and
the quality of connection will be the value of the helper quality. The device remains
in this state until the status of the master device is MASTER_DEVICE_SCANNING
or MASTER_DEVICE_IDLE. Then the slave puts itself in
SLAVE_DEVICE_CHANGING state. When the slave device is in the
SLAVE_DEVICE_IDLE state it is in a state of inactivity. It waits for some event to
change its state and sets the connection quality to 55.

§ If a status message timeout occurs, it goes in the SLAVE_DEVICE_SCANNING


state.

Metso Automation MAX Controls Inc. • 277623 • 6-7


maxLINKS User’s Guide

§ If the master is in MASTER_DEVICE_DOUBTFUL state, the slave puts itself


in the SLAVE_DEVICE_SCANNING state.

When the slave device is in the SLAVE_DEVICE_CHANGING state it is working


to disable services and to reject all subscriptions. This state is intended to be a
temporary state; it will go in the SLAVE_DEVICE_IDLE state when all the
subscriptions are rejected. The quality of connection is set to 83.

When the device is in the SLAVE_DEVICE_STOP state, it is not working and is


leaving the master alone. The master behavior will be the same as that of a single
device. The quality is set to 35 and will change state only if a 1 is written to START
or TAKEOVER; then the slave will put itself in the SLAVE_DEVICE_IDLE state.

The stop state is used for link maintenance purposes. In this state the slave WILL
NOT automatically take the control of the link.

DUAL context
In a dual context both devices work simultaneously. This mode of operation can be
used when the link has two separate paths and they can be operated simultaneously.
The devices configured as DUAL have a member named SUBSCRIPTION_LOAD
that quantifies the maximum number of consecutive subscriptions that a device can
receive. When a device reaches this limit, it lowers its connection quality, and gives
the other device the task to answer the subscription requests and so on. If a device
has a problem or goes down, its subscriptions are redirected to the other
automatically.

In every device state, the connection quality value, displayed by RRS, assumes a
specific meaning; the quality value reflects the state of the device. The following
section explains the relationship between states and quality values.

DUAL operation
When a commit on a dual device is executed, it puts itself into
DUAL_CONFIGURATED state and after a while it goes in the DUAL_SCANNING
state. The quality of connection in DUAL_CONFIGURATED is set to 50.

When a DUAL device is in the DUAL_SCANNING state it sets its quality to 94 and
changes state only if one of the following conditions is true:

§ The subscription count goes over the maximum subscription load. The device
puts itself in the DUAL_SCANNING2 state.
§ The helper quality goes low. The device put itself into DUAL_DOUBTFUL
state.

When a DUAL device is in the DUAL_SCANNING2 state, it sets its quality to 90


and changes state only if one of the following conditions is true:

6-8 Metso Automation MAX Controls Inc. • 277623 •


Configuring Redundant maxLINKS

§ The companion device is not present, it has some problem, or it has reached its
quota of subscriptions. The device puts itself in the DUAL_SCANNING state.
§ The companion device is scanning, and the link quality goes down; the device
puts itself in the DUAL_DOUBTFUL state.

When a DUAL device is into DUAL_DOUBTFUL state it sets its quality to 44 and
changes state only if one of two conditions is true: either a status message timeout
occurs, or helper quality is good (the device puts itself into DUAL_SCANNING
state).

When the device is in the DUAL_DEVICE_STOP state it is not working, and is


leaving the other alone. The behavior of the other will be the same as that of a single
device. The quality is set to 35 and it will change state only if a 1 is written to
START or TAKEOVER; then the device will put itself in the DUAL_SCANNING
state.

The stop state is used for link maintenance purposes. In this state the device WILL
NOT take the control of the link.

SINGLE context
This is the default behavior of the device; it scans continuously until someone stops
it.

SINGLE operation
When a commit on a single device is executed, it puts itself in the
SINGLE_CONFIGURATED state and after a while it goes to the
SINGLE_DEVICE_SCANNING state. The quality of connection in
SINGLE_DEVICE_CONFIGURATED is set to 50.

When a single device is in the SINGLE_DEVICE_SCANNING state, its quality


reflects the helper quality. It changes state only if a 1 is written to the STOP member.
The device puts itself in the SINGLE_DEVICE_CHANGING state.

When the device is in the SINGLE_DEVICE_CHANGING state, it is disabling


services and rejecting all subscriptions. It is a temporary state. It goes to the
SINGLE_DEVICE_STOP state when all the subscriptions are rejected. The quality
of connection is set to 83.

When a SINGLE device is in the SINGLE_DEVICE_STOP state its quality is set to


35, and it changes state only if a 1 is written to the START member; then the device
puts itself into the SINGLE_DEVICE_SCANNING state.

The stop state is used for link maintenance purposes. In this state the device DOES
NOT HAVE control of the link.

Metso Automation MAX Controls Inc. • 277623 • 6-9


Chapter 7

Link status and MsvSpy

Overview
The transport library exposes, for every port, six members that are in the order:

§ Link status
§ Transmitted messages
§ Received messages
§ Bad messages
§ SpyID
§ SpyBufferSize

The following example shows how to configure a maxLINKS type for a ComPort.

# COMPORT data type

_MSV_IMMDATA.ADD_USER_TYPE PCHAR COMPORT


_MSV_IMMDATA.COMPORT.TYPE PCHAR BYTE
_MSV_IMMDATA.COMPORT.SIZE ULONG 6
_MSV_IMMDATA.COMPORT.COMMIT PCHAR COMPORT

_MSV_IMMDATA.COMPORT.ADD_MEMBER PCHAR STS


_MSV_IMMDATA.COMPORT.STS.OFFSET ULONG 0
_MSV_IMMDATA.COMPORT.STS.COMMIT ULONG 0

_MSV_IMMDATA.COMPORT.ADD_MEMBER PCHAR TX
_MSV_IMMDATA.COMPORT.TX.OFFSET ULONG 1
_MSV_IMMDATA.COMPORT.TX.COMMIT ULONG 0

_MSV_IMMDATA.COMPORT.ADD_MEMBER PCHAR RX
_MSV_IMMDATA.COMPORT.RX.OFFSET ULONG 2
_MSV_IMMDATA.COMPORT.RX.COMMIT ULONG 0

_MSV_IMMDATA.COMPORT.ADD_MEMBER PCHAR BAD


_MSV_IMMDATA.COMPORT.BAD.OFFSET ULONG 3
_MSV_IMMDATA.COMPORT.BAD.COMMIT ULONG 0

_MSV_IMMDATA.COMPORT.ADD_MEMBER PCHAR SPY_ID


_MSV_IMMDATA.COMPORT.SPY_ID.OFFSET ULONG 4
_MSV_IMMDATA.COMPORT.SPY_ID.COMMIT ULONG 0

_MSV_IMMDATA.COMPORT.ADD_MEMBER PCHAR SPY_BUFFER_SIZE


_MSV_IMMDATA.COMPORT.SPY_BUFFER_SIZE.OFFSET ULONG 5
_MSV_IMMDATA.COMPORT.SPY_BUFFER_SIZE.COMMIT ULONG 0

Metso Automation MAX Controls Inc. • 277623 •


maxLINKS User’s Guide

The maxLINKS transports are protocol independent.

Link status members


STS is 0 if the communication is good and 1 if none. The status initially is 0 and
becomes 1 if some error occurs and remains in this state until a successful message is
received.

The conditions that will result in bad status are:

The port cannot be used; for example the addressed port does not exist in the system
or is in use.

A timeout occurs.

TX shows the number of transmitted messages.

RX shows the number of received messages, including the incomplete messages.

BAD shows the number of messages that are incompatible for the used protocol,
such as CRC or checksum errors, timeouts etc.

SPY_ID and SPY_BUFFER_SIZE are reserved to interface with the spy tool.

Using the MsvSpy Utility


Use msvSPY, a separate tool, to spy the incoming and outgoing byte streams on the
link. The maxLINKS transports are protocol dependent.

To launch msvSPY, manually locate the executable MsvSpy.exe in c:\mcs\Links\ and


double click on it. The following dialog appears:

7-2 Metso Automation MAX Controls Inc. • 277623 •


Link Status and MsvSpy

To connect the spy tool with the transport and with the port you want to observe,
enter the appropriate service and selector in the dialog.

Choose a size for the exchange buffer; spy allows buffer sizes from 32Kbytes to
1Kbyte. The buffer size depends on the protocol in use. It should be enough to
capture a few cycles.

Click the Configure transport button. If the connection with the transport is
successful all the controls in the dialog will be enabled as shown in the following
figure.

Metso Automation MAX Controls Inc. • 277623 • 7-3


maxLINKS User’s Guide

Click the Start button to cause the spy to begin collecting data. When the buffer is
full, data appear in the list control. For each message it shows the direction
(incoming / outgoing), a time stamp with millisecond precision, and the byte stream.
The following figure shows an example of the captured data:

7-4 Metso Automation MAX Controls Inc. • 277623 •


Link Status and MsvSpy

Although the messages on the link can be observed in this way, often it is required to
spy the protocol for a long time in search of a violation to the protocol or for a
specific event. msvSPY lets you specify a trigger.

A trigger is an arbitrary string of bytes that must be matched. The trigger can also
specify a mask to exclude some bytes, or even specify single bits from the mask; an
optional delay can be specified allowing you to watch what happened before the
trigger occurs. The message with the first occurrence of the trigger is clearly marked
by an icon, as is shown in the following figure.

Use the find tool to search in the current buffer for an occurrence of specific data.
The find lets you specify a mask to be able to exclude from the match some parts of
the protocol.

Click the Export data button to save the current buffer in a binary file for later
inspection.

Metso Automation MAX Controls Inc. • 277623 • 7-5


Appendix A

ModbusHelper DLL Service


Selector and Properties

Overview
The selector format for the ModbusHelper is the following:

SS:TT:XXXX[:<qualifier>]

Where:

SS is the slave address.


TT is the Modbus type XXXX is the offset of the item.

Values for TT are:

01 Coils
02 Inputs
03 Holding registers
04 Input registers
05 Force single coil
06 Preset single register
08 Diagnostics

<qualifier> is used to specify special data treatment for words.

N,M means extract N bits starting at bit M (For instance a small bit field
value of 3 bits starting at bit 7 of the register number 100 can be selected
as: 01:03:100:3:7)

F means join two consecutive registers in a float value. (For instance, a


float value joining registers number 200 and 201 can be selected as
01:03:200:F)

L means join two consecutive registers in a long value. (For instance, a long
value joining registers number 200 and 201 can be selected as
01:03:200:L)

D means join four consecutive registers in a double value. (For instance, a


double value joining registers number 200, 201,202 and 203 can be selected

Metso Automation MAX Controls Inc. • 277623 •


maxLINKS User’s Guide

as 01:03:200:D)

The layout of the messages changes dynamically. It is driven by the current set of
points accessed from the various clients. The library examines all the current running
requests and joins them when possible to reduce to a minimum the required number
of MODBUS messages.

For TT=08 - XXXX specifies a diagnostic subfunction rather than an offset.

Only Return Query Data (0000) is implemented for the purpose of checking the
connection.

Each service in the Modbus helper DLL has the following properties available:

Property Meaning
READ_COIL_STS_MAX The maximum number of coils that can be requested in a
read coil message.
(Default 2000)
READ_INPUT_STS_MAX The maximum number of inputs that can be requested in a
read input message.
(Default 2000)
READ_HOLD_REG_MAX The maximum number of registers that can be requested in a
read holding registers message.
(Default 125)
READ_INPUT_REG_MAX The maximum number of registers that can be requested in a
read input registers message.
(Default 125)
FORCE_MULT_COILS_MAX The maximum number of coils that can be sent in a force
multiple coils message.
(Default 800)
FORCE_MULT_REG_MAX The maximum number of inputs that can be sent in a force
multiple inputs message.
(Default 100)
CRC_CHECK 0 – Disables CRC or LRC check (Modbus+ mode)
1 – Enables CRC or LRC check (Default )
SKIP_ADDRESS 0 – Message contains the slave address field (Default )
1 – Message does not contain a slave address (Modbus+
mode )
ASCII_MODE 0 – RTU mode (Default)
1 – ASCII mode.
Be sure that xxxxx_MAX properties are consistent with the PLC for correct
operation.

Modbus plus requires:

CRC_CHECK = 0 SKIP_ADDRESS =1

A-2 Metso Automation MAX Controls Inc. • 277623 •


Appendix B

msvComTransport DLL Service


Selectors and Properties

Overview
This library offers transport services on the PC COM ports for dumb and smart
multiport boards.

It has been tested with the internal COM1 and COM2 ports, a dumb eight port
Digiboard DigiCHANNEL PC/8 and a smart Comtrol RocketPort PCI/16.

The selector format for the MsvComTransport is:

COMn with 1 < n < 20

Each service in the MsvComTransport DLL has the following properties available:

Property Meaning
BAUD The baud rate for the port
(No default).
BITS The word length for the port: 5-6-7-8
(No default)
N.B.- RocketPort supports only 7-8 bits.
PARITY The parity mode for the port: NONE-ODD-EVEN-MARK-
SPACE
(No default)
N.B.- RocketPort supports only NONE-ODD-EVEN.
STOP_BITS The number of stop bits for the port: 1-1.5-2
(No default)
N.B. – RocketPort supports only 1-2 bits.
N.B:

Flow control properties will also be available.

Metso Automation MAX Controls Inc. • 277623 •


Appendix C

MsvDPUComTransport DLL Service


Selectors and Properties

This transport library allows maxLINKS to use a serial port physically located on a
DPU to talk with external devices.

The selected DPU must have a “named” serial buffer atom instantiated on it.

The selector format for the MsvComTransport is simply the tag name of the relevant
serial buffer atom.

This library also supports MsvSpy.

Each service in the MsvComTransport DLL has the following properties available:

Property Meaning
BAUD The baud rate for the port
The default is the configured baud rate on the serial buffer atom.
BITS The word length for the port : 5-6-7-8
The default is the configured word length on the serial buffer atom..
PARITY The parity mode for the port : NONE-ODD-EVEN-MARK-SPACE
The default is the configured parity on the serial buffer atom.
STOP_BITS The number of stop bits for the port : 1-1.5-2
The default is the number of configured stop bits on the serial buffer atom.
FLOW_CONTRO The desired flow control :
L NONE
XON/XOFF
CTS/RTS
The default is the configured flow control on the serial buffer atom.

This is an example of a port configuration for maxLINKS:

Assume that somewhere on maxNET there is a DPU with a serial buffer atom with “FOO_PLC” as
the tagname.

_MSV_IMMDATA.ADD_USER_TYPE PCHAR DPU_PORT


_MSV_IMMDATA.DPU_PORT.TYPE PCHAR BYTE
_MSV_IMMDATA.DPU_PORT.SIZE ULONG 6
_MSV_IMMDATA.DPU_PORT.COMMIT PCHAR COMPORT
_MSV_IMMDATA.DPU_PORT.ADD_MEMBER PCHAR STS

Metso Automation MAX Controls Inc. • 277623 •


maxLINKS User’s Guide

_MSV_IMMDATA.DPU_PORT.STS.OFFSET ULONG 0
_MSV_IMMDATA.DPU_PORT.STS.COMMIT ULONG 0
_MSV_IMMDATA.DPU_PORT.ADD_MEMBER PCHAR TX
_MSV_IMMDATA.DPU_PORT.TX.OFFSET ULONG 1
_MSV_IMMDATA.DPU_PORT.TX.COMMIT ULONG 0
_MSV_IMMDATA.DPU_PORT.ADD_MEMBER PCHAR RX
_MSV_IMMDATA.DPU_PORT.RX.OFFSET ULONG 2
_MSV_IMMDATA.DPU_PORT.RX.COMMIT ULONG 0
_MSV_IMMDATA.DPU_PORT.ADD_MEMBER PCHAR BAD
_MSV_IMMDATA.DPU_PORT.BAD.OFFSET ULONG 3
_MSV_IMMDATA.DPU_PORT.BAD.COMMIT ULONG 0
_MSV_IMMDATA.DPU_PORT.ADD_MEMBER PCHAR SPY_ID
_MSV_IMMDATA.DPU_PORT.SPY_ID.OFFSET ULONG 4
_MSV_IMMDATA.DPU_PORT.SPY_ID.COMMIT ULONG 0
_MSV_IMMDATA.DPU_PORT.ADD_MEMBER PCHAR
SPY_BUFFER_SIZE
_MSV_IMMDATA.DPU_PORT.SPY_BUFFER_SIZE.OFFSET ULONG 5
_MSV_IMMDATA.DPU_PORT.SPY_BUFFER_SIZE.COMMIT ULONG 0
_MSV_IMMDATA_FUMI.ADD_SERVICE PCHAR
FOO_PLC_PORT
_MSV_IMMDATA_FUMI. FOO_PLC_PORT.TYPE PCHAR COMPORT
_MSV_IMMDATA_FUMI. FOO_PLC_PORT.HELPER PCHAR
MsvDPUComTransport
_MSV_IMMDATA_FUMI. FOO_PLC_PORT.SELECTOR PCHAR FOO_PLC
_MSV_IMMDATA_FUMI. FOO_PLC_PORT.COMMIT PCHAR FOO_PLC_PORT
_MSV_IMMDATA_FUMI. FOO_PLC_PORT.BAUD.SET_PROPERTY PCHAR 9600
_MSV_IMMDATA_FUMI. FOO_PLC_PORT.BITS.SET_PROPERTY PCHAR 8
_MSV_IMMDATA_FUMI. FOO_PLC_PORT.STOP_BITS.SET_PROPERTY PCHAR 1
_MSV_IMMDATA_FUMI. FOO_PLC_PORT.PARITY.SET_PROPERTY PCHAR NONE

C-2 Metso Automation MAX Controls Inc. • 277623 •


Appendix D

msvModbusPlus Transport DLL Service


Selectors and Properties

Overview
This library offers transport services on the Modbus network through a Modicon
adapter card SA85.

It supports services about the status of the communication system. For this service,
the helper library is MsvMbPlusTransport and the selector has the following format:

MBPLUSADAPTER:0

The address is the Modbus+ routing path to select the requested station and slave
path.

The address is coded with up to five bytes, but not all bytes must be present. The
bytes not used are coded as 0.

If the address value is configured as a long type, only four bytes may be set. The full
address is configured using a character string.

For example, to address a station on the same network on routing path 05 and slave
path 01 the address value in is hexadecimal:

0x05010000

For more detailed information about the Modbus Plus routing path reference the
Modicon documentation.

Metso Automation MAX Controls Inc. • 277623 •


Appendix E

BOSHelper DLL Service


Selectors and Properties

Overview
The Bos Helper library supplies to maxLINKS two types of variables:

Status
Command

These are the two categories of data defined in the SootBlowers communication
protocol.

The status variables are divided into:

Analog Points
Alarms
Digital Inputs
Status of Blowers
Status of Sequences

Commands are variable to change status of blowers, or to start or to stop a sequence.


A sequence is a group of timed actions on one or more soot blowers.

To use a variable produced by the Bos system:

1. During configuration, create a device with BosHelper as helper and


MsvComTransport as transport.

2. Define a service with the desired type and the relevant selector.

The following describes a few rules used to identify the data item in the Bos Helper
Library:

Selector General Format


The selector has the following general format:

<type identifier>’:‘<object number>[‘:’<variable name>]

Metso Automation MAX Controls Inc. • 277623 •


maxLINKS User’s Guide

Where:

type identifier - Identifies the object type,


object number - Is the number of object requested,

variable name - Is the name of requested variable, if it exists for the specified
object.

Selector Type Identifier

< Type identifier > may only be assigned the following keywords that represent the
Bos objects, as they are described in the Bos specifications.

< type identifier >::=

BLOW |

SEQ |

AIN |

OPIN |

SYSIN |
SYSALM

The following describes the meaning of the keywords.

Keyword Meaning
BLOW Blower
SEQ Sequence
AIN Analog Input
OPIN Operating Input
SYSIN System Input
SYSALM System Alarm

Selector Object Number


< object number > is a decimal number that identifies the requested object

< object number >::= number of object

Keyword First value Max Value


BLOW 1 2048

E-2 Metso Automation MAX Controls Inc. • 277623 •


DLL Service Selector and Properties

SEQ 1 128
AIN 1 256
OPIN 1 48
SYSIN 1 48
SYSALM 1 24

Selector Variable Name


For some types of objects, such as blowers or sequences, < variable name > is
declared. This variable name is then used by MAXServer. The following describes
the variables as they are defined in the Bos specification.

Blower Variable Names


For blowers, there are 23 variables defined.

The following table lists each Blower variable name, the meanings, type and possible
conversion.

Object Variable name Meaning Type Conversion


Type
Blower STATUS Operating blower status Unsigned char Char, short, long, float, double

Blower STALL Motor stall alarm Bool Char, short, long, float, double

Blower OVERLOAD Motor overload alarm Bool Char, short, long, float, double

Blower BLOW_FAIL Blow fail alarm Bool Char, short, long, float, double

Object Variable name Meaning Type Conversion


Type
Blower ETIME Elapsed time Bool Char, short, long, float, double
alarm

Blower START_FAIL Fail to start alarm Bool Char, short, long, float, double

Blower DIR Direction of Bool Char, short, long, float, double


travel

Blower TAG Tag code Unsigned int Long, float, double

Blower START Manual start Bool Char, short, long, float, double
command
Blower RETRACT Retract command Bool Char, short, long, float, double

Metso Automation MAX Controls Inc. • 277623 • E-3


maxLINKS User’s Guide

Blower OFF_SERVICE Blower off Bool Char, short, long, float, double
service command
Blower ON_SERVICE Blower on Bool Char, short, long, float, double
service command
Blower HEADER_NOT_READY Header not ready Bool Char, short, long, float, double

Blower IO_COMM_FAULT I/O Bool Char, short, long, float, double


communications
fault
Blower BYPASSED Sootblower not Bool Char, short, long, float, double
in service
Blower GROUP_BUSY Another Bool Char, short, long, float, double
sootblower in
this blower group
is already in
operation
Blower UNAVAILABLE Sootblowers Bool Char, short, long, float, double
powerbus not
available
Blower NO_MEDIUM Not enough Bool Char, short, long, float, double
blowing medium
available on
header
Blower RUNNING Sootblowers are Bool Char, short, long, float, double
already running
Blower INTERLOCKED Sootblowers are Bool Char, short, long, float, double
interlocked with
another
sootblower
already running
Blower HW_KEY_FAULT Hardware key Bool Char, short, long, float, double
fault
Blower CTR_VOLT_FAIL Control voltage Bool Char, short, long, float, double
failure

Blower DATE out of service String SBP_TIME


date

Sequence Variable Names


For sequences, there are 10 defined variables.

The following table lists each Sequence variable name, the meanings, type and
possible conversion.

E-4 Metso Automation MAX Controls Inc. • 277623 •


DLL Service Selector and Properties

Object Variable name Meaning Type Conversion


Type
Sequence STATUS Operating sequence status Unsigned Char, short, long, float,
Char double
Sequence START Start sequence Bool char, short, long, float,
double

Sequence START_PRIORITY Priority start sequence Bool char, short, long, float,
double

Sequence ABORT Sequence abort Bool char, short, long, float,


double
Sequence HOLD Sequence hold Bool char, short, long, float,
double

Sequence RESTART Sequence restart Bool char, short, long, float,


double

Sequence MAN_CONT Sequence Bool char, short, long, float,


manual/continuous double

Sequence OPER_HELD Sequence held by operator Bool char, short, long, float,
double
Sequence ALARM_HELD Sequence held by alarm Bool char, short, long, float,
double

Sequence PRIORITY_HELD Sequence held by priority Bool char, short, long, float,
double

Simple example of a configuration


_MSV_IMMDATA.ADD_DEVICE PCHAR SOOT-BLOWERS

_MSV_IMMDATA.SOOT-BLOWERS.SIZE ULONG 1

_MSV_IMMDATA.SOOT-BLOWERS.HELPER PCHAR BosHelper

_MSV_IMMDATA.SOOT-BLOWERS.TRANSPORT PCHAR MsvComTransport

_MSV_IMMDATA.SOOT-BLOWERS.SELECTOR PCHAR BLOW:10:STATUS

_MSV_IMMDATA.SOOT-BLOWERS.ADDRESS PCHAR COM2

_MSV_IMMDATA.SOOT-BLOWERS.SCAN_TIME ULONG 15000000

_MSV_IMMDATA.SOOT-BLOWERS.SCHEDULING ULONG 0

_MSV_IMMDATA.SOOT-BLOWERS.FAR_WRITE ULONG 0

_MSV_IMMDATA.SOOT-BLOWERS.COMMIT PCHAR SOOT-BLOWERS

Metso Automation MAX Controls Inc. • 277623 • E-5


maxLINKS User’s Guide

_MSV_IMMDATA.SOOT-BLOWERS.ADD_SERVICE PCHAR IK10

_MSV_IMMDATA.SOOT-BLOWERS.A4SG039.TYPE PCHAR USHORT

_MSV_IMMDATA.SOOT-BLOWERS.A4SG039.SIZE ULONG 1

_MSV_IMMDATA.SOOT-BLOWERS.A4SG039.SELECTOR PCHAR BLOW:10:STATUS

_MSV_IMMDATA.SOOT-BLOWERS.A4SG039.COMMIT PCHAR IK10

BOSHelper Properties
For the BosHelper dll, no properties are defined.

E-6 Metso Automation MAX Controls Inc. • 277623 •


Appendix F

MsvODBCHelper DLL Service


Selectors and Properties

Selector General Format


The selector format for the MsvODBCHelper is a string in the following format:

Selector::= [<Direction> ',' ] <Table> ',' <Key> ', ' <Column> ', ' <FieldValue> ', ' [
<Time> ',' ]

Selector Direction
<Direction>::= 'W' | R' | 'w' | 'r' | 'R*' | 'r*' | '*'

The meaning of the parameters is explained below:

Parameter Meaning
W or w Write Operation
R or r Read Operation
* or R* or r* All Table Loading

Selector Table
<Table>::= <Identifier>

Identifier An ASCII string that identifies a table of the database to be


connected.

Selector Key, Column


< Key >, < Column >::= < Identifier >

Key, Column Identifies the row of the point value to be picked up in the database.

Selector Field Value


< FieldValue >::= <Identifier>

Field Value An ASCII string that identifies the name of column to look for the
value.

Metso Automation MAX Controls Inc. • 277623 •


maxLINKS User’s Guide

Selector Time
<Time>::= <Field_Name_Date_Time> ',' <Field_Name_Milliseconds>

Time An optional parameter to get the time value of database operation.

It is composed of two fields:

Date stored in seconds

Milliseconds

The following string is an example of an ODBC selector:

*,PDB,SA01_08_JI_P211,TAG,VALUE

The library loads all the tables (*) named PDB and it searches, in the PDB column
TAG for the point named SA01_08_JI_P211. When it finds the correct row, it
retrieves the value from the column named VALUE.

Service Address
The Address is a string in the form:

address::= <DataSource> ',' [<Login> ',' <Password> ',']

where:

<DataSource>::= <Identifier>

DataSource An ASCII string that identifies the ODBC data source

<Login>::= <Identifier>

Login An ASCII string added when the database needs an access controlled by
login

<Password>::= <Identifier>

When the database is accessed by a login, a password ASCII string must be specified
too.

Service properties
Each service in the MsvODBCHelper DLL has the following available properties:

Property Meaning

BULK_SIZE When the library execute the database load, it does not
read all the data at one time, but in many data read

F-2 Metso Automation MAX Controls Inc. • 277623 •


MsvODBCHelper DLL Service Selector and Properties

sequences of BULK_SIZE dimension. So the bulk size


represents the maximum amount of data to load from the
database at one time. The default value is 40, but it is
possible to change this value to tune the efficiency of the
system.
TIME_OUT This parameter sets the value of timeout in uSec to
access one point in the database (Default is 1 second)
TEST_TIME_OUT FALSE - Test timeout is disabled (Default)
TRUE - Test timeout is enabled.
LOGIN_TIME_OUT This parameter sets the value of the timeout in uSec
when the database is accessed by login (Default is 1
second)

ODBCHelperIEC has all the capabilities of the ODBCHelper but it also has some
special code to interface with the event table written by the ABB MicroSCADA.

SBP subscriptions with min_time = 0 are directly connected to the event table.

Metso Automation MAX Controls Inc. • 277623 • F-3


Appendix G

Allen-BradleyHelper DLL Service


Selectors and Properties

Overview
The Allen-Bradley Helper allows maxLINKS to interface with different Allen-
Bradley PLC families.

<dst>::= unsigned char (Destination node ) ;


<src>::= unsigned char (Source node ) ;

<command>::=

00 à Protected Write
01 à Unprotected Read
08 à Unprotected Write
15 à Word Range Read
15 à Word Range Write
15 à File Read
15 à File Write
06 à Echo

<function>::=

00 à Word Range Write


01 à Word Range Read
04 à File Read
03 à File Write
00 à Echo

<address>::= <ascii> [ <levels> ] ;

<address>::= <offset> [ <levels> ] ;

< levels >::= [ '@' <level> { <level> } ;

<offset>::= unsigned short ;

<level>::= unsigned short ;

<packed array specifier>::= 'L' | 'F' ;

Metso Automation MAX Controls Inc. • 277623 •


maxLINKS User’s Guide

<bit field specifier > ::= <bit field size> ',' <starting bit> ;

If a bit field is specified on a read operation, the bit field is aligned to bit 0 of the
result before the scaling, if any, is applied.

If a bit field is specified on a write operation, the result of the scaling operation is
clipped to the size of the bit field and then placed in the appropriate bit offset in the
word.

This is the meaning of a packed array specifier:

F à means join two consecutive words in a float value.


L à means join two consecutive words in a long value.

PLC-2 Addressing
PLC processors support logical and physical addressing; the Allen-Bradley Helper
supports only logical addressing. A PLC processor uses Logical addressing in its
ladder diagram program to access its own data table memory. This is the same type
of addressing you use in non-privileged commands that access only PLC data table
memory.

PLC-2/1774-PLC Addressing
PLC-2 and 1774-PLC processors access their data tables using an octal word
address.

For PLC-2/1774-PLC command messages, you must put the equivalent of this
address in the <offset> field of the selector.

To encode a logical PLC-2/1774-PLC address:

1. Convert the octal word address into a decimal number.

2. Double this converted word address to get the corresponding byte address.

3. Place the result in the <offset> field.

This is an example of a selector for PLC-2 binding an sbp variable to word number
120, assuming that the PLC is at address 9, and the address assigned to the KF2
module is 3:

3;9;1;120

Note that with PLC2 and 1774 models only unprotected read and protected write
functions can be used.

G-2 Metso Automation MAX Controls Inc. • 277623 •


ModbusHelper DLL Service Selector and Properties

PLC-3 Addressing
PLC-3 processors use a form of logical addressing known as extended addressing.
With extended addressing, you specify the address for each level (or subdivision) of
PLC-3 memory, down to the smallest subdivision you want to access. You can use
this method to specify up to 6 levels of extended addressing, which is enough to
address any particular word in PLC-3 memory. For more information on PLC-3
extended addressing, refer to your PLC-3 Family Programming and Operation’s
Manual.

Example:

PLC-3 logical binary addressing format E3:1:8:260:0:0

Data table area (level 1 ) à E3


Context (level 2 ) à 1
Section (level 3 ) à 8
File (level 4 ) à 260
Structure (level 5 ) à 0
Word (level 6 ) à 0
This is an example of a selector for PLC-3 binding an sbp variable to the word in the
previous example, assuming that the PLC is at the address 9 and the address assigned
to the KF2 module is 3:

3;9;15,1;0@0,0,1,8,260,0,0

Note that the selector always requires a 7- level address.

Symbolic addressing uses ASCII symbols to represent a logical address. Before


using a symbolic address in a message, you must first define the symbol at the PLC-3
processor that is to receive the message. For more information, refer to your PLC-3
user manual. If the symbol name is more than 8 characters long, use only the first 8
characters.

This module Accepts


1775_KA ASCII symbols

1775_S5, _SR5 •ASCII symbols


•logical ASCII
All revision levels of 1775_S5, _SR5 accept PLC-5 type reads
and type writes. 1775_S5, _SR5 series A, revision E or later can
also use logical ASCII with a PLC-3 word range read or word
range write.

Metso Automation MAX Controls Inc. • 277623 • G-3


maxLINKS User’s Guide

PLC-5 Addressing
PLC-5 processors, like PLC-3 processors, use a form of logical addressing. With
logical addressing, you specify the address for each level (or subdivision) of PLC-5
memory, down to the smallest subdivision you want to access.

With this processor You can specify

PLC-5 Up to 4 levels of extended addressing, which is enough to


address any word in PLC-5 memory.

PLC-5/250 Up to 7 levels of extended addressing, which is enough to


address any word in PLC-5/250 memory.

Example (PLC-5):

$N10:134

level 1 à 0 (data table)


level 2 à 10 (file number)
level 3 à 134 (element offset)
level 4 à 0 (subelement)

This is an example of a selector for PLC-5 binding an sbp variable to the word in the
previous example, assuming that the PLC is at the address 9 and the address assigned
to the KF2 module is 3:

3;9;15,1;0@0,0,0,0,10,134,0

Note that the selector always requires a 7 level address.

Logical ASCII Addressing


The library also supports logical ASCII addressing. Logical ASCII addressing is
supported by PLC-5/250, PLC-5, and PLC-3 processors. Logical ASCII addressing
allows you to specify an address in the same form that you use at the programming
node, and lets any device communicate with any other device without knowing the
internal memory structure of the target device.

A logical ASCII address starts with a dollar sign ($) to differentiate it from symbolic
addressing. The rest of the address then follows as a string of ASCII characters. In
the previous example the selector for the requested word will be:

G-4 Metso Automation MAX Controls Inc. • 277623 •


ModbusHelper DLL Service Selector and Properties

3;9;15,1;0@$N10:134

The files of type N (words), F(floats) and B(booleans) are recognized from the
library, and the offset is automatically calculated. Just put 0 for it when using logical
ASCII addressing.

Properties

Each service in the Allen-Bradley helper DLL has the following available properties:

Property Meaning
TRANSACTION_TIMEOUT The maximum number of milliseconds to wait for
a reply from the PLC.
MESSAGE_TIMEOUT The maximum number of milliseconds it takes to
receive a message. The default value is 20
milliseconds but must be increased for lower baud
rates (less than 1200 bps).
INTERMESSAGE_DLY The maximum number of milliseconds to wait
between a PLC answer and the following request.
(Default 0)
OVER_WORDS The maximum allowed distance to join the service
to a previous request. (Default 125)
COM_RETRIES The maximum number of retries on error before
lowering the quality of the connection. (Default
3)
MODEL The Allen Bradley PLC Model. It must be a string
among the following:
"MICROLOGIX""SLC500"
"SLC5/03"
"SLC5/04"
"1774-PLC"
"PLC-2"
"PLC-3"
"PLC-5"
"PLC-5/250"
"PLC-5/VME"
There are some differences between the models;
the library should know the model to take care of
them. (Default “PLC-5”)
MAX_SIZE The maximum number of inputs that can be sent
in a force multiple inputs message. (Default 100)
FORCE_JOIN_WRITES 1 à Forces writes being joined even if they are
not contiguous (wipes holes in the PLC memory
map). (Default 0)

Metso Automation MAX Controls Inc. • 277623 • G-5


Appendix H

ModbusHelper32 DLL Service


Selector and Properties

Overview
The ModbusHelper32 is a library that implements a variation of the Modbus protocol
that uses 32 bits registers. This protocol is used by some brands of instruments.

The selector format for the ModbusHelper32 is the following:

SS:TT:XXXX:<qualifier>

Where:

SS is the slave address.


TT is the Modbus type XXXX is the offset of the item.

Values for TT are:

03 Holding registers
04 Input registers
06 Preset single register
08 Diagnostics

<qualifier> is used to specify special data treatment for words; when using this
library the qualifier specification is mandatory.

F means that the register must be interpreted as a float value.

L means that the register must be interpreted as a long value.

The layout of the messages changes dynamically. It is driven by the current set of
points accessed from the various clients. The library examines all the current running
requests and joins them when possible to reduce to a minimum the required number
of MODBUS messages.

For TT=08 - XXXX specifies a diagnostic subfunction rather than an offset.

Metso Automation MAX Controls Inc. • 277623 •


maxLINKS User’s Guide

Only Return Query Data (0000) is implemented for the purpose of checking the
connection.

Each service in the Modbus helper DLL has the following properties available:

Property Meaning
READ_HOLD_REG_MAX The maximum number of registers that can be requested in a read
holding registers message. (Default 125)
READ_INPUT_REG_MAX The maximum number of registers that can be requested in a read
input registers message. (Default 125)
FORCE_MULT_REG_MAX The maximum number of inputs that can be sent in a force multiple
inputs message. (Default 100)
ASCII_MODE 0 – RTU mode (Default)
1 – ASCII mode.

Be sure that xxxxx_MAX properties are consistent with the PLC for correct
operation.

H-2 Metso Automation MAX Controls Inc. • 277623 •

Вам также может понравиться