How to Contact Us



Download 0.51 Mb.
Page6/6
Date09.06.2018
Size0.51 Mb.
#54067
1   2   3   4   5   6

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

Optional


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
/stopatat=
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=dragon: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.


Security

Windows


The PI Firewall Database and the PI Proxy Database must be configured so that the interface is allowed to write data to the PI Server. See “Modifying the Firewall Database” and “Modifying the Proxy Database” in the PI Server manuals.

Note that the Trust Database, which is maintained by the Base Subsystem, replaces the Proxy Database used prior to PI version 3.3. The Trust Database maintains all the functionality of the proxy mechanism while being more secure.


See “Trust Login Security” in the chapter “PI System Management” of the PI Universal Data Server System Management Guide.

If the interface cannot write data to the PI Server because it has insufficient privileges, a –10401 error will be reported in the pipc.log file. If the interface cannot send data to a PI2 Server, it writes a –999 error. See the section “Appendix A: Error and Informational Messages” for additional information on error messaging.


PI Server v3.3 and Higher

Security configuration using PIconfig

For PI Server v3.3 and higher, the following example demonstrates how to edit the PI Trust table:

C:\PI\adm> piconfig

@table pitrust

@mode create

@istr Trust,IPAddr,NetMask,PIUser

a_trust_name,192.168.100.11,255.255.255.255,piadmin

@quit

For the above,



Trust: An arbitrary name for the trust table entry; in the above example,

a_trust_name

IPAddr: the IP Address of the computer running the Interface; in the above example,

192.168.100.11

NetMask: the network mask; 255.255.255.255 specifies an exact match with IPAddr

PIUser: the PI user the Interface to be entrusted as; piadmin is usually an appropriate user
Security Configuring using Trust Editor

The Trust Editor plug-in for PI System Management Tools 3.x may also be used to edit the PI Trust table.

See the PI System Management chapter in the PI Server manual for more details on security configuration.


PI Server v3.2


For PI Server v3.2, the following example demonstrates how to edit the PI Proxy table:

C:\PI\adm> piconfig

@table pi_gen,piproxy

@mode create

@istr host,proxyaccount

piapimachine,piadmin

@quit

In place of piapimachine, put the name of the PI Interface node as it is seen by PI Server.


Starting / Stopping the Interface on Windows


This section describes starting and stopping the interface once it has been installed as a service. See the UniInt End User Document to run the interface interactively.


Starting Interface as a Service


If the interface was installed a service, it can be started from PI ICU, the services control panel or with the command:

BatchFL.exe –start

To start the interface service with PI ICU, use the button on the PI ICU toolbar.

A message will inform the user of the the status of the interface service. Even if the message indicates that the service has started successfully, double check through the Services control panel applet. Services may terminate immediately after startup for a variety of reasons, and one typical reason is that the service is not able to find the command-line parameters in the associated .bat file. Verify that the root name of the .bat file and the .exe file are the same, and that the .bat file and the .exe file are in the same directory. Further troubleshooting of services might require consulting the pipc.log file, Windows Event Viewer, or other sources of log messages. See the section “Appendix A: Error and Informational Messages,” for additional information.

Stopping Interface Running as a Service


If the interface was installed a service, it can be stopped at any time from PI ICU, the services control panel or with the command:

BatchFL.exe –stop

The service can be removed by:



BatchFL.exe –remove

To stop the interface service with PI ICU, use the button on the PI ICU toolbar.




Buffering


Buffering should not be used with the PI Batch File Interface.



Appendix A:
Error and Informational Messages


A string NameID is pre-pended to error messages written to the message log. Name is a non-configurable identifier that is no longer than 9 characters. ID is a configurable identifier that is no longer than 9 characters and is specified using the /id parameter on the startup command line.

Message Logs


The location of the message log depends upon the platform on which the interface is running. See the UniInt End User Document for more information.

Messages are written to PIHOME\dat\pipc.log at the following times.



  • When the interface starts many informational messages are written to the log. These include the version of the interface, the version of UniInt, the command‑line parameters used, and the number of points.

  • As the interface retrieves points, messages are sent to the log if there are any problems with the configuration of the points.

  • If the /db is used on the command line, then various informational messages are written to the log file.

  • For invalid parameters and defaults used.

  • The number of points found for the BATCHFL interface.

  • When a file has not been processed for more than 24 hours.

  • When a file has been processed and the last file that has been processed was done more than 24 hours ago.

  • When more than one point is found for a record.

  • When a Digital state is not found.

  • When a PI Point is not found for data.

  • For an error when putting a Lab Value in the archive.

  • = message written with data record and file name.

They are only written to BATCHFL.out for data errors. One message per data file is written to the PI message log with the number of data errors found and the name of the data file.

If the PI Point is not found, only one error message is written in BATCHFL.out.


System Errors and PI Errors


System errors are associated with positive error numbers. Errors related to PI are associated with negative error numbers.

Error Descriptions on Windows


On Windows, descriptions of system and PI errors can be obtained with the pidiag utility:

\PI\adm\pidiag –e error_number

Revision History


Date

Author

Comments

05-Jun-96

MGrace

Initial draft

23-July-96

MGrace

Revised for NT platform

12-Sep-96

MGrace

Revised for Unix platforms

23-Sep-96

JZeilenga

Added tar –xv command for UNIX platforms

21-Nov-96

MGrace

Revised for running as a NT service

25-Jun-97

SRG

Minor formatting changes.

11-Dec-97

MGrace

Combine vms and nt/unix documents and update nt/unix part to version 1.5

14-Feb-98

JZeilenga

Added info for installing VMS interface from tape

17-Jul-98

MGrace

Add /lb startup parameter for nt/unix. Change installation for NT to use new service install commands. Version 1.6.6

23-Oct-98

MGrace

Add new startup parameters for NT/UNIX. Version 1.8.x

7-Dec-98

MGrace

Add /tsu startup parameter


23-Jul-99

MGrace

Version 2.1.0 on NT or UNIX for new API calls that support replacing string data and sub-second data with the /lb parameter.

29-Feb-00

MGrace

New features for alias tag (match extended descriptor or Instrument tag field) for NT or Unix Version 2.3

6-Mar-00

MGrace

Support extended API call for exception reporting /ex.

2-May-00

CGoodell

Standardize format

9-June-00

MGrace

Add description for /sl parameter and adding lanworkstation as a dependency for when data is on a mapped drive. NT/Unix version 2.4.x

18-Sept-00

JMP

Updated manual to skeleton 1.02

10-Oct-00

JMP

Updated manual to skeleton 1.03; eliminated index

17-Nov-00

MGrace

Updated manual for nt/unix version 2.6 or higher. Added a /sc to allow for scaling data

21-Nov-00

MGrace

Update manual for nt/unix version 2.7 or higher. Added a /id= parameter for putting in error messages for identifying what interface the messages are coming from.

8-Dec-00

MGrace

Add description about how out of order data is rejected

6-Mar-01

MGrace

Take out comma in install lanworkstation dependency

04-Jul-01

HBeeson

Added BatchFL ICU Control section.

22-Aug-01

MGrace

Clean up, clear up what is in VMS version. Fix startup table. Add /oo startup parameter.

22-Aug-01

CGoodell

Formatting

05-Sep-01

HBeeson

Updated section on ICU Control

25-Sep-01

CGoodell

Continued reformatting; skeleton 1.09

4-Oct-01

MGrace

Fixed typo in point source section

12-Feb-02

MGrace

Fix section on starting as a service and accessing a mapped drive. Need to depend on workstation, not lanworkstation.

26-Aug-02

MGrace

Add /stopstat and /maxstoptime parameters to NT/UNIX startup section

06-Sep-02

HBeeson

Updated with info the Wise setup kit, updated sections on PI ICU for IORates, PerfPoints, Service Config (2.8.x, doc rev D)

18-Sep-02

CGoodell

Fixed headers & footers, and title for printing

20-Sep-02

MGrace

Add /pa=x parameter to chart of startup params

13-Jun-03

CGoodell

Changed the versions; fixed footers

03-Dec-03

HBeeson

Added a note on multiple instances to the ICU control section

4-Feb-05

MGrace

Add MPK comments

10-Mar-05

MGrace

Pli#7653OSI8 -> limitations for the mask.

Pli# 6955OSI8 -> note about exponential expressions supported.



11-Mar-05

MGrace

Add /rb startup parameter.

18-Apr-05

MKelly

Change Copyright page for dates and company name. Added three missing support features from latest skeleton manual, Add section in point sources about PINet and PI 3 having to use uppercase point source character. Updated I/O Rates section. Updated ICU section with new screen shots for updated ICU.

25-Apr-05

CGoodell

Version 2.10.1.0 Rev I: Title page only includes NT because all others are on maintenance.

18-Aug-06

MGrace

Update version number and batchfl.bat example

23-Aug-06

Janelle

Version 2.10.2.0 Rev A: Updated manual to skeleton 2.5.2. Fixed headers and footers; alphabetized command line parameters table; formatting changes. Removed references to UNIX and VAX because those versions of the interface are now only on maintenance; updated hardware diagram.

29-Aug-06

MKelly

Version 2.10.2.0 Rev B: Fixed headers and footer, page setup margins, corrected filenames and other minor formatting.

6-Sep-06

MGrace

Version 2.10.2.0 Rev C: Add /v /h /help information

6-Dec-06

MGrace

Update the principles of operation to include point creation. Update the table to say pi-sdk is used when point creation is enabled.

7-Nov-07


MGrace

Version 2.10.2.0 Rev D: The /f parameter description was changed during the release procedure to use the UniInt behavior of the /f parameter. This interface is not UniInt based. The /f parameter only supports seconds.




UniInt End-User Interface to the PI System


Download 0.51 Mb.

Share with your friends:
1   2   3   4   5   6




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

    Main page