How to Contact Us



Download 0.92 Mb.
Page6/11
Date09.06.2018
Size0.92 Mb.
#54049
1   2   3   4   5   6   7   8   9   10   11

Command-line Parameters




Parameter

Description

/as=E or I

Optional

Alias tag in point field instead of PI tag name. Looks in the PI tag’s Extended Descriptor or InstrumentTag field for matches with the alias tag in the data.

E indicates extended descriptor has alias tag name.

I indicates instrument tag field has alias tag name.

Anything else will cause the interface to HALT after writing an error message.



/db

Optional

Specifies that debug messages be written to the log files.

/dev

Optional

Specifies that more detailed debug messages should be written to the log file.

/ds= digstate

Optional


To be used with the /pt parameter.

If the PointType is digital then the Digital State set name to be used with these new points will have to be specified on the startup command line. The /DS=DigitalSetName is the switch for this purpose. The DigitalSetName will have to be one of the digital set names found on the PI home node that the interface is communicating with.



/ec
or
/ec=x

Optional



The /ec parameter on the command line is used to specify a counter number, x, for an I/O Rate point. If x is not specified, then the default event counter is 1. Also, if the /ec parameter is not specified at all, there is still a default event counter of 1 associated with the interface. If there is an I/O Rate point that is associated with an event counter of 1, each copy of the interface that is running without /ec=x explicitly defined will write to the same I/O Rate point. This means that one should either explicitly define an event counter other than 1 for each copy of the interface or one should not associate any I/O Rate points with event counter 1. Configuration of I/O Rate points is discussed in the section called “I/O Rate Tag Configuration.”

/ex

Optional

Use pisendexceptions instead of putsnapshotsx. Supports extended API, so string tags and sub-second timestamps are supported. Out of order data is rejected and error messages written in this mode. If a /lb or a /ex is not passed, the default is putsnapshot and out of order data will be rejected and error messages will be written to the pipc.log file unless the /oo parameter is entered.

Note: PI 3.2 SR1 server or higher and PI API 1.3.0 or higher are required to support string tags and sub-second timestamps.

/f=SS

Required


The /f parameter specifies the cycle time, in seconds for the checking for data files.

/fs=x

Optional,

default:

/fs=,


The /fs parameter specifies the field separator between tagname and timestamp, and timestamp and value. This is an optional parameter. If not specified a comma (‘,’) is used.

/host=host:port

Required


The /host parameter is used to specify the PI Home node. Host is the IP address of the PI Sever node or the domain name of the PI Server node. Port is the port number for TCP/IP communication. The port is always 5450 for a PI 3 Server. It is recommended to explicitly define the host and port on the command line with the /host parameter. Nevertheless, if either the host or port is not specified, the interface will attempt to use defaults.

Defaults:

The default port name and server name is specified in the pilogin.ini or piclient.ini file. The piclient.ini file is ignored if a pilogin.ini file is found. Refer to the PI API Installation Instructions manual for more information on the piclient.ini and pilogin.ini files.

Examples:


The interface is running on an API node, the domain name of the PI 3 home node is Marvin, and the IP address of Marvin is 206.79.198.30. Valid /host parameters would be:
/host=marvin
/host=marvin:5450
/host=206.79.198.30
/host=206.79.198.30:5450


/id=x

Optional

The /id parameter is used to specify the interface identifier. For example,

/id=int1

The interface identifier is a string that is no longer than 9 characters in length. The interface concatenates this string to the header that is used to identify error messages as belonging to a particular interface.

No identifier will be used if the /id= is not passed.


/lb

Optional

Use putlabvalue so data can be replaced. Default is putsnapshot. Extended API is supported so string tags and sub-second timestamps are supported. Out of order data is accepted in this mode. If a /lb or a /ex is not passed, the default is putsnapshot and out of order data will be rejected and error messages will be written , unless the /oo parameter is entered.

Note: PI 3.2 SR1 server or higher and PI API 1.3.0 or higher are required to support string tags and sub-second timestamps.

/maxstoptime=
stoptime

Optional




When a Windows service is stopped, the service control manager spawns a new thread for the exit handler. The exit handler sets the “keep going” parameter for the interface to false and then waits a maximum of stoptime seconds for the main thread to reach a safe exit point before the exit handler continues with its cleanup operations. By default, stoptime is 120 seconds. If stoptime seconds are exceeded, the exit handler will continue with its cleanup operations and then force the interface to exit.

/oo

Optional

Enable data to be entered out of order. Default is not to allow out-of-order data. /lb will allow out of order data regardless of whether the /oo parameter is passed.

/pa=x:\x\x\mask

Required

/pa=x:\x\x\mask specifies the full path to the data files and mask. i.e.:

/pa=d:\datafiles\*.dat

If the path has a space in it, put double quotes at the beginning and end of the parameter. i.e.: “/pa=d:\program files\batchfl\data\*.dat”

Processed files will have 999 added to the file name. Do not make data files with 999 at the end of the name. They will be ignored and purged.


/ps=x

Optional



The /ps parameter specifies the point source for the interface. X is not case sensitive and can be any single character. For example, /ps=L and /ps=l are equivalent.

The point source that is assigned with the /ps parameter corresponds to the PointSource attribute of individual PI Points. The interface will attempt to send data only those PI points with the appropriate point source. It is not a required parameter, but recommended.



/pt=


Optional


When the interface read a data line and cannot find the PI Point, the interface will make the PI SDK calls to create the point. Each instance of the interface will only be able to create one type of point, so multiple instances will need to be run. One for each point type required. Digital type points will also required an instance for each Digital State Set used. The interface supports Digital, Int16, Int32, Float16, Float32, Float64 and String type points.

If the PointType is digital then the Digital State set name to be used with these new points will have to be specified on the startup command line. The /DS=DigitalSetName is the switch for this purpose. The DigitalSetName will have to be one of the digital set names found on the PI home node that the interface is communicating with.



/pu=-xx

Optional

Specifies the age of processed data files to be deleted. Ex: /pu=-2d data files older than 2 days are deleted.

/rb

Optional


This mode of operation will remove leading and trailing blanks for String type values.

/rbo

Optional


This mode of operation will do an archive read first to see if the value exists to determine if piar_putvalue is used to replace the value or pisn_putsnapshot if no value is to be replaced. This will only generate an audit event when a value is replaced.

/sc

Optional

With Batch File Interface version 2.6 or higher, scaling can be performed on the data. If /sc is in the startup .bat file, the UserReal1 point attribute will be read and the value will be multiplied by the value in the data file. This is only for integer and real type points. No scaling will be done if the UserReal1 value equals 0.0.

/sl=xx

Optional

Specifies the number of seconds to pause between processing files. This can be used to throttle the rate that the data files get processed.

/stopstat
or
/stopstat=
digstate

default:
/stopstat=


Intf Shut”

Optional


If the /stopstat parameter is present on the startup command line, then the digital state Intf Shut will be written to each PI Point when the interface is stopped.

If /stopstat=digstate is present on the command line, then the digital state, digstate, will be written to each PI Point when the interface is stopped. For a PI 3 Server, digstate must be in the system digital state table.

If neither /stopstat nor /stopstat=digstate is specified on the command line, then no digital states will be written when the interface is shut down.

Examples:


/stopstat=”Intf Shut”

The entire parameter is enclosed within double quotes when there is a space in digstate.



/ta=xx

Optional

Specifies the number of minutes to adjust the timestamp, i.e.: /ta=60 will add 60 minutes to the timestamp in the data file. /ta=-60 will subtract 60 minutes from the timestamp in the data file.

/tn

Optional

Specifies that the data line has a tag number instead of the tagname. If not specified, the tagname is used.

/ts

Optional

Use number of seconds since 1970 (local time) in time field instead of time string.

/tsu

Optional

Use number of seconds since 1970 (UTC) in time field instead of time string.



Informational Parameters


These are command-line parameters that must appear on the command line by themselves. Interface execution terminates immediately after these tasks are performed.

Parameter

Description

/h

Optional



Print a summary of command line options supported by the interface.

/help

Optional



In addition to printing the summary of command line options from the /h flag, print a summary of command-line options for installing, removing, and starting a Windows service.

/?

Optional



On Windows, /? is the same as the /help flag.
On all other platforms /? is the same as /h.

/v

Optional



Print the version of the PI API and the interface




Sample batchfl.bat File


The following is a manually generated Windows sample startup file.

REM ================================================================

REM BatchFL.bat.new

REM

REM Sample startup file for the Batch File Interface to the PI System

REM

REM OSIsoft strongly recommends using PI ICU to modify startup files.

REM ================================================================

REM

REM

REM Sample command line

REM ================================================================

batchfl /f=15 /pa=d:\batchfl\dat\*.dat /pu=-1d /ps=B /host=XXXXXX:5450



REM

REM end of BatchFL.bat




Interface Node Clock


Make sure that the time and time zone settings on the computer are correct. To confirm, run the Date/Time applet located in the Windows Control Panel. If the locale where the interface node resides observes Daylight Saving Time, check the box marked “Automatically adjust clock for daylight saving changes”. For example,

In addition, make sure that the TZ environment variable is not defined. All of the currently defined environment variables can be viewed by opening a Command Prompt window and typing set. That is,



C:> set

Make sure that the TZ environment variable is not defined. All of the currently defined environment variables can be viewed by opening a Command Prompt window and typing set. Confirm that TZ is not in the resulting list. If it is, run the System applet of the Control Panel, click the Environment tab, and remove TZ from the list of environment variables.




Download 0.92 Mb.

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




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

    Main page