Interface to the pi system Version 37 and Greater



Download 344.12 Kb.
Page7/10
Date13.05.2017
Size344.12 Kb.
#17841
1   2   3   4   5   6   7   8   9   10

Interface Files


The interface uses the following files for its operation (where # represents a point source character):


File name

Platform

Description

YGW_#.exe

All

Interface executable program file.

YGW_#.com

VMS

Interface startup file.

YGW_#.bat

NT

Interface startup file.

YGI_Test.exe

All

Gateway communication test program.

YGI_Setterm.com

VMS

Interface TTY port settings command file.

YGW_Msg_#.txt

All

Interrupt messages switch file.

YGW_OItem_#.txt

All

Data I/O type filter file.

YGW_Sts_#.txt

All

Digital state string translation file.

The interface also requires that the PI API be installed and DEC TCP/IP (UCX) be installed if using TCP/IP with VMS.

Interface Program File


Filename: YGW_#.exe

The interface executable file is the program that does the collecting of the data from the gateway and sends it to PI.


Interface Startup File


Filename: YGW_#.com
The interface startup file for VMS is a command file that starts a single instance of the interface. It contains the program’s startup arguments for configuring the interface.

Filename: YGW_#.bat
The interface startup file for Windows NT is an MS-DOS batch file that starts a single instance of the interface. It contains the program’s startup arguments for configuring the interface.

Following is a description of the arguments found in the interface startup file. They are arranged in alphabetical order. Arguments can be categorised into the following:




Category

Optional

Recommended

Compulsory

General

/cl

/db

/dt

/ec

/ds

/f

/id

/lg

/g

/q

/host

/mt

/ms

/rc

/sn

/stopstat

/ps




/sc

/si

/to

/wt







/perf
















TTY Serial













/term




TCP/IP

/iport




/b




/gw

/port


/b Binary Mode /b

Some ECGW3 gateways have a special function which allows them to communicate in binary mode. If so, this argument will use this binary mode. Communicating in binary mode is approximately 20% faster than communicating using the standard text mode. If the gateway does not have a binary mode function, the reception and transmission of data will fail. If this argument is not specified, the interface will communicate using the standard text mode.
/cl Communication Log Messages /cl

This argument causes the interface to log the communication protocol text strings that are sent to and received from the gateway. It is recommended that for normal operation of the interface that this argument not be used. It is only intended to supply extra information for solving a problem should one occur. For other types of debug messages, see the “/db” and “/lg” arguments. For information about message logs, see the Logging File section on page 6.
/db Uniint Debug Level /db[=n]

This causes debug messages to be logged specific to the standard OSI universal interface (Uniint) template that the interface is based on. Various levels can be specified which display different types of messages. They are as follows:

/db or /db=1 all messages
/db=2 initialisation
/db=3 tag building and updates
/db=8 exit handling

It is recommended that for normal operation of the interface that this argument not be used. It is only intended to supply extra information for solving a problem should one occur. For other types of debug messages, see the “/cl” and “/lg” arguments. For information about message logs, see the Logging File section on page 6.


/ds Digital Start Code /ds=n

This argument specifies where in the PI2 digital state table or the PI3 system digital state set the interface’s status strings can be found. When the interface or one of its tags enters a state not defined in the default state set of the PI system, it uses one of nine states that are defined in the setup process of the interface. In order to use these nine states it must know what position in the set of system states the first one is located. See the Digital States section on page 9 for more information about digital states. The default value is 1.
/dt Digital State Table (NT, PI3 only) /ds=n

This argument instructs the interface to use a lookup table for PI3 digital states. When the interface initialises a PI digital tag, it will create a lookup table of corresponding digital state codes for the digital state set that the tag has assigned to it (unless a table for that set has already been created). When a digital state is received from the gateway in string form, the interface will translate it into a PI3 digital state code using this lookup table. If this argument is not used, the interface makes a call to PI to do the translation. See, also, the Digital State String Translation File section on page 23.

This is argument is particularly useful when the interface is running on a separate computer that the PI system it is connected to (API node). If it is used, the interface only makes the calls to PI at initialisation and not every time a digital state needs translating. Thus, network traffic is reduced.

This argument is also useful when the interface is running on an API node and API Buffering is being used. The API buffering utility does not currently have the ability to translate digital state strings into digital state codes. Thus, if the API node becomes disconnected with PI, the interface can still translate digital state strings. For more information about API Buffering, see Chapter 7 of the PI-Application Programming Interface Manual.

/ec Event Counter Number /ec=n

This argument configures the interface to record the rate of certain events. This is done with event counters. The argument specifies the event counter numbers as defined in the IORates.dat file. It can occur on the command line multiple times but the interface will only register the first three. The first occurrence of this argument specifies one event counter, the second occurrence the next and so on. See the Event Counter Tags section on page 6 for a list of the events that the interface will register and for more information about setting up event counters.
/f Scan Class Period /f=hh:mm:ss[,hh:mm:ss]

The interface collects data at time intervals specified by scan classes. Each scan class is given a frequency period to start collecting data. Scan class 1 is defined by the first instance of the “/f” parameter, scan class 2 is defined by the second instance, etc. At least one scan class must be defined. The format hh:mm:ss specifies the hours, minutes and seconds for the frequency of a particular scan class. The addition of the second hh:mm:ss after the comma specifies the phase offset from midnight of the scan class. For example:

/f=01:30:00 will define a scan class to collect data every 90 minutes.

/f=01:00:00,7:00:00 will define a scan class to collect data every 60 minutes, starting at 7:00am.

Partial scan frequencies and phase offsets can be used. For example,



/f=30 will define a scan class to collect data every 30 seconds.

/f=5:00 will define a scan class to collect data every 5 minutes.

/f=3:00,1:00 will define a scan class to collect data every 3 minutes with a one minute phase offset.

Multiple scan classes may be defined with the same interval and offset. This allows some points to be read from the DCS by tag name and others in bulk by block number. See the “/g” argument below for a description of DCS block processing.

Each tag that is to use a scan class must be defined to use one by assigning the Location4 field of the tag to the scan class number.

Note: Even if every tag used by the interface is defined to be read by PI exception, at least 1 scan class must be defined for the interface to operate correctly.


/g Read Block Number /g=n

This argument specifies the data access type of each scan class defined by the “/f” argument. For each “/f” argument there must be a corresponding “/g” argument to determine whether or not to read the values from that scan class by block file number. Valid values are:

/g=0 Read tags in the corresponding scan class by their individual tag names.
/g=1 Read tags in the corresponding scan class by its block numbers.

The first occurrence of “/g” corresponds to the first occurrence of “/f”, the second occurrence of “/g” to the second “/f”, etc. The default value of “/g” is 0 (read by tag name) and is only needed as a place-holder when there is a /g=1 that corresponds to a later occurrence of “/f”. For example, if there were six scan classes defined using “/f” and only the third scan class was to be read by block number, the first two occurrences of /g=0 would be necessary to hold the place of the /g=1 but the last three would not be necessary.



/f=1 /f=2 /f=5 /f=10 /f=1:00 /f=15:00 /g=0 /g=0 /g=1

Reading tags by block number is recommended. Reading tags by block number has a much quicker response time than by individual tag name. If a scan class is set to be read by block number the interface automatically defines enough tag blocks for it in the gateway (provided there are sufficient blocks available). A block consists of 32 tags. For Centum V and Centum XL systems, 256 blocks can be defined on one system, making a total of 8192 potential tags to be read by block. For Micro XL the number of definable blocks depends on the actual system.

If more tags are defined for reading by block number than there are available, the interface rejects them and logs the error. If this occurs, a tag can still be read using the tag name option (/g=0) for another scan class (possibly of the same frequency). The number of tags that can be read by tag name is unrestricted.

/gw Gateway Host Name /gw=xxxx

If communicating using TCP/IP, this argument specifies the Yokogawa gateway’s host name. If the gateway does not have a host name or it is not known, an IP address is sufficient. For example,

/gw=MG_ECGW3 or /gw=204.138.119.15

To specify the port number, use the “/iport” argument as described below.


/host PI Server Host Name /host=xxxx

This argument specifies the PI server’s machine name. If the interface is to run on the same computer as the PI server, then localhost can be used. If the interface is running on a PINet node, this argument is not needed unless it is connecting to a PI3 server. An IP address may also be used instead of a host name. It may be necessary to follow the host name by a the standard PI port number (545 if connecting to PI2 and 5450 if connecting to PI3) using the following format:

/host=:

For example,



/host=ourpiserver:5450

Access to the PI server is required to be able to send data to PI. Access is granted via a proxy mechanism because login access is inappropriate for the interface. A host name or an IP address is associated with a PI user account for which it grants the interface the same access rights. This association is defined in the PI proxy database and is necessary for the collection of data by the interface. See the PI Data Archive for Windows NT and Unix Manual for more details about proxy accounts.


/id Interface ID /id=xxxxx

This argument serves to give extra information about the identity of the interface. All PI clients use the same log file to log messages. The interface will identify itself by preceding its messages with the keyword YGW. If multiple copies of the interface are running on the same computer, each interface’s log messages are distinguished by this argument. For example,

/id=E

would produce messages in the log such as:



31-Jul-98 09:05:03
YGW E> Hardware initialization error, Intf halted

The E could be used to indicate in the log file that the message was written by the interface using point source E. See the Logging File section on page 6 for more information about the interface log file.



Note: The length of the string defined by this argument must not exceed 9 characters.
/iport Interrupt Message Port /iport=n

If communicating using TCP/IP, the ECGW3 gateway uses an extra port number, 31001, to read interrupt messages. This argument instructs to the interface to read these interrupt messages via this interrupt message port. To make the interface read interrupt messages via the main data access port, use the “/ms” argument, described above. If both the “/iport” and “/ms” arguments are specified, the “/ms” argument takes precedence.
/lg Log Debug Messages /lg

This argument causes debug messages to be logged that are specific to communicating with the gateway and processing data. It is recommended that for normal operation of the interface that this argument not be used. It is only intended to supply extra information for solving a problem should one occur. For other types of debug messages, see the “/cl” and “/db” arguments. For information about message logs, see the Logging File section on page 6.
/ms Read Interrupt Messages /ms

This argument instructs to the interface to read interrupt messages from the gateway. Messages are read before every data request. The ECGW3 gateway has a TCP/IP port for reading interrupt messages that is separate from its main data access port. Specifying this argument forces the interface to read interrupt messages via the data access port instead of the interrupt message port. To make the interface read interrupt messages via the interrupt message port, use the “/iport” argument, described above. If both the “/ms” and “/iport” arguments are specified, the “/ms” argument takes precedence.
/mt Machine Type /mt=xxxx

This argument specifies the Yokogawa machine type that the interface is to communicate with. The valid options for this argument are:


Argument Setting

Gateway/DCS

Communication Type

/mt=CGWU

CGWU

RS-232 Serial TTY

/mt=ECGWT

ECGW*, ECGW3

RS-232 Serial TTY

/mt=ECGWE

ECGW3

Ethernet TCP/IP

/mt=MICROXLT

Micro XL

RS-232 Serial TTY

/mt=MICROXLE

Micro XL

Ethernet TCP/IP

The machines in the table are all very similar in the way they communicate with the interface but each has its slight differences and the interface acts to these accordingly. This argument is not required and its default value is none of the above machines but if not specified, the interface may not run correctly or as efficiently as it should.
/perf Set Performance Summary Interval /perf=n

By default, every 8 hours the interface will log a performance summary. This summary provides information about how may scan classes were scanned late and how many were missed because of back-log of late scans. This argument specifies the frequency of performance summary logs. For example,

/perf=0 will suppress performance summaries logs.

/perf=1.5 will log performance summaries every hour and a half.

/perf=12.0 will log performance summaries every 12 hours.
/port Yokogawa Gateway Port Number /port=n

If communicating using TCP/IP, this argument specifies the port number of the Yokogawa gateway. This port number should always be 31000, as the following:

/port=31000

The gateway’s host name is specified using the “/gw” argument, described above.


/ps Point Source /ps=x

This argument is a single letter that associates the interface with its PI tags. It is a mandatory argument and therefore has no default value. The interface will attempt to access all tags whose point source field matches this argument. It is helpful to make this point source a meaningful character so that it is easy to associate. For example, using

/ps=E for an ECGW3 gateway,

/ps=S for a CGWU (Serial) gateway or

/ps=M for a MicroXL system.

Multiple instances of the interface may be run by defining PI tags with different point sources.


/q Queue Input Data /q

The interface will normally send each exception for each point to the PI snapshot individually. If this causes network traffic to become excessive or the interface to slow down, this argument can be used to queue the exceptions locally. The size of the queue is 255 and when it is full, its entire contents are sent to PI. If the queue is not full at the completion of a scan class, it is flushed to ensure that all remaining exceptions are sent to PI before the next scan class commences.
/rc Communication Retry Count /rc=n

This argument specifies the number of times the interface will retry to communicate with the gateway after it has timed out. The default retry count is 0. If the interface fails to communicate with the gateway after the retry count has been reached it will abandon the call and continue. The retry count applies to individual calls to the gateway, rather than accumulating over multiple calls. In effect, the interface will try to communicate with the gateway rc+1 times before timing out. See, also, the “/to” argument described below.
/sio Suppress Initial Output /sio

When the interface initialises an output point it sends an initial value out to the DCS based upon the current snapshot of its source tag. This argument Suppresses this initial output.
/sc Send Continuous Count /sc=n

If using TCP/IP, this argument specifies how many text strings to send to the gateway at a time. Valid values for this argument range from 1 to 8. Some ECGW3 gateways and some Micro XL systems can receive text without a need to reply immediately. Thus, up to eight strings can be sent asynchronously and the replies received in any order. The default value is 1.
/sn Snapshot Input Data /sn

The interface will normally perform standard exception tests on all tags and send only the exceptions to the PI snapshot. This argument will cause the interface to send all data values straight to the snapshot without performing exception tests.
/stopstat Interface Stopped State /stopstat=xxxxx

Specifying this argument will direct the interface to clean up its tags before it exits. If the interface is stopped for any reason, the interface is given a chance to disconnect itself from the gateway and write a digital state to PI for all of its tags. If /stopstat is used by itself, the default digital state is I/O Timeout. A specific digital state can be specified by using /stopstat=xxxxx where xxxxx is the name of a digital state. For example,

/stopstat=Inf_Stopped

In this example, the Inf_Stopped state must exist in the digital state table(PI2) or in the system digital state set(PI3). The recommended digital state to use is Shutdown.



/stopstat=Shutdown
/term Serial Port Name (VMS only) /term=xxxx

If communicating using RS-232 TTY this argument specifies the machine’s TTY terminal name that the gateway is connected to. For example,

/term=TTA1:
/to Communication Timeout /to=n

The interface monitors the amount of time it takes for the DCS system to respond to a command issued by the interface. When there has been no reply from DCS system within a specified timeout period, the interface stops scanning the current scan class and starts scanning the next scan class. The interface writes IO_TIMEOUT to the PI point on which time out occurred and logs an error message to log file.

This argument specifies the number of seconds the interface will wait for communication with the gateway before cancelling the call. The default timeout period is 10 seconds. The number of retries is dependant on the “/rc” argument, described above.


/wt Wait Time /wt=n

This argument specifies the number of seconds to wait between calls to the gateway. It is not usually needed unless communicating with a CGWU gateway. The CGWU gateway can sometimes fail to communicate correctly if there is not a small amount of time between calls. If it is used, a typical value for this argument is 1 second.

/wt=1

If this argument is not used the wait time defaults to 0 seconds.


Example Startup File

Windows NT Interface
Following is an example of a Windows NT interface startup batch file configured for a Centum XL DCS via a ECGW3 gateway using the TCP/IP protocol:

YGW_E.exe /host=ourpiserver:5450 /gw=204.138.119.15 /port=31000 /mt=ECGWE /f=1 /f=10 /f=1:00 /f=5:00 /f=30:00 /f=8:00:00,6:00:00 /g=0 /g=1 /g=1 /id=E /ps=E /ds=45 /dt /ec=22 /q /stopstat=Inf_Stopped /to=30


Download 344.12 Kb.

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




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

    Main page