Академический Документы
Профессиональный Документы
Культура Документы
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
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
Configuration of the Underlying Layers (Helper and Transport DLLs) .............................................................. 4-1
Overview................................................................................................................................................................... 4-1
CHAPTER 5.......................................................................................................................4-1
CHAPTER 6 ......................................................................................................................6-1
CHAPTER 7 ......................................................................................................................7-1
APPENDIX E.....................................................................................................................E-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.
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.
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.
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.
Startup of maxLINKS
To start maxLINKS manually locate the file maxLINKS.exe in c:\Mcs\Links\ and
double click on it.
0, c:\mcs\Links\maxLINKS.exe, maxLINKS
Once maxLINKS is started, it will automatically place the following icon on the
Tray Area.
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.
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.
0,c:\mcs\links\maxLINKS.exe, maxLINKS
2,c:\mcs\sbp\MiniConf.exe, MiniConf,
c:\mcs\links\Configurations\Config1.txt
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 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.
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.
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:
Where:
VAR_BYTE,
VAR_SHORT,
VAR_LONG,
VAR_FLOAT,
VAR_DOUBLE,
VAR_UBYTE,
VAR_USHORT,
VAR_TIME,
VAR_PCHAR
Other Keywords:
# A #char as the first character in a line marks that line as a
comment (# this is a comment line).
§ Station configuration
§ Link configuration
§ Devices configuration
§ Services configuration
§ Members configuration
Here is an example:
§ 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.
Station Configuration
The station configuration is mandatory if there are redundant devices. To configure
stations write to the following members of _MSV_IMMDATA:
_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.
If the PLC is on a serial line, associate the service with the appropriate transport:
_MSV_IMMDATA.ComStatus.COMMIT ULONG 0
_MSV_IMMDATA.ComStatus.BITS.SET_PROPERTY PCHAR 8
_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.
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:
(use com1)
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.
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_105
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
_MSV_IMMDATA.FULL_NAME ULONG 0
_MSV_IMMDATA.FULL_NAME ULONG 1
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.
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)
_MSV_IMMDATA.EXPORT ULONG 1
(the services declared after this command are exported to all other maxSTATIONs)
_MSV_IMMDATA.PLC.VALVE.SIZE ULONG 2
Then two members are mapped to the service at the desired offset.
_MSV_IMMDATA.PLC.VALVE.OPENED.OFFSET ULONG 0
_MSV_IMMDATA.PLC.VALVE.OPENED.COMMIT ULONG 0
_MSV_IMMDATA.PLC.VALVE.CLOSED.OFFSET ULONG 1
_MSV_IMMDATA.PLC.VALVE.CLOSED.COMMIT ULONG 0
Members can also specify a completely new and different set of attributes such as:
This new member uses the ODBC library to access the configuration database, and is
mapped on a field containing the description of the service.
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:
Then two members are mapped on the type at the desired offset:
_MSV_IMMDATA.PLC.ADD_SERVICE PCHAR
VALVE
§ 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.
§ 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.
§ 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:
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.
Fixed Scheduling
Writing 1 to the SCHEDULING member sets the scheduling policy for that
service/member to Fixed Scheduling.
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.
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.
“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.
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.
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
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.SB_XA_1_1053.EDGE UBYTE 1
_MSV_ALARM_DATA.SB_XA_1_1053.ALM_FLAGS ULONG 0
_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)
_MSV_ALARM_DATA.SB_XA_1_1053.COMMIT ULONG 0
(the HH limit)
(the H limit)
(the L limit)
(the LL limit)
(alarm severity)
(alarm type)
_MSV_ALARM_DATA.SB_TA_1_1053.ALM_FLAGS ULONG 0
Alarm Members
This is the complete list of the alarm members:
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.
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
Readable Members
The readable members are:
STATUS
The possible values it can assume depend on the kind of device (MASTER /
SLAVE).
MASTER_DEVICE_CONFIGURATED =2
MASTER_DEVICE_IDLE =3
MASTER_DEVICE_STOP =4
MASTER_DEVICE_DOUBTFUL =5
MASTER_DEVICE_CHANGING =6
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
DUAL_CONFIGURATED = 13
DUAL_SCANNING = 14
DUAL_SCANNING2 = 15
DUAL_DOUBTFUL = 16
DUAL_STOP = 17
DUAL_CHANGING = 18
SINGLE_DEVICE_SCANNING = 19
SINGLE_DEVICE_CONFIGURATED = 20
SINGLE_DEVICE_CHANGING = 21
SINGLE_DEVICE_STOP = 22
STS
HELPERQUALITY
SCANNING
DOUBTFUL
CHANGING
IDLE
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.
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.
MAXLINKA has two network cards with the following network configuration:
MAXLINKB has two network cards with the following network configuration:
Both maxLINKS instances must belong to the same network; thus, the configuration
will be:
_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:
Of course if you change the port number, you must configure the same port number
on both maxLINKS.
Example:
Then the following line must be added to the device configuration file before
committing the device:
Example:
Note :
PRIMARY and SECONDARY can be used as aliases for MASTER and SLAVE.
Example:
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.
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 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.
To restart the master one of the conditions listed below must be true:
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.
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.
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.
§ 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).
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.
The stop state is used for link maintenance purposes. In this state the device DOES
NOT HAVE control of the link.
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.
_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
The port cannot be used; for example the addressed port does not exist in the system
or is in use.
A timeout occurs.
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.
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.
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:
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.
Overview
The selector format for the ModbusHelper is the following:
SS:TT:XXXX[:<qualifier>]
Where:
01 Coils
02 Inputs
03 Holding registers
04 Input registers
05 Force single coil
06 Preset single register
08 Diagnostics
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)
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)
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.
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.
CRC_CHECK = 0 SKIP_ADDRESS =1
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.
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:
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.
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.
Assume that somewhere on maxNET there is a DPU with a serial buffer atom with “FOO_PLC” as
the tagname.
_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
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.
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.
Analog Points
Alarms
Digital Inputs
Status of Blowers
Status of Sequences
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:
Where:
variable name - Is the name of requested variable, if it exists for the specified
object.
< Type identifier > may only be assigned the following keywords that represent the
Bos objects, as they are described in the Bos specifications.
BLOW |
SEQ |
AIN |
OPIN |
SYSIN |
SYSALM
Keyword Meaning
BLOW Blower
SEQ Sequence
AIN Analog Input
OPIN Operating Input
SYSIN System Input
SYSALM System Alarm
SEQ 1 128
AIN 1 256
OPIN 1 48
SYSIN 1 48
SYSALM 1 24
The following table lists each Blower variable name, the meanings, type and possible
conversion.
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
Blower START_FAIL Fail to start alarm Bool Char, short, long, float, double
Blower START Manual start Bool Char, short, long, float, double
command
Blower RETRACT Retract command Bool Char, short, long, float, double
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
The following table lists each Sequence variable name, the meanings, type and
possible conversion.
Sequence START_PRIORITY Priority start sequence Bool char, short, long, float,
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
_MSV_IMMDATA.SOOT-BLOWERS.SIZE ULONG 1
_MSV_IMMDATA.SOOT-BLOWERS.SCHEDULING ULONG 0
_MSV_IMMDATA.SOOT-BLOWERS.FAR_WRITE ULONG 0
_MSV_IMMDATA.SOOT-BLOWERS.A4SG039.SIZE ULONG 1
BOSHelper Properties
For the BosHelper dll, no properties are defined.
Selector::= [<Direction> ',' ] <Table> ',' <Key> ', ' <Column> ', ' <FieldValue> ', ' [
<Time> ',' ]
Selector Direction
<Direction>::= 'W' | R' | 'w' | 'r' | 'R*' | 'r*' | '*'
Parameter Meaning
W or w Write Operation
R or r Read Operation
* or R* or r* All Table Loading
Selector Table
<Table>::= <Identifier>
Key, Column Identifies the row of the point value to be picked up in the database.
Field Value An ASCII string that identifies the name of column to look for the
value.
Selector Time
<Time>::= <Field_Name_Date_Time> ',' <Field_Name_Milliseconds>
Milliseconds
*,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:
where:
<DataSource>::= <Identifier>
<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
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.
Overview
The Allen-Bradley Helper allows maxLINKS to interface with different Allen-
Bradley PLC families.
<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>::=
<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.
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.
2. Double this converted word address to get the corresponding byte address.
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.
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:
3;9;15,1;0@0,0,1,8,260,0,0
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.
Example (PLC-5):
$N10:134
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
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:
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)
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.
SS:TT:XXXX:<qualifier>
Where:
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.
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.
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.