Pi interface for Siemens Spectrum Power tg (Linux)



Download 0.55 Mb.
Page7/18
Date29.01.2017
Size0.55 Mb.
#11562
1   2   3   4   5   6   7   8   9   10   ...   18

BufStat Utility


The BufStat utility is installed as part of the interface kit and is located in the PIHOME/interface/SIPowerTG directory.

This utility can be used to check the current connection status of a buffered PI server. It can also print the configuration of the bufserv parameters and the detailed status of the buffers. Typically, it will be used to allow the Siemens software to retrieve the PI server connection status so that it is able to notify operators when a PI server connection is lost.

The command syntax is

BufStat [options] PIserver

where PIServer is the name of the PI server to be checked. Valid options are

-cfg Configuration of bufserv parameters

-stat Buffer status

-con Connection status

The return status of the utility is

0 Disconnected

1 Connected

-1 Fatal Error

For example,

To print out the current status of the buffers, use the following

BufStat -stat XXXXX

BufServ Status Info

PI Server Status : Connected

BufServ Status : Single

Buffer 1 WriteLoc : 448

Buffer 1 Read Loc : 36

Buffer 1 Wrap Loc : 0

Buffer 1 Entries : 16

Buffer 1 Used : 412 ( 0.04%)

Buffer 2 WriteLoc : 36

Buffer 2 Read Loc : 36

Buffer 2 Wrap Loc : 0

Buffer 2 Entries : 0

Buffer 2 Used : 0 ( 0.00%)

File Entries : 0

File Size : 0 kBytes

To show the current connection status only, use the following

BufStat -con XXXXXX

CONNECTED

To use the BufStat in a script to get the current connection status, use the return code from the utility. The following script runs the BufStat utility and then outputs the return code ($? is the return code variable)

#!/bin/sh

# Print return value from BufStat

BufStat XXXXX

echo XXXXX =$?

  1. Digital States


For more information regarding Digital States, refer to the PI Server documentation.
Digital State Sets

PI digital states are discrete values represented by strings. These strings are organized in PI as digital state sets. Each digital state set is a user-defined list of strings, enumerated from 0 to n to represent different values of discrete data. For more information about PI digital tags and editing digital state sets, see the PI Server manuals.

An interface point that contains discrete data can be stored in PI as a digital point. A digital point associates discrete data with a digital state set, as specified by the user.

Typically, these digital sets can be used for data like

OFF, ON


OPEN, CLOSED

UNDEFINED, OPEN, CLOSE, TRANSITION


Quality Digital State Set

The following digital sets define the states for different types of points supported by the interface. These digital sets can be created by importing the SIPowerTG_DigitalSets.csv file with the SMT Digital Set plug-in, or by creating the digital sets manually.

TG_DATA_QUALITY - Quality Priority Digital Set

Location2 = 0, InstrumentTag ends with .QUAL



The Data Quality points can be used to show the status of a Power TG point. It is based on the data qualities displayed on the operator displays and uses the data_qualities.ini file to calculate the quality state to send to the data quality PI points.

Note 1 : Care must be taken to ensure that the definition of the TG_DATA_QUALITY digital set matches the definition given in the data_qualities.ini file (and data_qualities.project.ini if it exists). If there is a mismatch then misleading information will be shown on the PI displays.

Note 2 : If the number of states in the digital set is not sufficient to store the priorities defined in the data_qualities.ini files then the points will be rejected by the interface.

Offset

State Text

Description

0

(blank)

No quality flags set

1

*

Field Selected (disabled by default)

2

S

State Estimator Update

3

M

Manually entered

4

D

Out of Scan

5

#

Floating Point Exception

6

T

RTU Test Mode

7

F

Telemetry Failure

8

U

Uninitialized

9

Z

Missing

10

R

Reasonability Failure

11

?

Questionable

12

X

Drift

13

Q

Computed Value Based on Manually Entered Data

14

E

State Estimator Error

15

B

Backup Data

16

I

All Alarms Inhibited

17

W

Warning Limit Alarms Inhibited

18

C

Device Comment

19

N

In Control

20

!

Control Connection Failed

21

/

Local/Remote

22

H

Analog High Operating

23

L

Analog Low Operating

24

H

Analog High Warning

25

L

Analog Low Warning

26

V

Limit Override

27

O

Abnormal

28

Y

Execution of switching control

29

A

Unacknowledged Alarm



TG_ALARM_STATUS - Alarm Status Digital Set

Location2 = 0, InstrumentTag ends with .ALARM

To show the current alarm status of an analog point, the interface supports an alarm status point which will get the alarm status from the data quality of the event and write one of the following states


Offset

State Text

Description

0

Normal

No alarm conditions apply

1

Low Warning

Low warning flag is set

2

Low Alarm

Low alarm flag is set

3

High Warning

High warning flag is set

4

High Alarm

High alarm flag is set

TG_QUAL_QQSSSS - OPC “QQSSSS” Digital Set

Location2 = 0, InstrumentTag ends with .QQSSSS



Offset

State Text

OPC Quality

QQ SSSS

Description

0

Good

11 0000

Good. No special conditions

1

ManOverride

11 0100

Good. Value has been manually overridden

2

Calc Man Val

11 0111

Good. Calculation based on manual override

3

Local

11 1000

Good. Local

4

Test Mode

11 1001

Good. Test mode

5

Backup

11 1010

Good. Backup

6

SE Update

11 1011

Good. SE Update

7

EU Exceeded

01 0101

Uncertain. Engineering units exceeded

8

Un-Initial

01 0111

Uncertain. Value un-initialized

9

Question

01 1000

Uncertain. Value questionable

10

Missing

01 1001

Uncertain. Missing

11

FP Exception

01 1011

Uncertain. Floating point exception

12

Comm Fail

00 0110

Bad. Communications failure

13

Out of Scan

00 0111

Bad. Out of scan

14

SE Bad

00 1000

Bad. SE bad

TG_QUAL_LIMIT - OPC Limit Status Digital Set

Location2 = 0, InstrumentTag ends with .LIMIT



Offset

State Text

Description

0

Normal

No limit conditions apply

1

Low Alarm

Either a low alarm or a low warning flag is set

2

High Alarm

Either a high alarm or a high warning flag is set

TG_QUAL_SPECIAL - OPC Special Quality Digital Set

Location2 = 0, InstrumentTag ends with .SPECIAL



Offset

State Text

Description

0

Normal

No special conditions apply

1

In Control

In Control

2

Alarm Inh

Alarms inhibited

3

Warning Inh

Warnings inhibited

4

Device Cmnt

Device comment present

5

Cmnd Fail

Command failed

6

Drift

Drift flag set

7

Limit Ovrd

Limit override

8

Unack

Unacknowledged alarm

9

Excd Alarm

Exceeded alarm limit (can be either high or low limit)

10

Excd Warning

Exceeded warning limit (can be either high or low limit)


File Status State Set

One of the interface-specific performance points shows the status of the last file processed. The File Status digital set is used to represent that status.

TG_FILE_STATUS - File Status Digital Set

Location2 = -1,


ExDesc = ”DATA_FILE_STATUS” or ExDesc = ”ALARM_FILE_STATUS”

Offset

State Text

Description

0

Invalid

File magic number is not valid

1

OK

File processed without errors

2

Corrupt

Events were found that were found to be invalid


System Digital State Set

Similar to digital state sets is the system digital state set. This set is used for all points, regardless of type, to indicate the state of a point at a particular time. For example, if the interface receives bad data from the data source, it writes the system digital state Bad Input to PI instead of a value. The system digital state set has many unused states that can be used by the interface and other PI clients. Digital States 193-320 are reserved for OSIsoft applications.



  1. Download 0.55 Mb.

    Share with your friends:
1   2   3   4   5   6   7   8   9   10   ...   18




The database is protected by copyright ©ininet.org 2024
send message

    Main page