Sei sulla pagina 1di 46

maxDNA Software Backplane Reference Manual

278710 Rev. A1

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 2004 by Metso Automation MAX Controls Inc. Printed in the United States of America All rights reserved

Contents

Contents PREFACE 1 CHAPTER 1 1-1 Overview 1-1 SBP 101 1-2 Ser v ice vs. Ap

PREFACE

1

CHAPTER 1

1-1

Overview

1-1

SBP 101

1-2

Service vs. Applications

1-3

Core Functions

1-4

SBP Monitor

1-4

Registration and Routing

1-5

Transport

1-7

Local Status Server

1-9

Other SBP Utilities

1-13

Real-time Gateway

1-13

maxPROXY

1-15

Overview

1-15

Filters

1-16

Common Domain

1-18

Security, reliability and Performance Considerations

1-19

Alias

1-20

DPU4E / DPU4F References

1-20

Debugging

1-21

Remote Server

1-23

maxMERGEALARM

1-24

maxMERGEDPUALARM

1-25

Distributed Event Management

1-26

Event Collector

1-26

DPUEvents

1-26

Event Server

1-28

Utilities

1-29

SBP Spy

1-29

CHAPTER 2

2-1

SBP Wrapper Calculations

2-1

Introduction

2-1

SBP Wrapper Calcs

2-3

Using Parentheses to Order Nested Operations

2-4

Using One-line Conditions

2-4

Use of the Asterisk (*) Character In Conditionals

2-5

Using Logical And/Or

2-5

Other Syntax

2-5

Referencing Software Backplane Information Providers

2-6

Using Functions

2-7

Preface

This book covers a variety of utilities associated with the Software Backplane (SBP). The SBP is a modern publish and subscribe framework around which all software in the maxDNA system is built.

Chapter 1

Chapter 1

Overview

The software backplane is a collection of programs that facilitate the reliable, high performance transfer of information in the maxDNA system. The software backplane is based around some simple concepts. To participate in the SBP an application can:

CONNECT

– establish a presence on the SBP

REGISTER

– publish the name of an object to be exposed to the SBP

READ

- get a single item from an object registered on the SBP

WRITE

- put a single item to an object registered on the SBP

SUBSCRIBE

- get the current item and sign up for notification of change in that item

To locate a value on the SBP, an identifier (ID) is used. An ID in its simplest form consists of:

<tagname> . <attribute>

Where <tagname> is a string of alphanumeric characters which are used in the REGISTER command. The <attribute> identifies a single attribute or method of the registered object. It should be noted that definition of <attributes> is by agreement between applications. The SBP does not dictate that there are a particular set of attributes associated with a given object.

SBP 101

A Software Backplane can consist of a registration and routing service (RRS), a client application and a server

application

Client Server Application Application Registration and Routing
Client
Server
Application
Application
Registration
and Routing

In the normal situation there is a maxTRANSPORT application to communicate between boxes using a dual Ethernet

connection.

Client

Application

Server

Application

Transport RRS
Transport
RRS
RRS
RRS

Transport

Software Backplane

Service vs. Applications

As of Version 4, SBP applications can be run as a service (started when the station starts) or interactively as a console application (started when the user logs into Windows). The advantage of running as a service is that the application does not stop when the user logs off. This will keep continuous functions such as maxSTORIAN running without interruption. When running as a service, there can be no direct dialog boxes to show status of a process. When running as a console application, there is a tray icon and generally a dialog associated with the application. It is good technique to run a majority of the software core, alarm, event and history applications as services in production systems. It is however far easier to debug these applications as console applications. Applications can be changed from Service to Console app using the startup configurator.

Core Functions

SBP Monitor

The SBP monitor is the interface to applications running as a service. In this application, the RRS, Transport and the

main portion of the Local Status server are running as services.

the dialogs associated with these applications. The SBPMonitor starts whenever the first interactive application starts

after a user login.

Click on the SBPMonitor icon in the toolbar to access

Click on th e SBPMonitor icon i n the toolba r to access This dialog shows

This dialog shows the three standard tabs of the SBPMonitor. maxRRS (registration and routing), maxTRANSPORT

and SBP Services. The RRS and TRANSPORT will be described later. service applications.

The third tab shows the status of all other SBP

plications. The third tab shows the status of all other SBP There are three columns in

There are three columns in the SBPMonitor SBP Services tab. Program (the name of the executable), Ping Time (the amount of time for a special SBP response message to be returned) and the status of the application. The

Software Backplane

MCSRegEdit.exe is an example of a transient service which runs during service startup and then exits. In the above display, the program maxTRANSPORT is no longer running normally.

Registration and Routing

Registration and routing is the name server of the Software Backplane. It knows the names and locations of all information that is registered.

and l o cations of all information that is registered. The connection list box lists all

The connection list box lists all of the known connections to the SBP within this box. The event list box is primarily for debugging and contains the history of connections. The Transports box contains known transport programs to go outside of the box.

In the above case, the local status server (_LSS by name) is connection 3. You can see from the event history that the _LSS connected 2/27 at 13:26:17.

It can also be noted that it has a quality of 80. The connection quality is used where the <tagname> of an identifier is not unique. The SBP will choose the highest quality connection that has registered a non-unique tagname. This mechanism is used for redundancy. If a primary and secondary DPU both have a point, it will be registered twice. active DPU will have a higher quality than the secondary so messages will be routed to it. If a process fails to respond to the SBP, its quality will be reduced over time. At some point, the connection will be closed by the SBP.

The

The Group column is not of much use.

Pressing the Point List button of the RRS dialog will get you a sorted list of tags and destinations. The following shows that the identifier “_lss” has been registered by connection ‘3’ which has a quality ‘80’.

by connection ‘3’ which has a quality ‘80’. Note the additional letter after the destination route.

Note the additional letter after the destination route. This letter stands for:

– I (mported) through a transport from another box

– X(ported) by this box to other boxes

– H (idden) registered in this box only

Note that there are boxes that can be used to filter the point list by ID, Connection or connection quality. There is also

the ability to transfer filtered point lists to files for external use.

Software Backplane

Transport

This program is responsible for the movement of files from station to station within the maxDNA system.

of files from station to station within the maxDNA system. The columns on the transport tab

The columns on the transport tab indicate:

AB – an indication that transport is hearing broadcasts from the named station. This is not necessarily an indication that communications are possible.

Name – the box name of the station

IP – the address on the A network. Note that the actual address on the B network is 172.17 instead of 172.16.

<Paul Ackley>

Flags – an indication of the capabilities and status of the station ddmmnn where dd – blugrovits mm – blavisque nn - rivits

BuffCnt –

ReqReSpl

ReSplDone

ReSynReq

ReSynDone

DupPkts

RejPkts

ReXmitsA

ReXmitsB

Software Backplane

Local Status Server

The Local Status Server (LSS) in this release provides a number of functions for software backplane applications. Functions of the LSS include:

_LSS.

Readable items:

.Date

- the local machine date as a character string

.Time

- the local machine time as a character string .Midnight - a boolean variable that goes true (1) at midnight and stays true for one minute .Onhour - a boolean variable that goes true (1) on the hour and stays true for one second .Onminute - a boolean variable that goes true (1) on the minute and stays true for one second .Onshift - a boolean variable that goes true (1) at the beginning of each 8 hour shift (see _lss.Shift_start)

There are a number of writeable items:

h ift _ start ) There are a num b er of writeable item s :

.AddSvc – Add a Service to the LSS. The format of the written string is:

Write -

_lss.addsvc.<service name>.<service type>

Where <service name> is a user-determined name for the new service and <service type> is the same suffix that is in the lss.ini file (pid, atb, etc.) .AddMem – Add a Member to a Service. The format of the written string is:

Write -

_lss.addmem.<service name>.<member>

The type of member created will be the type of data included in the write. .Shift_start – a variable, of type short, that is used to specify the time at which an 8 hour shift starts (0 = midnight, 1 = 1 AM, 2 = 2 AM, etc.). Since all shifts are assumed to be 8 hours long, it is only necessary to specify the start time of one shift. .log – to make an entry in the log .post_alarm – to make an entry in the alarm system

_DISPLAY.

.Current_Display - the full path of the MAXVUE main display currently up

.Display_Request - a writeable variable used by any process requesting a new main display

.Last_Display

- maintained by MAXVUE as the previous main display

_KEYBOARD.

.BUFFER.<MASK>

Where <MASK> is an indication of the key clusters that are desired. Key clusters are represented by a single letter:

M

D

P-

C

Z

U

L

S

O

A

For example:

Subscribe _KEYBOARD.BUFFER.MDP - to get mode, display and pan key clusters

- ode

- isplay

an

- ursor

- oom

- ser

-ogic

- etpoint

- utput

–alarm

Software Backplane

_SEL_PT.

 

.Tagname

- a readable or writeable item for the selected unique tag

.Is

- a special item see below

.Forward

- used to forward requests to the selected point

.Route

- used to route requests to the selected point (will change as selected point changes)

IS

There is a special subscribeable item – Is. The format of an ‘Is’ subscription is:

ubscribe – _SEL_PT.Is.<unique tag> The response is a Boolean response of 0 if the supplied <unique tag> is not the selected point, and 1 if it is the selected point.

Forward

This is a special member that can be used to forward requests to the point that is designated as the selected point. Note that points that are forwarded will stay connected to the same point regardless of changes to the selected point.

Forward Example:

Write _SEL_PT.TAGNAME ("FIC101") Read _SEL_PT.FORWARD.OBJTYPE - "PID"

;Set the selected point to "FIC101" ;An example object type for "FIC101"

Route

This is another special member. Unlike Forward, Route will change when the selected point changes. Route is only relevant to subscriptions.

Write _SEL_PT.TAGNAME("FIC101") Subscribe _SEL_PT.ROUTE.OBJTYPE

;Set Selected Point to FIC101

Subscribe Data Update "PID"

;Subscription returns the objtype of FIC101

Write _SEL_PT.TAGNAME("DIG101")

;Change the Selected Point

Subscribe Data Update "DTB"

;Get a new update from the objtype of DIB101

_Workgroup.

.SILENCE To silence all annunciators in a workgroup, you need only write to:

.LOGIN_SEC – readable security login from 0 to 9

Note on _lss.log

Writing to _lss.log inserts an event into the event log system. modify the log entry.

There are a number of parameters which can be used to

_lss.log.<tagname>.<param1>…<paramn> (<event description text>)

Where:

<tagname> is a 1 to 16 character alphanumeric identifier

<paramn> is an optional parameter(s) separated by ‘dots’ (.) of the form

<type>=<value>

Where type is:

A= 0 - none, 1 - alarm,

D =Description E=AltDescription G=Time field is in GMT H=HID S=0-6 Severity T=yyyymmddhhmmssmmm Time in year,month,day,hours,minutes,seconds,milliseconds Y=S – SOE, P – Process, O – Operator Action, N – System, E – Edit Actiions

2 - cleared

Examples:

_lss.log.progtag.A=1.S=3 (“Event text here”) _lss.log.progtag.A=1.Y=S.T=20040503133145001 (“SOE type shows milliseconds”)

Notes:

Time defaults to local time and is always a 17 character string without punctuation

The event collector collects description and alt description late (when dequeueing events) - if you rapidly change these attributes, you will get the last description and alt description in the historical log.

Future times are accepted but are held by the resort algorithm until the time has past. Limit future times to a minute into the future.

Note on post_alarm

A read from _lss.post_alarm will return a tagname under which a tag is posted. There are different forms for posting an alarm:

tag = sbpread(“_lss.post_alarm”)

A write to _lss.update_alarm

Software Backplane

Other SBP Utilities

Real-time Gateway

The Real-time Gateway provides interfaces to get data from older DPUs (or controllers) via the DBM. The DBM and the MAXStation must be on the same Ethernet with the same network identifier. The points of the DBM database will be registered with the Real-time Gateway.

database will be registere d with the Real-ti m e Gateway. The Real Time Gateway has

The Real Time Gateway has been enhanced to provide the following members for each DBM in the system. The Syntax accessing these members is:

_dbmname.member

_DBMS.COUNT

_DBMS.number.member

Where:

dbmname - is the name of the DBM

number - is the relative 1 index of the DBM member - is one of the following:

COUNT

- The maximum index of DBMs which have been heard from.

NAME

- The name of the DBM (Useful with index relative addressing)

DOMAIN

- The domain served by this DBM

OK

- Indicates True if a path exists to the DBM through some network

NETA

- Status of Network A

NETB

- Status of Network B (0=NEVER_KEEPALIVE, 1=CONTINUOUS,2=LOST,3=REGAINED)

IP

- IP address of DBM on NETA

IDLE

- Percent Idle

DHW1_OP

- DPU Bus 1 operational Status

DHW2_OP

- DPU Bus 2 operational Status

DHW3_OP

- DPU Bus 3 operational Status

DHW4_OP

- DPU Bus 4 operational Status

DHW1_CABLE - DPU Bus 1 Cable Status DHW2_CABLE - DPU Bus 2 Cable Status

DHW3_CABLE - DPU Bus 3 Cable Status DHW4_CABLE - DPU Bus 4 Cable Status

STATUS

- Composite status for DBM (0=Dead,1=NoDHW,2=SomeDHW,3=Good)

VERSION

- Database OF DBM version Time Stamp

LOST_BCST_A - Count of Lost Broadcast periods on Net A

LOST_BCST_B - Count of Lost Broadcast periods on Net B GOOD_BCST_A- Count of Good Broadcasts received on Net A GOOD_BCST_B - Count of Good Broadcasts received on Net B

SENDS_A

- Count of Requests Sent to DBM on Net A

SENDS_B

- Count of Requests Sent to DBM on Net B

RECVS_A

- Count of Responses Heard on Net A

RECVS_B

- Count of Responses Heard on Net B

TIMEOUTS_A

- Count of Message Timeouts on Net A

TIMEOUTS_B

- Count of Message Timeouts on Net B

LAST_ERROR_A

- Last Error Status for a Net A operation

LAST_ERROR_B

- Last Error Status for a Net B operation

COUNT_ERRORS_A

- Count of Errors on Net A

COUNT_ERRORS_B

- Count of Errors on Net B

RESET_STATS - Reset Error Statistics (When written to)

Software Backplane

maxPROXY

maxPROXY is a service that can be provided by a workstation to look up and direct traffic to addresses not available to another SBP client. This will hopefully become clear after the following discussion.

Overview

The Software Backplane (SBP) is centered around the registration and routing services (RRS). The purpose of the RRS is to keep track of where things are located. When a client application wants to get a <tagname>.<attribute> it passes a SBP message to the RRS – to be passed onto the final destination. In order to perform this function, RRS maintains a list of points that it recognizes as registered. In the following example, the Server Application connected to number ‘3’. The server must register all points to make them available. When it registers points, the RRS remembers them to be from connection ‘3’. When the client application requests FIC101 from RRS (always connection ‘0’) the message will be forwarded to connection ‘3’.

Client Server FIC101 Application Application 6 3 0 Tagname Connection FIC101 3(Q90) Registration and Routing
Client
Server
FIC101
Application
Application
6
3
0
Tagname
Connection
FIC101
3(Q90)
Registration
and Routing

The RRS

may

store

hundreds

of

thousand

s of

points.

The

architect

of a

maxDNA system has the option of dividing the system into domains. Some purposes of domains include:

Isolate one part of an installation from another such as Unit1 and Unit2 so one unit can be operated or shut down independently of the other unit. Control security in a multi-unit plant. Through domains, the architect can dictate which workstations have direct full access, and which workstations have read-only or no access. Limit the alarm coverage for a set of workstations Limit the number of tagnames that need to be maintained and searched during lookup.

The architect of a system should organize the domains to minimize the need for interdomain communications. The main purpose of proxy is to facilitate exceptions where domain-to-domain traffic is required.

In the following example,

tagnames from it’s domain. These tags by convention start with a 1. The right station (2ENG1) has uploaded tags from

its domain – starting with a 2.

there are two domains, 1 and 2. The RRS of the left hand station (1ENG1) has uploaded the

The client application has no access to the object in domain 2.

Client

Application

Server

Application

Domain 2 - 2ENG1 Transport RRS 2FIC101
Domain 2 - 2ENG1
Transport
RRS
2FIC101
Get me: 2FIC101.PV Domain 1 - 1ENG1 RRS 1LIC111
Get me:
2FIC101.PV
Domain 1 - 1ENG1
RRS
1LIC111

Transport

Filters

The first step in resolving this problem is for RRS to have a way to find out where to send requests that it does not find

in its own database.

During domain configuration, this is dealt with.

database. During domain configuration, this is dealt with. In the above configuration screen you see the

In the above configuration screen you see the filters for UNIT1 and UNIT2. Note that there are two filters represented separated by commas. The [172.16.1.* is used for access of the form:

[<ip address of station>]tag.attribute

Software Backplane

The 1* will match any tag beginning with the digit 1. The above filters must be loaded into every workstation. It is very important to keep them the same.

Using the above filters, the request for 2FIC101 can be located in domain 2. Then what? This is where proxy comes in. When it receives the request for 2FIC101, the RRS in 1ENG1 looks in its own database and does not find 2FIC101. It then checks the filters and finds a match for domain 2. It then attempts to route the message to the highest quality proxy that has direct access to domain 2! How does it find the highest quality proxy for domain 2? It simply adds on a _prx2 (a special name) and forwards the request back to itself.

Proxy Server Client _PRX2 Application Application Get me: 2FIC101.PV 1ENG1 2ENG1 Transport Transport RRS RRS
Proxy
Server
Client
_PRX2
Application
Application
Get me:
2FIC101.PV
1ENG1
2ENG1
Transport
Transport
RRS
RRS
2FIC101
1LIC1
Client to RRS
Subscribe to 2FIC101.PV
RRS to RRS
Subscribe to _prx2.2FIC101.PV
‘Because found filter match

The service in domain 2 that will handle this request is called a proxy service. domains that it has access to.

RRS to TRANSPORT

Subscribe to [2eng1]_prx2.2FIC101.PV

--------------move over to 2 eng 2 ---------------

TRANSPORT to RRS

Subscribe to _prx2.2FIC101.PV

RRS to Proxy

Subscribe to _prx2.2FIC101.PV

Proxy to RRS

Subscribe to 2FIC101.PV

RRS to 2FIC101

Subscribe to 2FIC101.PV

It has registered the name _prx2 on all

Data updates are transported back through a similar path. This transaction takes but a few milliseconds to transpire and in not visible on displays as a delay.

Common Domain

The intensely interested reader may have discovered a problem in the above scheme.

RRS uploads tagnames from all

domains that it is directly connected to. A majority of the tagnames come from DPU’s. maxDPU4E/4F which are a

members of a singular domain set by a switch or software setting.

The proxy in 2ENG1 station was said to register the special name _prx<n> (where <n> is the domain number) for all domains for which it has direct access – in this case _prx2. How does 1ENG1 get access to _prx2 when it only uploads tagnames from domains that it is directly connected to? The answer is the common domain ‘9’ in this case (there is nothing special about the number 9). It is not necessary for the common domain to have any DPU’s. It may just be there for the purpose of distributing the _prx registrations so all stations can locate the highest quality proxy servers for any domain, whether or not they have direct access.

for any domain, whether or not they have direct access. All stations in the above domain

All stations in the above domain configuration have direct access to domain 9. This is the domain that will be used to register the _prx<n> locations.

Software Backplane

Security, reliability and Performance Considerations

Reliability

The first rule is to operate proxy in more than one station with direct access to domains that you want to expose. The

proxy servers all act independently.

more points being transferred, the lower the quality. This tends to make new proxy usage go to the least loaded proxy. If however one proxy goes down, all traffic will be rerouted to the remaining proxy. Even if the original is restored, traffic will remain until subscriptions are reestablished for any reason.

Multiple proxies share load by the adjustment of their connection qualities. The

Security

The first assignment of security is via the domain configuration. Any station may be given direct, indirect read only or indirect read/write capability. Note that it is critical that all domain configurations (wks.ini) be the same throughout the system. Note also that it is the role of the station with the proxy to protect the domains to which it is directly connected.

The second level of security is that passwords being used by the proxy client must match the matching passwords in the station that contains the proxy server. If 1ENG1 is logged in at security level 3 and 2ENG1 is logged in at security level 4, the security level 3 at 2ENG1 needs to match security level 3 at 1ENG1.

Security Exceptions

There may be some exceptions desired for the read-only rule. These exceptions can be set up by editing the file:

c:\custom\database\proxy.ini

Lines like the following will allow writes to pass through an otherwise read only proxy arrangement. Note that the following exceptions are in the default proxi.ini file. These exceptions allow the paging of alarm summary displays – which are accomplished by a write instruction.

AllowWrite _Merge_Alm.paging. AllowWrite _dpms.root.almpage.

NOTE that the allow write parameter matches the left hand side of an identifier to allow writes.

AllowWrite FIC101

-

Any attribute of FIC101

AllowWrite FIC101.GAIN

-

Only the gain of FIC101

NOTE that the allow write parameters are additive. The ID of the write needs only match one of the eight possible write exception parameters.

Performance

Proxy server is a relatively light load on a workstation. It should be run in multiple workstations for reliability purposes. This will also spread the load that there is. Proxy can be run on operator or engineer stations.

Alias

There are some occasions where you need to access a few points across domains, or need to use an alternate name to locate an object within the maxDNA system. The Proxy Server has the ability to create an alias for any point to which it has access. Aliases are entered by editing the file:

The format of alias.ini is:

<domain to register>,<alias name>,<actual name>

where:

<domain to register> - is one of the domains to which the workstation running the proxy has direct access. The ‘client’ station using the proxy name needs the appropriate access to this domain (read or read/write) in order to access the data.

<alias name> - any valid service name or hid. Typically different from the original by prefix. For example 1PID101 may become 15PID101 where 15 is a common domain, and 1 is the domain where the point originates

<actual name> - is the service name of the point to be indirectly accessed. May be a HID or service name.

Examples:

15,15pid101,1pid101

15,/unit15/fuel/air/point1,1pid101

DPU4E / DPU4F References

There is one final use of proxy. It can be used to resolve references of maxDPU4E/F’s. The DPU does not import a point list from all other stations. This would take too much memory and possibly processing power. There is a reference syntax that must be used to resolve references outside the domain the DPU is in:

[^]tag.attribute

When the DPU encounters this reference style, it forwards the subscription request to the highest quality proxy server for the DPU domain. The proxy server will do one of two things:

Outside of the Domain

The proxy will subscribe to the requested data. It will then receive responses from that source and forward them to the requesting DPU. If the DPU can not access a proxy, these peer-peer communications will stop and the quality of the referenced value will go bad. If there are multiple proxies, if the one fails that is performing the forward of data updates, the natural retry of the DPU will be routed to the highest quality remaining proxy and the connection will be quickly re-established.

Inside the Domain

If when the proxy looks up the requested point it finds it is in the same domain as the DPU, it will forward the subscription message to the source of data. Data updates will be passed from DPU to DPU without passing through the proxy server.

Software Backplane

There are two options for peer-peer if you know you are within a domain. Use the [^] and get the proxy to look up the point for you. You can also use [<dpuname>]tag.attribute. This will be directly routed with no interaction with proxy. The advantage of the [^] is that the address is not hardcoded. You will not need to change references should a point move from DPU to DPU. [^] does depend on one proxy being available at the time the subscription is made.

Debugging

There is a dialog that can be used to help debug proxy server issues. Note that this dialog is only usable when proxy is run interactively (not as a service). Startup configurator should be used t o convert proxy to not run as a service to view this display.

Proxy Server
Proxy Server
The display lists the workstation name and DPU names of clients of its services. The

The display lists the workstation name and DPU names of clients of its services. The columns represent:

Updates -

The number of data updates which have passed through the server

Reads-

The number of reads which have passed through the server

Writes -

The number of writes which have passed through the server

Subcnt -

The number of subscriptions established through this server

UpErrors -

Data errors on subscription data updates

SubsOut -

The number of subscriptions currently out

Mcsts -

Internal meaningless technojargon

Rejects are commonly for stations not in the wks.ini of the station that is running the proxy, or stations with read-only privilege attempting writes.

Software Backplane

Remote Server

Software Backplane Remote Server Metso Automation 278710 1-2323

Distributed Alarm Management

maxMERGEALARM

Distributed Alarm Management maxMERGEALARM 1-24 Metso Automation 278710

Software Backplane

maxMERGEDPUALARM

Software Backplane maxMERGEDPUALARM Metso Automation 278710 1-2525

Distributed Event Management

Event Collector

Distributed Event Management Event Collector DPUEvents 1-26 Metso Automation 278710

DPUEvents

Software Backplane

Software Backplane Metso Automation 278710 1-2727

Event Server

Event Server 1-28 Metso Automation 278710

Software Backplane

Utilities

SBP Spy

Software Backplane Utilities SBP Spy Metso Automation 278710 1-2929
1-30 Metso Automation 278710

Software Backplane

Software Backplane Metso Automation 278710 1-3131

Chapter 2

Chapter 2

SBP Wrapper Calculations

Introduction

There are many places where a Software Backplane (SBP) Client (such as maxVUE) needs to perform simple calculations to form a usable value. This can be done with a Visual Basic program, but there is now an easier way to implement simple calculations. A new feature, called SBP Wrapper Calculations, has been added to the Software Backplane. This feature gives the user the capability of defining, in an algebraic expression, the exact computation required. This expression can then be entered into a suitable Edit control of the device being worked upon, such as the Identifier block in a TestSBP dialog, as shown below:

the Identifier block in a TestSBP dialog, as shown below: The essential simp licity of this

The essential simplicity of this expression, requiring only a basic knowledge of algebraic expression syntax, is very appealing and effective.

Not only expressions for performing a calculation to derive a numeric answer can be entered, but also expressions of a conditional nature whereby the result is determined by the relative sizes of the variables. An example of this is shown :

sizes of the variables. An exam ple of this is shown : The accordingly . above

The

accordingly.

above

example

compares

two

values

and

outputs

a

text

string

The above example compares two point values and outputs a point value accordingly . SBP

The above example compares two point values and outputs a point value accordingly.

SBP Wrapper Calcs

The SBP Wrapper Calculation software utilizes all the common arithmetic operators, such as the arithmetic: + - * /, the logical: & | , and the comparison: > = <>.

The '=' symbol shown in the illustration above, is always required.

The following is a list of the actual operators supported by the SBP Wrapper Calculations:

(a) ( )

parentheses; to order a calculation. See "Using Parentheses to Order

Nested Operations," in a following section.

(b)

+

addition

(c)

-

subtraction

(d)

/

division

(e)

*

multiplication

(f)

& |

Logical operators

(g)

? :

One line conditional operators; see "Using One-Line Conditionals."

(h)

==

Comparison operators

(i)

>

Greater than

(j)

<

Less than

(k)

>=

Greater or equal

(l)

<=

Less than or equal

(m) != Not equal

(n) <numerical constant> [+|-]nnn[.nnn]

(o) <sbp-identifier> <service>.<member>.<extension>. Software

Backplane Information Providers.

See "Referencing

Using Parentheses to Order Nested Operations

Similar to a standard algebraic expression, you may use parentheses to order the expression. In expressions with multiple nested operations, surrounded by parentheses, the intermost operation is performed first.

An example of this syntax is:

(((((((((pt1.ao + pt2.ao)*2) / 2) * 2) / 2 + pt1.ao) - pt2.ao) + 2) - 3))

Using One-line Conditions

A one-line conditional operator is expressed this way:

(<logic expression>) ? <true value> : <false value>:

Examples:

= (Fic101.pv > 50) ? 10.0 : 20.0:

This expression states that if the value of Fic101.pv is greater than 50, then output the value 10.0, otherwise, output the value 20.0.

Note: This syntax is similar to the C language construct with the addition of a colon character used as the terminator. The following C language version is written without the final colon:

(pt1.ao == 0) ? 1 : 0

Use of the Asterisk (*) Character In Conditionals

You may also create a conditional expression using an asterisk character that could represent, for example, the absence of available data on a printed report.

An example of this syntax is:

=(tc1_1.ao < 75.0) ? tc1_1.ao : “*”:

This expression says that if the value of tc1_1.ao is less than 75.0, then output the value of tc_1.ao, otherwise, output an asterisk *.

Using Logical And/Or

To represent a logical And in an expression, use two ampersand characters (& &).

To represent a logical Or, use two vertical bar characters ( | |).

An example of this syntax is:

=(pt1.ao > 10) && (pt1.ao > 20) || (pt1.ao < 2.0)

Other Syntax

Other syntax is the same as that used in the “C” and “C++” programming languages.

Such as

"!=" (not equal).

“+” . “-“ , “*” , “/ “ , “(“ , “ )” , “<” , ”>” , “ =” , “\” , ”>=” , "<=" ,

Examples:

= (FIC101.pv + FIC102.pv) / (Bias.AO)

Referencing Software Backplane Information Providers

The following syntax permits you to reference information available from the maxDNA Software Backplane.

[<service>] <sbp-identifier>.[<member>].[<extension>]

Where:

Service = a data provider name

SBP-identifier = an item name, such as a point name

Member = an attribute of an item

Extension = an attribute of an attribute, such as average

The software backplane, the maxDNA distributed communications infrastructure software, consists of the following modules:

Registration and Routing (RRS) the core of the software backplane, this program is responsible for connecting clients with providers of information. Providers ‘register’ information on the software backplane. Clients ‘read’, ‘write’ and ‘subscribe’ to that information through the software backplane.

Local Status Server (LSS)

functions.

These include storage for other processes (such as the last display and selected point for maxVUE) as well as a set of simulation functions.

Provides housekeeping

MCS Real Time Gateway (RTG) Provides an interface between the MAX 1000 Data Bus Module (DBM) and the software backplane. The RTG provides immediate data, trend data, alarm data, and more.

An example of this syntax is:

_lss.trend_data.hrs

Where

_lss is the service provider

Trend_data is a member

Hrs is an attribute of the member item

Using Functions

Report Wrapper Calculations supports these functions:

Arithmetic Functions:

MAX(expr, expr)

Maximum of 2 expression values

MIN(expr, expr)

Minimum of 2 expression values

ABS(expr)

Absolute value of expression value

EXP(expr)

Exponentiation of expression value

LN(expr)

Natural log of expression value

LOG(expr)

Base 10 log of expression value

PWR(expr_1, expr_2)

expr_1 raised to the power of expr_2

SQR (expr)

Square root of expression value

FRAC(expr)

Fractional part of expression value

expr_1 % expr_2 INT(expr)

Remainder of expr_1 divided by expr_2 Integer part of expression value

Trigonometric Functions:

SIN(expr)

Sine value of expression value

COS(expr)

Cosine value of expression value

TAN(expr)

Tangent value of expression value

ASIN(expr)

Arc-sine value of expression value

ACOS(expr)

Arc-cosine value of expression value

ATAN(expr)

Arc-tangent value of expression value

SINH(expr)

Hyperbolic Sine value of expression value

COSH(expr)

Hyperbolic cosine value of expres-sion value

TANH(expr)

Hyperbolic tangent value of expres-sion value

Note, when you use a function, previously the expression had to begin with @.

Example, square-root expression may be written as:

=SQR(pt1.ao + pt2.ao)

.