PI_UFL Interface
Universal File Loader
Interface to the PI System
Version 2.3.0.11
Rev C
How to Contact Us
|OSIsoft, Inc. |Worldwide Offices |
|777 Davis St., Suite 250 |OSIsoft Australia |
|San Leandro, CA 94577 USA |Perth, Australia |
| |Auckland, New Zealand |
|Telephone |OSI Software GmbH |
|(01) 510-297-5800 (main phone) |Altenstadt, Germany |
|(01) 510-357-8136 (fax) |OSI Software Asia Pte Ltd. |
|(01) 510-297-5828 (support phone) |Singapore |
| |OSIsoft Canada ULC |
|techsupport@ |Montreal, Canada |
| |OSIsoft, Inc. Representative Office |
|Houston, TX |Shanghai, People’s Republic of China |
|Johnson City, TN |OSIsoft Japan KK |
|Mayfield Heights, OH |Tokyo, Japan |
|Phoenix, AZ |OSIsoft Mexico S. De R.L. De C.V. |
|Savannah, GA |Mexico City, Mexico |
|Seattle, WA | |
|Yardley, PA | |
|Sales Outlets and Distributors |
|Brazil |South America/Caribbean |
|Middle East/North Africa |Southeast Asia |
|Republic of South Africa |South Korea |
|Russia/Central Asia |Taiwan |
| |
|WWW. |
|OSIsoft, Inc. is the owner of the following trademarks and registered trademarks: PI System, PI ProcessBook, Sequencia, |
|Sigmafine, gRecipe, sRecipe, and RLINK. All terms mentioned in this book that are known to be trademarks or service marks |
|have been appropriately capitalized. Any trademark that appears in this book that is not owned by OSIsoft, Inc. is the |
|property of its owner and use herein in no way indicates an endorsement, recommendation, or warranty of such party's |
|products or any affiliation with such party of any kind. |
| |
|RESTRICTED RIGHTS LEGEND |
|Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the |
|Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 |
| |
|Unpublished -- rights reserved under the copyright laws of the United States. |
| |
|© 2002-2006 OSIsoft, Inc. |
|PI_UFL.doc |
Table of Contents
Introduction 1
Reference Manuals 1
Supported Features 2
Principles of Operation 5
Installation Checklist 7
Interface Installation 9
Naming Conventions and Requirements 9
Interface Directories 9
Interface Installation Procedure 10
Installing the Interface as an NT Service 10
Digital States 11
PointSource 13
PI Point Configuration 15
Point Attributes 15
Output Points 17
Configuration File 19
General 19
Comments 19
Line Continuation 20
File Settings: [FILE] 20
Field Settings: [FIELD] 21
Settings (generic): [SETTING] 25
Message Settings: [MSG] 26
[MSG(n)] Message Structure Definitions 27
Performance Point Configuration 37
I/O Rate Tag Configuration 39
Startup Command File 41
Command-line Parameters 41
Sample PI_UFL.bat File 45
Interface Node Clock 47
Security 49
Starting / Stopping the Interface 51
Starting Interface as a Service 51
Stopping Interface Running as a Service 51
Buffering 53
Configuring Buffering with PI-ICU (NT-Intel) 53
Configuring Buffering Manually 56
Example piclient.ini File 58
Appendix A: Error and Informational Messages 59
Message Logs 59
Messages 59
Appendix B: CSV (Comma Delimited) Data Files 63
Data File Example 63
Configuration File Example 63
Explanation 64
Appendix C: XML Document Files 65
Data File Example 65
Configuration File Example 65
Explanation 66
Appendix D: ASCII Data File 69
Data File Example 69
Configuration File Example 69
Point Configuration 70
Explanation 70
Appendix E ASCII Codes Supported 73
Revision History 75
Introduction
This document describes OSIsoft’s Universal File Loader (PI_UFL) interface to the PI system. The PI_UFL interface parses data from various ASCII file formats and stores the data into PI.
The interface processes files that match user defined criteria and the ‘file process order’ can be specified (data files can be sorted according to the creation date, modification date and the actual file name). A configuration file controls how the interface parses data files and stores data to PI. The content of each data file is read line by line. Each line is checked to see whether it matches one of several sets of criteria. If a line matches a set of criteria, data is extracted from the line based on these criteria and the results are stored in variables. The contents of these variables can be manipulated, and on request a set of values can be sent to PI. To operate the interface effectively, the user must thoroughly read the section of this manual concerning the syntax of the configuration file.
The Interface runs on Intel NT machines running NT 4.0 SR 4 or higher. This machine may be either a PI home or PI Interface node.
This document contains the following topics:
• a brief design overview
• a section concerning the details of creating points to be scanned by this interface
• a section concerning the configuration file
• a section concerning the command line parameters
• an overview of the software configuration
• details of operation and installation.
Reference Manuals
OSIsoft
• PI Data Archive Manual
• PI-API Installation Instructions
Supported Features
|Feature |Support |
|Part Number |PI-IN-OS-UFL-NTI |
|Platforms |Windows NT 4.0 / 2000 / XP / 2003 |
|APS Connector |No |
|Point Builder Utility |No |
|ICU Control |No |
|PI Point Types |PI 3: int16 / int32 / float16 / float32 / float64 / |
| |digital / string |
| |PI 2: real / digital / integer |
|Sub-Second Timestamps |Yes |
|Sub-Second Scan Classes |No |
|Automatically Incorporates PI Point Attribute Changes |Yes |
|Exception Reporting |Yes |
|Outputs from PI |No |
|Inputs to PI |Scan-Based |
|Supports Questionable Bit |Yes |
|Maximum Point Count |Unlimited |
|Uses PI-SDK |No |
|PINet to PI 3 String Support |No |
|* Source of Timestamps |Timestamps are read from the input file. |
|* History Recovery |Yes |
|Failover |No |
|UniInt-Based |No |
|Vendor Software Required on PI-API / PINet Node |Not applicable |
|Vendor Software Required on Foreign Device |Not applicable |
|Vendor Hardware Required |Not applicable |
|Additional PI Software Included with Interface |Not applicable |
|Device Point Types |Not applicable |
* See paragraphs below for further explanation.
Source of Timestamps
Timestamps are read from the input file or, when not specified, current server time is used.
History Recovery
History recovery is automatically included with a file-based interface. After the interface has been down for some reason, all files containing data will be processed. As long as these data files are not deleted, they will be processed by the interface the 1st time the interface is run, no matter how much data is stored in these files, no matter how long the interface has been down.
Principles of Operation
Startup
At startup, the PI_UFL interface reads the configuration file. The path of the configuration file is specified as an argument on the command line. The configuration file tells the PI_UFL interface how to interpret data from the input files.
The interface performs a series of syntax checks on the configuration or message definition file and then compiles the contents of the file. If errors are found in the configuration file, messages are written to the output file and the interface halts.
Once the configuration file has been read, the interface reads the PI point database according to the specifications on the startup command line.
• If /ps is specified, all PI points with that PointSource are loaded into the interface. If the configuration file specifies that the value in the message should be sent to the PI point with the given InstrumentTag, only the list of tags loaded at startup are searched. If no matching InstrumentTag is found, the data is not sent to PI. If the Tag name is used, the interface first searches through the list of tags loaded at startup with the given point source. If the tag is not found in the internal list, the entire PI point database is searched.
• If /tm is specified, all PI points with a tag name that fits the tag mask are loaded into the interface. If the configuration file specifies that the value in the message should be sent to the PI point with the given InstrumentTag, only the list of tags loaded at startup are searched. If no matching InstrumentTag is found, the data is not sent to PI. If the Tag name is used, the interface first searches through the list of tags loaded at startup, which match the mask. If the tag is not found in the internal list, the entire PI point database is searched.
• The optional /tm and /ps parameters are mutually exclusive. If neither is specified on the command line, no PI points are loaded at startup. In this case the Tag name must be used in the data file. For optimization the interface will remember a tag that was once accessed, but that is not the same as the internal tag list. Without /tm or /ps InstrumentTag will never find a match.
If all configuration steps are completed successfully, the interface continues with Runtime operation.
Runtime Operation
The PI_UFL interface checks at regular time intervals whether new input files have been created. The scan frequency is specified as an argument, /f=hh:mm:ss,hh,mm,ss, on the command line. For more information on command-line parameters, see section Command-line Parameters.
All files that match the input file mask are treated as input files. The input file mask is specified on the command line.
• The order in which the files are read is based on the file creation time with the oldest files read first.
• Each input file is read, line per line. The PI_UFL interface compares each line read from the input file with the message declarations in the configuration file, starting with the message declared first in the file. As soon as a FILTER condition of a message definition is found that matches the line, the statements in the message definition are executed and the rest of the message definitions are skipped.
Note: If the line from the input file does not match any filter definition, it is skipped, no error is reported.
• After an input file is processed, it is renamed with an extension indicating successful processing. If the file contained an error, it is renamed with a different extension, indicating an error while processing. The extension indicating the successful processing is ‘._OK’, any runtime error causes the processed file is suffixed with ‘.ERR’. Both extensions can be specified on the command line (see section Command-line Parameters).
• After a given time period, files that have been processed without error are deleted. This purge interval is specified by /pu on the command line. Files that contained errors are NOT purged. The default purging period is one day (/pu=1d).
Installation Checklist
For those users who are familiar with running PI data collection interface programs, this checklist helps you get the PI_UFL interface running. If you are not familiar with PI interfaces, you should return to this section after reading the rest of the manual in detail.
1. Install the PI-Interface Configuration Utility (which installs PI-SDK and PI-API)
2. Verify that PI-API has been installed.
3. Install the PI_UFL interface.
4. Create digital states.
5. Choose a point source. If PI 2 home node, create the point source.
6. Configure PI points.
7. Create a configuration file.
8. Edit startup command file.
9. Set interface node clock.
10. Set up security.
11. Test the interface by running it interactively with a high debug level or the /test flag set.
12. Start the interface as a service, but without buffering.
13. Verify data.
14. Stop interface, start buffering, start interface.
Interface Installation
OSIsoft recommends that interfaces be installed on PI Interface nodes instead of directly on the PI Server node. A PI-API node is any node other than the PI Server node where the PI Application Programming Interface (PI-API) has been installed (see the PI-API Installation Instructions manual). With this approach, the PI Server need not compete with interfaces for the machine’s resources. The primary function of the PI Server is to archive data and to service clients that request data.
After the interface has been installed and tested, Bufserv should be enabled on the PI Interface node (once again, see the PI-API Installation Instructions manual). Bufserv is distributed with the PI-API. It is a utility program that provides the capability to store and forward events to a PI Server, allowing continuous data collection when communication to the PI Server is lost. Communication will be lost when there are network problems or when the PI Server is shut down for maintenance, upgrades, backups, or unexpected failures.
In most cases, interfaces on PI Interface nodes should be installed as automatic services. Services keep running after the user logs off. Automatic services automatically restart when the computer is restarted, which is useful in the event of a power failure.
The guidelines are different if an interface is installed on the PI Server node. In this case, the typical procedure is to install the PI Server as an automatic service and interfaces as manual services that are launched by site-specific command files when the PI Server is started. Interfaces that are started as manual services are also stopped in conjunction with the PI Server by site-specific command files. This typical scenario assumes that Bufserv is not enabled on the PI Server node. Bufserv can be enabled on the PI Server node so that interfaces on the PI Server node do not need to be started and stopped in conjunction with PI, but it is not standard practice to enable buffering on the PI Server node. See the UniInt End User Document for special procedural information.
Naming Conventions and Requirements
In the installation procedure below, it is assumed that the name of the interface executable is PI_UFL.exe and that the startup command file is called PI_UFL.bat.
It is customary for the user to rename the executable and the startup command file when multiple copies of the interface are run. For example, one would typically use PI_UFL1.exe and PI_UFL1.bat for interface number 1, PI_UFL2.exe and PI_UFL2.bat for interface number 2, and so on. When an interface is run as a service, the executable and the command file must have the same root name because the service looks for its command-line arguments in a file that has the same root name.
Interface Directories
The PIHOME Directory Tree
The PIHOME directory tree is defined by the PIHOME entry in the pipc.ini configuration file. This pipc.ini file is an ASCII text file, which is located in the WinNT directory. A typical pipc.ini file contains the following lines:
[PIPC]
PIHOME=c:\pipc
The above lines define the \pipc directory as the root of the PIHOME directory tree on the C: drive. OSIsoft recommends using \pipc as the root directory name. The PIHOME directory does not need to be on the C: drive.
Interface Installation Directory
Place all copies of the interface into a single directory. The suggested directory is:
PIHOME\interfaces\PI_UFL\
Replace PIHOME with the corresponding entry in the pipc.ini file.
Interface Installation Procedure
The PI_UFL interface setup program uses the services of the Microsoft Windows Installer. Windows Installer is a standard part of Windows 2000. When running on Windows NT 4.0 systems, the PI_UFL setup program will install the Windows Installer itself if necessary. To install, run the UFL_x.x.x.x.exe installation kit.
If the interface cannot be started interactively, one will not be able to run the interface as a service. It is easier to debug interactively started processes because error messages are echoed directly to the screen. Once the interface is successfully running interactively, one can try to run it as a service by following the instructions below.
Installing the Interface as an NT Service
One can get help for installing the interface as a service at any time with the command:
PI_UFL.exe –help or PI_UFL.exe –?
Change to the directory where the PI_UFL1.exe executable is located. Then, consult the following table to determine the appropriate service installation command.
|NT Service Installation Commands on a PI Interface node or |
|a PI Server node with Bufserv implemented |
|Manual service |PI_UFL.exe –install –depend "tcpip bufserv" |
|Automatic service |PI_UFL.exe –install –auto –depend "tcpip bufserv" |
|NT Service Installation Commands on a PI Interface node or |
|a PI Server node without Bufserv implemented |
|Manual service |PI_UFL.exe –install –depend tcpip |
|Automatic service |PI_UFL.exe –install –auto –depend tcpip |
When the interface is installed as a service on the PI Server node and when Bufserv is not implemented, a dependency on the PI network manager is not necessary because the interface will repeatedly attempt to connect to the PI Server until it is successful.
Note: Interfaces are typically not installed as automatic services when the interface is installed on the PI Server node.
Check the Microsoft Windows NT services control panel to verify that the service was added successfully. One can use the services control panel at any time to change the interface from an automatic service to a manual service or vice versa.
Digital States
For more information regarding Digital States, refer to the Data Archive Manuals.
PI 2 Home Node
Digital states are defined by running the Digtl Stat display from the PI menu. The states must be contiguous for each status type and may be anywhere within the Digital State Table outside of the range 193 - 320, which is reserved for OSIsoft. The digital states need to be defined prior to point configuration. The digital state sets described in the PI 3 sections below should be entered into the PI 2 Digital State Table.
For more information, see the DA manual.
PI 3 Home Node
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 Data Archive Manual for Windows NT and Unix manual.
An interface point that contains discrete data can be stored in PI as a digital tag. A Digital tag associates discrete data with a digital state set, as specified by the user.
System Digital State Set
Similar to digital state sets is the system digital state set. This set is used for all tags, regardless of type to indicate the state of a tag at a particular time. For example, if the interface receives bad data from an interface point, 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.
PointSource
You can start the PI_UFL interface without specifying a point source. One point source character can be specified to speed up the operation of the interface, but it is also possible to run the interface without any point source character specified.
Note: This behavior differs from most other interfaces.
Case-sensitivity for PointSource Attributes
In all cases, the point source characters that are supplied with the /ps command-line argument are not case sensitive. That is, /ps=P and /ps=p are equivalent.
PI 2 Server Nodes
The following point source characters are reserved on PI 2 systems and cannot be used as the point source character for an interface: C, ?, @, Q, T. Also, if one does not specify a point source character when creating a PI point, the point is assigned a default point source character of L. Therefore, it would be confusing to use L as the point source character for an interface.
Before a PI point with a given point source can be created, the point source character must be added to the PI 2 point source table. For example, if point source P is not defined in the PI 2 point source table, a point with a point source of P cannot be created. This prevents the user from accidentally creating a point with an incorrect point source character.
Defining a Point Source Character in the PI 2 Point Source Table
1. Enter PI by typing the following command from a VMS command prompt:
@pisysexe:pi
2. Select the PointSrc option from the menu.
3. Select New from the menu.
4. Assign a point source next to the Code: field. Also, assign minimum and maximum values for the Location1 to Location5 attributes.
| |Location1 |Location2 |Location3 |Location4 |Location5 |
|Minimum |-20000000 |-20000000 |-20000000 |-20000000 |-20000000 |
|Maximum |20000000 |20000000 |20000000 |20000000 |20000000 |
5. Select "Save" from the menu.
PI 3 Server Nodes
No point source table exists on a PI 3 Server, which means that points can be immediately created on PI 3 with any point source character. Several subsystems and applications that ship with PI 3 are associated with default point source characters. The Totalizer Subsystem uses the point source character T, the Alarm Subsystem uses G and @, Random uses R, RampSoak uses 9, and the Performance Equations Subsystem uses C. Either do not use these point source characters or change the default point source characters for these applications. Also, if one does not specify a point source character when creating a PI point, the point is assigned a default point source character of L. Therefore, it would be confusing to use L as the point source character for an interface.
PI Point Configuration
The PI point is the basic building block for controlling data flow to and from the PI Data Archive. A single point is configured for each measurement value that needs to be archived. Use the point attributes below to define what data to transfer.
Point Attributes
Tag
A tag is a label or name for a point. Any tag name can be used in accordance to the normal PI point naming conventions.
Tag may be specified in the input file as the means for determining in which PI point to store the value. Alternatively, the InstrumentTag may be specified. Whether Tag or InstrumentTag is specified in the input file, the PI point attribute Tag is required when creating the point.
PointSource
The PointSource is a single, unique character that is used to identify the PI point as a point that belongs to a particular interface. While the interface may collect data without regard to the PointSource, the PI point attribute PointSource is required when creating the point.
For additional information, see the /ps command-line argument and the "PointSource" section.
PointType
Typically, the types of values read from the data files do not need to correspond to PI point types. For example, integer values read from a file can be sent to floating point or digital PI tags. Similarly, a floating-point value read from a file can be sent to integer or digital PI tags, although the values will be truncated.
PI 2 Server Nodes
Scaled real, full-precision real, integer, and digital point types are supported on PI 2 Servers. For more information on the individual point types, refer to the Data Archive (DA) section of PI System Manual I.
PI 3 Server Nodes
Float16, float32, float64, int16, int32, digital, and string point types are supported on PI 3 Servers. For more information on the individual point types, see PI Data Archive for NT and UNIX. Blob tags are NOT supported by the PI_UFL interface.
Location1-5
The location parameters are NOT used for the PI_UFL interface.
InstrumentTag
This is the instrument tag attribute. The instrument tag is limited to 32 characters. The PI_UFL interface references data either by Tag or by InstrumentTag attribute. If the InstrumentTag attribute is used, the point must belong to the interface point source or the Tag must match the tag mask specified with the /tm command-line parameter in order to collect data.
ExDesc
This attribute is not used for the PI_UFL interface.
Scan
The Scan flag is not used for the PI_UFL interface.
Note: This behavior differs from most interfaces.
Shutdown
PI 2 Server Nodes
The Shutdown attribute is not used if the server node is a PI 2 system. For information on configuring shutdown events for PI 2, see Data Archive (DA) section 4.2.3 of PI System Manual I.
PI 3 Server Nodes
The shutdown attribute is used only if the server node is a PI 3 system.
The Shutdown attribute is 1 (true) by default. The default behavior of the PI Shutdown subsystem is to write the SHUTDOWN digital state to all PI points when PI is started. The timestamp that is used for the SHUTDOWN events is retrieved from a file that is updated by the Snapshot Subsystem. The timestamp is usually updated every 15 minutes, which means that the timestamp for the SHUTDOWN events will be accurate to within 15 minutes in the event of a power failure. For additional information on shutdown events, refer to PI Data Archive for NT and UNIX.
One can disable SHUTDOWN events from being written to PI when PI is restarted by setting the Shutdown attribute to 0 for each point. Alternatively, one can change the default behavior of the PI Shutdown Subsystem to write SHUTDOWN events only for PI points that have their Shutdown attribute set to 0. To change the default behavior, edit the \PI\dat\Shutdown.dat file, as discussed in PI Data Archive for NT and UNIX.
Bufserv
It is undesirable to write shutdown events when Bufserv is being used. Bufserv is a utility program that provides the capability to store and forward events to a PI Server, allowing continuous data collection when the Server is down for maintenance, upgrades, backups, and unexpected failures. That is, when PI is shut down, Bufserv will continue to collect data for the interface, making it undesirable to write SHUTDOWN events to the PI points for this interface.
Output Points
The PI-Universal File Loader interface does NOT support output points.
Configuration File
The interface uses a configuration file to describe how to interpret the data input file. It is pointed to by the startup parameter /cf=xxx.yyy, and is divided into Sections and Keys. Sections are enclosed in square brackets and can contain any number of ‘keyword assignments’ underneath, The configuration file thus resembles the structure of a standard INI file. (Refer to Appendices B-D for configuration examples and discussion. Example configuration files, data files and batch startup files are also included with this interface in the directories PIHOME\Interfaces\PI_UFL\Examples and PIHOME\Interfaces\PI_UFL\Examples\Data\).
In the following paragraphs we will discuss the individual Sections and Key definitions in detail:
General
The configuration file makes it possible for the interface to evaluate a variety of different ASCII data files. Examples are comma separated (csv) data files, column oriented data files, or XML data files. The interface design assumes there is some kind of coherent and consistent structure to the data files.
A repeating data structure in the data file is called a "message" and a data file may have multiple messages or “message types.” The configuration file is used to tell the interface how to find messages in a data file that correspond to a certain message type. The message type structure is divided into fields and must be described in detail so that the interface can parse the messages. The input files are ASCII data files, which mean that the fields contain ASCII text. However, it is necessary to convert text into various data types, depending on the meaning of a certain field. For example a field that contains a date/time string needs associated declarations that tell the interface how to convert the string into a valid internal timestamp. Such conversion definitions must also be specified in the configuration file.
Besides data extraction directives, the configuration file contains optional sections that influence interface behavior; e.g., a method of determining line termination characters. All configuration file sections and their keywords are detailed below. A simple example of a configuration file is given here while more complex examples can be found in the Appendices to this document.
Comments
Comment lines and blank lines can be included in a configuration file. Such comment lines placed in the configuration file are there for the benefit of the person doing the configuration, and for other people who might examine the file later.
The PI_UFL interface ignores blank lines and all characters following a comment character on a line. Any comment characters within a string are ignored.
The comment character is an ' (apostrophe).
Example Comment Lines
'-----------------------------------------------------------------
' Get QUANTITY DETAILS
'-----------------------------------------------------------------
' QTY+46:-140:KWH
' ¦-'¦--'¦--'¦--'
' ¦ ¦ ¦ +> Units, KWH
' ¦ ¦ +> actual quantity
' ¦ +> Delivered quantity code
' +> QUANTITY DETAILS
Line Continuation
Data in the configuration file can be split over several lines. In this case the line continuation ‘_’ (underscore) character must be used.
File Settings: [FILE]
This section is optional, but if present, it should be the first section in the configuration file.
This section is only used to stipulate any special handling of the data files. If the data files do not use the default ASCII line termination (carriage return-linefeed pair), the [FILE] section can be used to specify how new lines are determined.
The following optional keyword may be specified.
NEWLINE =
By default a line is read from the input file, until a carriage return–linefeed pair of characters is read. This is the default line termination for ASCII files.
A different set of new line characters may be specified. In that case, characters are read from the input file until the indicated combination of characters specified is read. The characters read, excluding the new line characters, are treated as a line.
NEWLINE = x{,y…}
The NEWLINE keyword is followed by one or more characters, separated by commas.
• The combination of all characters is interpreted as a linefeed.
• Numbers are interpreted as ASCII codes
• Three predefined codes can be supplied: CR, LF and CRLF.
This way it is possible to configure non-printable characters, or characters that have a special meaning, like a space, a single quote ('), etc. If you want to configure a digit as linefeed character, you must specify its ASCII code. If you identify an ASCII code in the configuration file, do not use quotation marks.
See Appendix E for a list of supported ASCII codes.
Example 1. Newline Specification
[FILE]
' Single quote: ' as line separator
' This character has a special meaning, so use ASCII code
NEWLINE = 39
' instead.
Example 2. Newline Specification
[FILE]
' NEWLINE = CRLF ' Use Carriage Return Linefeed (default)
Field Settings: [FIELD]
If present, this section should be specified after the [FILE] section. The [FIELD] section is required if you need to define field types (e.g. Timestamps or Numbers). If the field type is not specified, it is assumed to be a string. Each message , once recognized, can thus be split into different fields. The following keywords are recognized:
FIELD(n).Name
Depending on the data file structure, the user can specify as many field definitions as necessary. Like the [MSG] section described below, the field types can be unnamed (FIELD(1), FIELD(2), etc.) however it is recommended the user give the field a descriptive name. Once the name has been entered into the [FIELD] section, it can be used in all references to the particular field. The name can be a helpful mnemonic for the user.
The [FIELD] section is where the user specifies the type of data expected from the data file (Timestamp, Number, String or DSTFlag.)
FIELD(n).Name = "FieldName"
After the definition, n can be referenced by the meaningful name specified by the user.
A valid name starts with a letter (A-Z), followed by letters, digits (0-9) and underscore characters. Letters are not case sensitive. The name is enclosed in double quotes.
Avoid character strings with a predefined meaning, like "FIELD", "MSG", or similar.
Example Field Mnemonic
[FIELD]
' Define different field names
FIELD(1).NAME = "TAG"
FIELD(2).NAME = "VALUE"
FIELD(3).NAME = "TIME"
Note: One can use both, the name as well as the unnamed field (FIELD(n)) in any further reference to this variable (field). See Example1 in the installed samples suite.
FIELD(n).Type
By default each field is of type string. In certain cases it is useful to assign a different type to a field. Four types are supported: String, Number, Time, and DSTFlag.
FIELD(n).Type = "String"
If no type is specified, this is the default. No interpretation is done and the data is copied from the input as is.
FIELD(n).Type = "Number"
In this case the data read from the input message is converted to a number.
FIELD(n).Type = "Time"
This is particularly useful when reading and interpreting date/time strings from an input message. In this case an expected date/time format attribute can be specified (see Field(n).Format description).
Note: Variables of type "Time" will immediately be converted into an internal timestamp data type (float number containing seconds since 1970 in the integer part and milliseconds in the fractional part). Further calculation lines in the configuration file therefore have to treat these variables as "Number".
FIELD(n).Type = "DSTFlag"
This Flag used in conjunction with the action StoreInPIDST( ) translates into the marker telling whether the timestamp in the action is in Standard Time, ST, or Daylight Savings Time, DST. The FIELD(n).Type="DSTFlag" also requires a FIELD(n).Format definition (see the description below in Field Type "DSTFlag").
Note: Variables of type "DSTFlag" will internally be converted into an integer number. Further calculation lines in the configuration file therefore must treat these variables as "Number".
FIELD(n).Format
For the field types "Time" and "DSTFlag" a format attribute should be specified to describe the format that is expected to appear in the data file. Only one format can be specified per field. If the format in the data file does not match the one specified here, data cannot be evaluated and error messages will occur.
Field Type "Time"
Internally a field of type "Time" stores time in a standard PI timestamp format used by the PI_UFL interface: ssssssss.nnn, where ssssssss is the number of seconds since 1970, and nnn is the number of milliseconds.
Example Field Format
[Field]
Field(1).Type = "Time"
TIME.Format = "dd-MMM-yy hh:mm:ss", _
"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec"
Field(2).Type = "Number"
[MSG(1)]
MSG(1).Filter = c1=="TIME*"
Field(1) = ["*(##-???-## ##:##:##)*"]
Assume an input line:
TIME: 27-Jul-02 13:11:10
This matches the filter condition of Field(1). The time stamp retrieved by the interface (27-Jul-02 13:11:10) is converted to seconds since 1970. Therefore, the value of Field(1) will be set to
1027775470.000
If you want to add one hour to this timestamp, you have to write
' Add 3600 seconds (=1 hour)
Field(2) = Field(1) + 3600
The value of Field(2) will be set to
1027779070.000
Note: An assignment like the following will produce an error, because Field(1) on the left hand side expects as input the format specified as "dd-MMM-yy hh:mm:ss" but instead receives a float number.
' Add 3600 seconds (=1 hour)
' This will produce an error
Field(1) = Field(1) + 3600
Format
The value of the Format attribute, Field(n).Format, is used to convert a time string read from the input file to the standard PI timestamp format used by the PI_UFL interface.
The following characters are allowed in the format string:
|Characters in format |Accepts the following from the input file |
|‘yy |Year, two digits. |
|‘yyyy |Year, four digits. |
|‘‘MM |Month, two digits. |
|‘M |Month, one or two digits. |
|‘‘MMM |Month, in string format. The exact spelling of the months is specified by|
| |the value of an additional parameter MonthList: |
| |“dd-MMM-yy”, “MonthsList”. |
| |In “MonthList”, each month has to be ‘named’ and separated by a comma. |
| |See examples on the next page. |
| |The “MonthList” is optional. When not specified, the Us-En months |
| |abbreviations "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec” |
| |are assumed. |
|‘dd |Day of the month, two digits. |
|d |Day of the month, one or two digits. |
|hh |Hour, two digits. By default a 24-hour clock is assumed, unless p or pp |
| |is used to specify AM/PM.. |
|h |Hour, one or two digits. |
|‘m |Minutes, one or two digits. |
|‘mm |Minutes, two digits. |
|‘s |Seconds, one or two digits. |
|‘ss |Seconds, two digits. |
|‘n |Tenths of a second. |
|‘nn |Hundredths of a second |
|‘nnn |Millisecondes |
|‘p |A/P for AM/PM. In this case a 12-hour clock is assumed. |
|‘pp |AM/PM. In this case a 12-hour clock is assumed. |
Note: The format string is CASE SENSITIVE
Note: When the two-digit format is used for the month, the Months parameter can be an empty string.
Example Time Format Strings
"dd-MMM-yy hh:mm:ss",_
"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec"
Foreign Language Example:
"dd-MMM-yy hh:mm:ss", _
"Jan,Feb,Mär,Apr,Mai,Jun,Jul,Aug,Sep,Okt,Nov,Dez"
"dd-MM-yyyy hh:mm"
"dd/MM/yy hh:mm:ss"
"M/d/yyyy hh:mm:ss.nnn"
Instead of a user-defined format string, two predefined formats may be used. These formats cannot be used in conjunction with any of the above defined format characters.
|Format string |Accepts the following from the input file |
|SECONDS_GMT |Number of seconds since 1970, in UTC. |
|SECONDS_LOCAL |Number of seconds since 1970, in local time. |
Example Field Definition
[FIELD]
' Define different field names
FIELD(1).NAME = "TAG"
TAG.TYPE = "String"
FIELD(2).NAME = "VALUE"
VALUE.Type = "Number"
FIELD(3).NAME = "TIME"
TIME.TYPE = "Time"
TIME.Format = "dd-MMM-yy hh:mm:ss.nn pp", _
"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec"
Field Type "DSTFlag"
The optional field type DSTFlag may be used to define the relationship of the timestamp field to Daylight Savings Time (DST). The Format property expects two words, delimited by a comma. The first word maps to a value of 0 to indicate no adjustment for Daylight Savings Time and the second one maps to a value of 1 to indicate that the time should be adjusted for Daylight Savings Time. Either of the two words is expected in the data file at the field location. The way in which the time correction is applied depends on the various scenarios. The user may make an adjustment in the configuration file and then take action using the adjusted timestamp or the StoreInPIDST() may be used, in which case the adjustment will be made by the interface. The example below adds a fixed 1 hour offset whenever a timestamp is flagged with the "summer" keyword. This will be suitable when the interface node is not configured for automatic DST clock adjustment but the data file comes from another computer where DST adjustment was used. When the interface node is configured for automatic DST clock adjustment we provide a special action called StoreInPIDST (see description below).
Note: If the Format property is omitted, but DSTFlag is used, the interface expects 0 or 1 in the data file.
The example shows how to add one hour depending on the presence of the word winter or summer in the data file.
Example of DSTFlag
[FIELD]
…
FIELD(x).NAME = "DSTTime"
FIELD(x).Type = "Number"
…
FIELD(y).NAME = "DSTField"
DSTField.TYPE = "DSTFlag"
DSTField.Format = "winter,summer"
…
DSTTime = TIME + DSTField * 3600
MSG.ACTION = StoreInPI(TAG,,DSTTime,VALUE,,)
Settings (generic): [SETTING]
This (optional) section is intended for various specifications. The following keywords are recognized:
LOCALE =
Specifies how the interface will transform numbers, i.e. which Locale it will use for the transformation - from the string form to the numeric representation. The different decimal separators will thus be correctly translated. The list of all Locale codes can be found at:
One can use the long as well as the short form, or the LCID (all three forms are equivalent). Following examples demonstrate it:
Example Locale
[SETTING]
LOCALE = "German - Germany"
or
LOCALE = "de-de"
or
LOCALE = 1031
Message Settings: [MSG]
This optional section must be specified after the [FILE] section, but before any message definitions.
Each line (or in certain cases a combination of lines) is treated as a single message. For each message type the user must provide sufficient information about the message structure so that each message type can be uniquely identified. The interface design supports recognizing message types using a set of keywords or pattern declarations: a particular message type is recognized by a set of filter conditions and divided into fields.
The [MSG] section is used to define message names which will be referenced later in the configuration file. The user can choose to give each message a descriptive name rather than using a generic name. This is particularly useful in situations where multiple messages are expected.
Note: Although optional, the [MSG] section is recommended.
MSG(n).Name
Depending on the data file structure, the user can specify as many message structure definitions as necessary. The message types can be unnamed (MSG(1), MSG(2), etc.) however it is recommended the user give the message type a meaningful name. Once the name has been entered into the [MSG] section, it should be used in all references to the particular message structure definition.
MSG(n).NAME = "common name "
After the definition, n can be referenced by the common name.
A valid name starts with a letter (A-Z), followed by letters, digits (0-9) and underscore characters. Letters are not case sensitive. The name is enclosed in double quotes.
Avoid character strings with a predefined meaning, like "FIELD", "MSG", or similar.
Note: Characters other than letters, digits and underscores are not allowed.
Example Message Type Common Name
[MSG]
' Define different message type names
MSG(1).NAME = "HEADER"
MSG(2).NAME = "DATA_LINE"
[MSG(n)] Message Structure Definitions
This section is mandatory. One or more message structure definition sections must be specified. If multiple message types are possible, it is recommended to use the Message Names defined in the [MSG] section as section names to organize your configuration file.
To extract data from a line of the input file, a message structure definition must be specified that instructs the interface on how to parse the data. The parsing instructions include filter conditions and field definitions.
Example 1. Field Definition
[MSG(1)]
' Define a filter condition.
' A message belongs to this type if the line
' does not start with "!*"
' and if the string "TAG" is located at column 10
' and string "VALUE" is located at column 30
' the data to read is then taken from the first 4 columns
MSG(1).Filter = NOT C1=="!*" AND C10=="TAG*" AND C30=="VALUE*"
FIELD(1) = C1 – C4
MSG(n).Filter
At least one filter attribute must be specified. Additional Filter attribute lines are optional, depending on the data file structure. The filter indicates the required conditions for a line to be recognized as a specific message type.
Note: Once a match is found, all other message definitions are ignored. Messages are read from top to bottom in the configuration file
([MSG(1)] [MSG(2)] …)
MSG(n).Filter = Set Of Filter Conditions
• A filter can consist of one or more filter conditions.
• Each filter condition can be inverted by the NOT keyword.
• Different filter conditions can be AND-ed or OR-ed together, optionally with parentheses ( ) for grouping.
Each filter condition has the following layout:
Cn=="Pattern"
Where n is the column number of the starting character position. This can refer to a single position or to a range by noting Cn-Cn+x. The pattern must be enclosed in double quotes.
Pattern syntax
The following special characters are recognized in the above pattern string.
|Characters in pattern declaration |Matches the following in a line from the input file |
|? |Any single character |
|* |Zero or more characters |
|# |Any single digit (0 — 9) |
|[character list] |Any single character in character list. Must be enclosed in square |
| |brackets. |
|[!character list] |Any single character not in character list. Must be enclosed in square |
| |brackets. |
|( ) |A section in the pattern declaration that is enclosed with parentheses |
| |indicates the section of the input line that must be extracted. |
|\ |To match any of the above mentioned characters with a special meaning, |
| |you can either put the character within square brackets [ ] or prefix it |
| |with a backslash \. To have a literal match on a \, use \\. |
Example 1. Filter Condition
[MSG(1)]
' In this case a line matches the filter if
' NOT C1=="!*" line doesn’t start with a !
' C10=="TAG*" line from character 10 on has the string TAG
' followed by any number of characters
' C30=="VALUE*" line from character 30 on has the string VALUE
' followed by any number of characters
MSG(1).Filter = NOT C1=="!*" AND C10=="TAG*" AND C30=="VALUE*"
The following data line would match the filter criteria:
1234 TAG=mytag VALUE=10.0
Note: Several filter definitions can be given within one MSG definition. In this case the message is processed if it matches the 1st filter and this up to the 2nd filter definition.
The message definition after the 2nd filter definition is processed only if the 1st filter was passed, and if the message matches the 2nd filter definition.
The message definition after the 3rd filter definition is processed only if the 1st and 2nd filters passed, and the message matches the 3rd filter definition, and so on.
Example 2. Filter Condition (equivalent to Example 1)
[MSG(1)]
' In this case a line matches the filter if
' NOT C1=="!*" line doesn’t start with a !
' C10=="TAG*" line from character 10 on has the string TAG
' followed by any number of characters
' C30=="VALUE*" line from character 30 on has the string VALUE
' followed by any number of characters
MSG(1).Filter = NOT C1=="!*"
MSG(1).Filter = C10=="TAG*"
MSG(1).Filter = C30=="VALUE*"
Example 3: Filter Condition (use of brackets)
[MSG(1)]
' In this case a line matches the filter if
' any of the characters in square brackets are found
MSG(1).Filter = “State.City.[ABCDE].*”
[MSG(2)]
MSG(2).Filter = “Plant.Area.Operation.[QXZ]*”
Note: MSG(1) filter will match the following: State.City.A.xxx, State.City.B.xxx, State.City.C.xxx, State.City.D.xxx, State.City.E.xxx.
MSG(2) filter will match the following: Plant.Area.Operation.Q, Plant.Area.Operation.X, Plant.Area.Operation.Z
Example 4: Filter Condition (use of brackets and “NOT”)
[MSG(1)]
' In this case a line matches the filter if the
' character(s) in square brackets are not found
'
MSG(1).Filter = “State.City.[!DE].*”
[MSG(2)]
MSG(2).Filter = “Plant.Area.Operation.[!Q]*”
Note: MSG(1) filter will match the following: State.City.A.xxx, State.City.B.xxx, State.City.C.xxx. State.City.D.xxx, State.City.E.xxx will not generate a match.
MSG(2) filter will match the following: Plant.Area.Operation.Q, Plant.Area.Operation.X, Plant.Area.Operation.Z
Field(n).Value
Once a line has passed the filter condition, the message has to be interpreted, and divided into smaller units, or fields, that relate to concrete values or PI tags. This is done through the Field(n) = … construction. Fields are numbered using the index ‘n’, or can be accessed by their alias name.
Note: A field’s value is retained until it is replaced with a new value in the data file, or until the interface program is stopped.
Data Extraction
Each part of the message can be assigned to an individual field through a simple assignment.
Field(n) = Ci – Cj
Note: Field(n)=… is equivalent to Field(n).Value=…
The value of field n will be the characters from the input line, from position i to position j (the 1st character in a string has position 1). When the columns are not fixed, a more general extraction can be used.
Note: i and j columns are inclusive.
Example 1. Field Assignment
' Field 1 will get the 1st 10 characters from the input line
FIELD(1) = C1 - C10
Field(n) = Ci – Cj("Mask")
Field(n) = Ci – ("Mask")
Field(n) = Ci("Mask") – ("Mask")
Each Cn statement can be replaced by a slightly more general purpose statement, of the form Ci("Mask").
Note: The "Mask" string columns are exclusive.
Example 2. Using a Mask
' Field 2 will get characters 11 up to (but not including) the
' 1st comma ',' after position 11
FIELD(2) = C11 - C11(",")
Example 3. Using a Mask
' Field 3 will start after the 1st comma ',' after position 11 up
' to (but not including) the 1st comma ',' after that
‘ (no Cj: supplied)
FIELD(3) = C11(",") - (",")
Example 4. Using a Mask
' Field 4 will get characters 31 up to (but not including) the
' 1st semi-colon ‘;’, commas ‘,’ or colon ‘:’ after position 41
FIELD(4) = C31 - C41("[;,:]")
Example 5. Using a Mask
' Field 5 will get characters 51 up to (but not including) the
' 1st NON-DIGIT after position 51
FIELD(5) = C51 - C51("[!0123456789]")
Example 6. Using a Mask
' Field n will get characters from Ci till the end of the message
Field(n) = Ci – NEWLINE
Field(n) = Ci("Mask") – NEWLINE
The two options above allow reading until the end of the line.
Mask Syntax
The following special characters are recognized in the above Mask patterns.
|Characters in mask declaration |Matches the following in a line from the input file |
|? |Any single character |
|* |Zero or more characters |
|# |Any single digit (0 — 9) |
|[character string] |Any single character in character string. Must be enclosed in square |
| |brackets |
|[!character string] |Any single character not in character string. Must be enclosed in square |
| |brackets |
|( ) |A section in the mask declaration that is enclosed with parentheses ( ) |
| |indicates the section of the input line that must be extracted. |
|\ |To match any of the above mentioned characters with a special meaning, |
| |you can either put the character within square brackets [ ] or prefix it |
| |with a backslash \. To have a literal match on a backslash use \\. |
Field(n) = ["Mask With ( )"]
This is the most complicated and most powerful extraction mechanism. You can specify a mask in standard wild-card notation, and the line will be parsed using this mask specification. But, to indicate which part of the message you want to extract, you have to enclose this part in parentheses ( ).
Example 1. Using a Parenthetical Mask
' Input file of following format, but not fixed length
' Tag Name, Time Stamp, Value, can be digital string
' NOTE: If there are MORE than 3 commas in the input file, the
' value of the 3rd parameter will contain a comma
' Tag name
FIELD(1) = ["(*),*,*"]
' Time stamp
FIELD(2) = ["*,(*),*"]
' Value
FIELD(3) = ["*,*,(*)"]
Data Manipulation
Data stored in any of the fields, can also be manipulated, to yield new data. Remember that fields in the data file are read into field variables (defined in the configuration file) that exist in the interface to temporarily hold this data. Before data is sent from the temporary field variables into PI they can be further manipulated.
Note: Interface activity follows the order specified in the configuration file. Any operations defined on variables after a certain action definition line will not have any effect on this action.
Any statement of the form FIELD(n) =… defines an assignment operation. Some rules must be taken into account when writing assignment statements.
• The value of the expression on the right hand side of the = is stored in the field on the left hand side. Special consideration must be taken when assigning values to a time field; see appendices.
• The data types of all operands in the expression on the right hand side of an assignment are implicitly converted as needed. E.g.: when two operands are added using a +, both operands are interpreted as numbers.
• The expression can be made up of a sequence of operators operating on operands. The following operators are recognized; the operations are defined in order of precedence:
|Operator |Meaning |Data Types Operands |
|^ |Power |Numeric |
|* / |Multiply and Divide (numbers only) |Numeric |
|+ - |Add and Subtract. |Numeric |
|& |String concatenation |String |
|AND |Logical AND |Numeric |
| |The logical AND will check if both operands are different | |
| |from 0; if so, the result will be 1 else the result will be | |
| |0. | |
|OR |Logical OR. |Numeric |
| |The logical OR will check if one or both operands are | |
| |different from 0; if so, the result will be 1 else the result| |
| |will be 0 | |
Example 1. Data Manipulation
[FIELDS]
FIELD(1).Type = "String"
FIELD(2).Type = "Number"
..
[MSG(1)]
' Assume an input line
' "TAG: 001, Value: 1.23"
' We want to create a tagname TAG_001
FIELD(1) = C6 – (",")
FIELD(1) = "TAG_" & FIELD(1)
‘
' We want to extract the value and scale it
' The - C1000 will extract everything up to the end
FIELD(2) = C17 - C1000
FIELD(2) = 100 – 50 * FIELD(2)
MSG(n).Action
All actions have the following format:
MSG (n).Action = ActionName (Optional Paremeters)
After a line has been identified as a particular message, and the data has been extracted and stored into different fields, the data is ready to be stored in PI (see StoreInPI (Tag, InstrumentTag, Time, Value, Status, Questionable). But in certain cases, other actions can be taken as well.
Note: Omitting any Action (e.g. for lines identified as comments) is possible, too.
AppendLines(i)
This will append i lines to the current line. The rest of the lines in the MSG definition will be treated as an input line that includes the newly appended lines.
This action is useful when data spans several lines in the input file.
Example 1. Appending Lines
It may be useful to concatenate the data lines below.
Data file:
BATCH: 9904
START: 10-nov-99 12:00:00
END: 10-nov-99 12:52:00
PRODUCT: 12AB
UNIT: R11
START: 10-nov-99 12:10:00
END: 10-nov-99 12:12:00
..
Configuration file:
[MSG]
MSG(1).Name = “Batch”
MSG(2).Name = “Unit”
[Batch]
Batch.Filter = C1 == “Batch*”
Batch.AppendLines(3)
[Unit]
Unit.Filter = C1 == “Unit*”
Unit.AppendLines(2)
Results:
Batch = BATCH: 9904 START: 10-nov-99 12:00:00 END: 10-nov-99 12:52:00 PRODUCT: 12AB
Unit = UNIT: R11 START: 10-nov-99 12:10:00 END: 10-nov-99 12:12:00
SetNextMsg (MSG [, NumberOfMsgs])
This will force the next lines read from the input file to be checked only against the filter of the message MSG.
The second parameter is optional.
• If the second parameter is not specified, all new lines read from the input file will only be checked against the filter of the message MSG, until a line is read that doesn’t match the filter conditions of this MSG.
• If the second parameter is greater than or equal to 0, then the next NumberOfMsgs lines read from the input file will only be checked against the filter of the message MSG, or until a line is read that doesn’t match the filter conditions of this MSG.
When there is a match, the rest of the message definition will be processed. After a filter mismatch, processing returns to normal and starts with the current line. This means that the current line will be re-processed for the next MSG(n) in order of the configuration file. The MSG can be identified by its name or by its number:
MSG(1).Action = SetNextMsg ("OtherMsg", 10)
MSG(1).Action = SetNextMsg ( 3, 10)
This construct is very useful in cases where the input file has a structure where a line cannot be interpreted based on the line itself. The interpretation then depends on one of the preceding lines. An example is a line that contains operator comments. One cannot know what the operator will write, so the detection of this line can only be done in the context of other lines.
Example 1. SetNextMsg
Data file:
HEADER DATA: Tag, Day
Timestamp, Value
Timestamp, Value
…
Timestamp, Value
HEADER DATA: Tag, Day
Timestamp, Value
Timestamp, Value
'Day' format is dd-MMM-yy
'Timestamp' format is hh:mm
Configuration file:
…
[FIELD]
FIELD(5).NAME = "FULLTIME"
FULLTIME.TYPE = "Time"
FULLTIME.Format = "dd-MMM-yy hh:mm ", _
"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec"
…
[MSG(1)]
MSG(1).Filter = C1 == "HEADER DATA"
FIELD(1) = ["*:(*),*"]
FIELD(2) = ["*:*,(*)"]
MSG(1).ACTION = SetNextMsg (2,) ' check next couple of lines
' only agains MSG(2)
' until it fails to match
[MSG(2)]
MSG(2).Filter = C1 == "##:##" ' to check for a valid time
FIELD(3) = ["(*),*"] ' time
FIELD(4) = ["*,(*)"] ' value
FULLTIME = FIELD(2) & " " & FIELD(3)
MSG(2).ACTION = StoreInPI (FIELD(1),,FULLTIME,FIELD(4),,)
SkipFile
This will skip the rest of the input file. This can be used when a certain message in the input file indicates that the data in the file should not be read.
SkipLines(i)
This will skip the next i lines from the input file. This can be used to skip irrelevant data.
StoreInPI (Tag, InstrumentTag, Time, Value, Status, Questionable)
This action will store a value in PI.
Note: Operations cannot be performed within the parameter list. They have to be done in previous lines of the configuration file.
Tag & InstrumentTag
The point is identified either by its Tag name or by the InstrumentTag parameter. Either the tag name or the instrument tag must be provided. In case both are given, the tag name is used.
Time
The time is PI local time in seconds since 1970, including milliseconds, for example 1009843200.980. It should be supplied by a field of type "Time". The field may be a different type, but then it must represent the numerical value of the timestamp. E.g. string "1234.56" is numeric and will work for the correct time, but string "10/11/2003 07:22:40" will not work. An empty parameter defaults to current time.
Value
The value can be a number or a string. The value field can be any appropriate numeric type, a digital state string, or a string for string type points available on PI 3 servers. Type conversion is automatic; however string to numeric conversion can lead to errors if the string does not represent a numeric value.
Note: For digital points, the value can be in both forms – numeric as well as string. The former represents the offset into the digital point’s state set; the latter is translated into the corresponding digital code.
Status
The status field is optional. There can be a digital ordinal number (0, 1, 2, etc.) in the status field. A value in the ordinal field will take precedence over any value in the value field according to the rules below:
• Ordinal values 1 - x for non-digital points specify the corresponding system digital state to be written to the point
• For digital points the positive status (1-x) is not used.
• Ordinal values -1 - -x (negative values) for all point types specify the system digital state to be written to the point.
The last field, the questionable bit, is optional. 1 for questionable bit being set, 0 for not set. Questionable indicates that there is some reason to doubt the accuracy of the value.
Optional fields can be left empty, but the commas must be included. Even if the last fields are omitted, you need to supply the commas.
Example 1. StoreInPI
' Write a field value to PI: fixed tag name, current time
' (for debugging purposes)
MSG(1).Action = StoreInPi ("test:0011",,,FIELD(1),,)
Example 2. StoreInPI
' Assume FIELD(1) contains the tag name,
' FIELD(2) holds the timestamp
' FIELD(3) the value
MSG(2).Action = StoreInPI (FIELD(1),,FIELD(2),FIELD(3),,)
StoreInPIDST (Tag, InstrumentTag, Time, Value, Status, Questionable, DST)
This action provides the same functionality as StoreInPI( ) with the additional parameter (DST) working in conjunction with the DSTFlag (see FIELD(n).Format). Two scenarios are recognized:
1. If the computer adjusts clock for daylight saving changes ("Automatically adjust clock for daylight saving changes" is checked in "Date/Time Properties" Windows dialog.), then the DST parameter is only evaluated during the ambiguous hour (fall change).
2. If the computer does NOT adjust the clock for daylight saving changes, then the DST parameter is used to get summer time corrected, i.e. 1 hour is subtracted.
Performance Point Configuration
Performance points are not used for the PI_UFL interface.
I/O Rate Tag Configuration
I/O Rate points are not used for the PI_UFL interface.
Startup Command File
Command-line arguments can begin with a / or with a -. For example, the /ps=M and -ps=M command-line arguments are equivalent.
Command file names have a .bat extension. The NT continuation character (^) allows one to use multiple lines for the startup command. The maximum length of each line is 1024 characters (1 kilobyte). The number of flags is unlimited, and the maximum length of each flag is 1024 characters.
The PI-Interface Configuration Utility (PI-ICU) provides a tool for configuring the Interface startup command file.
The startup parameters are to be entered in standard command line fashion:
[pic]
Command-line Parameters
The command-line parameters are listed alphabetically in the table below.
|Parameter |Description |
|/cf=xxx.yyy |The full path pointing to the Configuration File |
|Required | |
|/db=n |Switches debugging on; default is no debugging (level 0). N can be between 0 (no debug, |
|Optional |default) and 7, maximum debugging. |
| |0 |No debug |
| |1 |Tasks that are normally performed once are reported (e.g. startup and |
| | |shutdown messages) |
| |2 |Same as 1, but with more details. |
| |3 |Tasks that are performed regularly are reported (loops etc.) |
| |4 |Same as 3, but with more details. |
| |5 |High level of reporting. Most tasks get reported. |
| |6 |Same as 5, but with more details. |
|/des=n |Default Error Status, stored in PI when status string sent to PI cannot be translated. N |
|Optional |is a number from the PI system digital state table. |
|/err=xxx |Extension used when renaming files that contained an Error. Default .ERR. |
|Optional |If an error was found during processing, the input file is renamed to .xxxxxx.ERR, where is the filename before processing without |
| |extension, xxxx is the date of processing (yyyyMMddhhmmss). |
| |Errors that cause a file to be renamed to .xxxxxx.ERR can be |
| |run time errors (like a divide by zero), |
| |missing PI tags (trying to store a value to a tag that could not be found, unless the |
| |/imt has been set) |
| |storage errors (like storing a value too far in the future) |
|/f=HH:MM:SS |The /f flag defines the time period between scans in terms of hours (HH), minutes (MM), |
|Required |and seconds (SS). Only the first instance of the /f flag on the command line is taken |
| |into account by the interface. It defines the scan class for the interface. |
| |Example: |
| |/f=00:01:00 |
| |The interface will scan with a frequency of 1 minute. |
|/host=host:port |The /host flag is used to specify the PI Home node. host is the IP address of the PI |
|Required |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 and 545 for a PI 2 Server. It is|
| |recommended to explicitly define the host and port on the command line with the /host |
| |flag. 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 a PI-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 flags would be: |
| |/host=marvin |
| |/host=marvin:5450 |
| |/host=206.79.198.30 |
| |/host=206.79.198.30:5450 |
|/id=x |The /id flag is used to specify the interface identifier. |
|Optional |The interface identifier is a string that is no longer than 9 characters in length. This |
| |string is concatenated to the header that is used to identify error messages as belonging|
| |to a particular interface. See the section "Error and Informational Messages" for more |
| |information. |
|/if=xxx.yyy |The Input File mask. Has to specify a valid directory or path and filename, which can |
|Required |contain wildcard characters (* and ?) All files matching this mask will be treated as |
| |input files. Special care should be taken here. The file masking is done by the operating|
| |system. It seems NT only takes the three 1st characters of the file extension into |
| |account. It is best to 1st check the file mask on the command prompt. |
|/ifs=x |Input File Sort. The interface reads the data files sorted: |
|Optional |/ifs=C files are sorted by the Creation date (default) |
| |/ifs=M files are sorted by the Modification date |
| |/ifs=N files are sorted by the fileName |
|/imt |Ignore Missing Tags. If the flag is set, the interface won’t log any messages when a |
|Optional |requested tag could not be found and the input file won’t be renamed with the error |
| |extension (see also parameter /err). |
|/lb |Store Lab values instead of snapshots. In this mode (even if slightly slower), the |
|Optional |interface can overwrite the existing archive entries or stores out-of-order data. |
| |Default is sending events to PI through snapshots (in-order-data). |
|/output=xxx |Optional output file. If this parameter is used, all messages (debug as well as info or |
|Optional |error messages) are sent to the specified log file (xxx). If not specified, all messages |
| |are forwarded to the pipc.log. |
|/ps=x |Specifies the point source character for the interface. X is not case sensitive, may be |
|Optional |any single character, and corresponds to the PointSource attribute of individual PI |
| |Points. (Only the first character of the PointSource attribute is checked). |
| |When specified, the interface will load those PI points prior to RunTime operation. This |
| |is especially useful : |
| |When using the instrument tag to identify the tags to store data in. |
| |When an input file can contain data for non-existing tags. |
| |When you want to limit write operations to a subset of tags. |
| |If neither /ps nor /tm are specified, no tags are initialized on startup. |
| |In this case the interface will check for tags when required. |
| |The simultaneous use of the /ps and /tm flags is not allowed. See /tm and /imt. |
|/pu=xxx |Purge time. Renamed files without errors older then the purge time are deleted. Valid |
|Optional |time strings here are nd (n days), nh (n hours) and nm (n minutes). Default 1d. |
|/ren=xxx |Extension used when Renaming files that contained no error. Default _OK. |
|Optional |If NO error was found during processing, the input file is renamed to .xxxxxx._OK, where is the filename before processing without |
| |extension, xxxx is the date of processing (yyyyMMddhhmmss). (see also parameter /err) |
|/test |Test mode on. Default is off. In this case no data is written to PI and input files are |
|Optional |not renamed or deleted. |
|/tm=xxx |Tag Mask. |
|Optional |When specified, the interface will load all points matching this tag mask points prior to|
| |Runtime operation. This is especially useful : |
| |When using the instrument tag to identify the tags to store data in. |
| |When an input file can contain data for non-existent tags. |
| |When you want to limit write operations to a subset of tags. |
| |If neither /ps nor /tm are specified, no tags are initialized on startup. |
| |In this case the interface will check for tags when required. |
| |The simultaneous use of the /ps and /tm flags is not allowed. See /ps and /imt. |
|/ume |Unexpected Message Error. If a message in the data file does not satisfy any filter, the |
|Optional |data file is suffixed with .ERR. When not specified, the suffix is ._OK and no error |
| |message is logged when a line that does not satisfy any filter is encountered. |
|/utc |Universal Time Coordinated |
|Optional |When specified, the timestamps read from the data file are forwarded to PI as UTC |
| |timestamps. |
|/wd=n |Write Delay, in milliseconds, between two writes to the PI archive. Default is 10ms. Used|
|Optional |to tune the load on the PI archive and the network, versus the performance of the |
| |interface. See /ws. |
|/ws=n |Write Size. Maximum number of values written in one call to the PI archive, > 0 and API Buffering… menu. Unless buffering is explicitly enabled, the PI-API will not buffer data, sending data directly to the home node.
The API Buffering… dialog allows the user to view and configure the parameters associated with the API Buffering (bufserv) process. The user can start and stop the API Buffering process from the Service tab:
[pic]
Service Tab
The Service tab allows for some API Buffering service configuration. For further configuration changes, use the Services applet.
Service Name
The Service name displays the name of the API Buffering Service.
Display Name
The Display name displays the full name associated with the API Buffering service.
Log On As
Log on as indicates the Windows user account under which the API Buffering service is setup to start automatically on reboot, or manually.
Password
Password is the name of the password for the Windows user account entered in the Log on as:above.
Confirm password
You must reenter the password again to verify you have typed it correctly both times.
Dependencies
The Dependencies lists the Windows services on which the API Buffering service is dependent.
Dependent Services
The Dependent services area lists the Windows services that depend on bufserv to function correctly.
Start / Stop Service
The Start / Stop buttons allow for the API Buffering service to be started and stopped. If the service is not created this box will show Not Installed.
After a change is made to any of the settings on the Settings tab, the OK button must be clicked to save these settings, and then the service must be stopped and restarted for the changes to be picked up by bufserv.
Service Startup Type
The Startup Type indicates whether the API Buffering service is setup to start automatically on reboot or manually on reboot, or is disabled.
• If the Auto option is selected, the service will be installed to start automatically when the machine reboots.
• If the Manual option is selected, the interface service will not start on reboot, but will require someone to manually start the service.
• If the Disabled option is selected, the service will not start at all.
Generally, the API Buffering service is set to start automatically.
Create/Remove Service
The Create / Remove buttons allow for the creation or removal of the API Buffering service. Clicking the Create button will cause the service to be created using the Log on as and passwords given. Once the service is created the Start / Stop buttons will be activated.
Settings Tab
The Settings tab allows for configuration of the 7 configurable settings used by API Buffering. Default values are used if no other value is provided.
[pic]
Enable Buffering
Enables the API Buffering feature.
Maximum File Size
Maximum buffer file size in kilobytes before buffering fails and discards events. Default value is 100,000. Range is 1 to 2,000,000.
The Use Default button places the default value into the text box. To keep this value, click the Apply button.
Send Rate
Send rate is the time to wait between sending up to MAXTRANSFEROBJS to the server (milliseconds). Default value is 100. Range is 0 to 2,000,000.
The Use Default button places the default value into the text box. To keep this value, click the Apply button.
Primary Memory Buffer Size
Primary memory buffer size is the size in bytes of the Primary memory buffer. Default value is 32768. Range is 64 to 2,000,000.
The Use Default button places the default value into the text box. To keep this value, click the Apply button.
Secondary Memory Buffer Size
Secondary memory buffer size is the size in bytes of the Secondary memory buffer. Default value is 32768. Range is 64 to 2,000,000.
The Use Default button places the default value into the text box. To keep this value, click the Apply button.
Max Transfer Objects
Max transfer objects is the maximum number of events to send between each SENDRATE pause. Default value is 500. Range is 1 to 2,000,000.
The Use Default button places the default value into the text box. To keep this value, click the Apply button.
Pause Rate
When buffers are empty the buffering process will wait for this number of seconds before attempting to send more data to the home node. Default value is 2. Range is 0 to 2,000,000.
The Use Default button places the default value into the text box. To keep this value, click the Apply button.
Retry Rate
When the buffering process discovers the home node is unavailable it will wait this number of seconds before attempting to reconnect. Default value is 120. Range is 0 to 2,000,000.
The Use Default button places the default value into the text box. To keep this value, click the Apply button.
Max Theoretical Send Rate
This is the theoretical max send rate which is calculated like this:
max = MAXTRANSFEROBJS / SENDRATE * 1000
Default value is 5000. This value is automatically calculated for the user and can not be changed.
There are no additional steps needed to install buffering after installing the PI-API. The delivered PI-API library supports both buffered and un-buffered calls.
Configuring Buffering Manually
Buffering is enabled through the use of a configuration file, piclient.ini. Unless this file is modified to explicitly enable buffering, the PI-API will not buffer data, sending data directly to the home node.
There are no additional steps needed to install buffering after installing the PI-API. The delivered PI-API library supports both buffered and un-buffered calls.
Note: When buffering is configured to be on, the bufserv process must be started before other programs using the PI-API, so that these programs can access the shared buffering resources. Any program that makes a connection to a PI Server has this requirement even if it does not write to PI.
Configuration of buffering is achieved through entries in the piclient.ini file. The file is found in the dat subdirectory of the PIHOME directory (typically c:\pipc\dat) under Windows NT. This file follows the conventions of Microsoft Windows initialization files with sections, keywords within sections, and values for keywords. All buffering settings are entered in a section called [APIBUFFER]. To modify settings, simply edit the piclient.ini file in a text editor (Notepad on Windows) to the desired values.
The following settings are available for buffering configuration:
|Keywords |Values |Default |Description |
|BUFFERING |0,1 |0 |Turn off/on buffering. OFF = 0, ON = 1, |
|PAUSERATE |0 - 2,000,000 |2 |When buffers are empty the buffering process will wait for|
| | | |this long before attempting to send more data to the home |
| | | |node (seconds) |
|RETRYRATE |0 - 2,000,000 |120 |When the buffering process discovers the home node is |
| | | |unavailable it will wait this long before attempting to |
| | | |reconnect (seconds) |
|MAXFILESIZE |1 - 2,000,000 |100,000 |Maximum buffer file size before buffering fails and |
| | | |discards events. (Kbytes) |
|MAXTRANSFEROBJS |1 - 2,000,000 |500 |Maximum number of events to send between each SENDRATE |
| | | |pause. |
|BUF1SIZE |64 - 2,000,000 |32768 |Primary memory buffer size. (bytes) |
|BUF2SIZE |64 - 2,000,000 |32768 |Secondary memory buffer size. (bytes) |
|SENDRATE |0 - 2,000,000 |100 |The time to wait between sending up to MAXTRANSFEROBJS to |
| | | |the server (milliseconds) |
In addition to the [APIBUFFER] section, the [PISERVER] section may be used to define an optional time offset change that may occur between the client and server.
|Keywords |Values |Default |Description |
|DSTMISMATCH |0 - 2,000,000 |0 |The time that the server and client local time |
| | | |offset is allowed to jump. Typically, 3600 if the |
| | | |nodes are in time zones whose DST rules differ |
| | | |(seconds) |
Example piclient.ini File
On Windows NT the default server information is stored in the pilogin.ini file so the piclient.ini would only have the [APIBUFFER] section. The BUFFERING=1 indicates that buffering is on. The MAXFILESIZE entry in Kbytes of 100000 allows up to 100 Megabytes of data storage. Do not use commas or other separators in the numeric entries. The retry rate is set to 600 seconds meaning wait 10 minutes after losing a connection before retrying.
On NT a piclient.ini file might look like:
[APIBUFFER]
BUFFERING=1
MAXFILESIZE=100000
; The PI-API connection routines have a 1 minute default timeout.
RETRYRATE=600
Appendix A:
Error and Informational Messages
All messages are sent to the standard output, and, depending whether the /output=xxx command line parameter is present or not, to the file xxx or to the standard PIPC.log file.
Each message has the following format
dd-MMM-yy hh:mm:ss
PI_UFLid> [Module-X] Message
Where
dd-MMM-yy hh:mm:ss
is the date and time the message was written to the log file.
id The parameter specified using the /id flag on the startup command line.
Module The module name inside the program that generated the message.
X Letter indicating the type of message: I for information and E for error.
Message The actual message.
Message Logs
Messages are written 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 PI-API, 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, various informational messages are written to the log file.
Messages
During the compilation process, all names of message definitions and fields are translated, extra characters are removed, etc. In the logs this translated line is displayed. For example, a line from the message definition file might be:
Value = ["*,*,(*)"] * 0.75 _
+ 0.25 * PrevValue
which will be translated into:
FIELD(2)=["*,*,(*)"]*0.75+0.25*FIELD(4)
Often (part of) this translated line will be reported in case an error occurs.
Compile Time And Run Time Messages
[Parse File-E] Invalid columns specifier.
This message normally has the following form:
[Parse File-E] Invalid columns specifier. Applying ReadTime:FIELD(1)=["*,(##-???-## ##:##:##)*,*"] to UFL_FLOAT_32_02, 01-Sep-02 06:00:00, 56
It will be reported if a part of a message definition is applied to a line of the input file, and data cannot be extracted from the input line, because the data extraction criteria are invalid for the input line. In this case the line could not be matched because ..2, 01-Sep-02.. has a space after the comma, and the extraction definition ..*,(##-???-##.. does not take this into account.
[Parse File-E] First assignment in a [MSG(n)] section should be a FILTER condition.
The first definition line in a MSG definition section should always be a FILTER statement.
[Parse File-E] Invalid month "xxx" in time string "yyy"
This message normally has the following form:
[Parse File-E] Invalid month "-OC" in time string " 01-Oct-99 14:00:00" (format string: ""dd-MMM-yy hh:mm:ss.nnn pp","JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV, DEC"")
This message will be reported when a FIELD with TYPE time will be set with an invalid time string.
• This is often caused by leading spaces in the right hand side of the equation. In the example the right hand side is: " 01-Oct-99 14:00:00" where it is supposed to be: "01-Oct-99 14:00:00".
[Parse File-E] Syntax error near 'xxx'. Unknown, invalid or unexpected character(s), at or before character nn
This message normally has the following form:
[Parse File-E] Syntax error near '.Action'. Unknown, invalid or unexpected character(s), at or before character 19, in line "Test.Action.Action = StoreInPi (Tag, , Date_Time, Value, ,)"
This indicates a character or character sequence that could not be interpreted in the context of the line. The error can be located at the position indicated, or in the characters just before the position indicated. In case the debugging level is greater or equal 5, some extra information is shown:
[Parse File-I] Read line from config file "Test.Action.Action = StoreInPi (Tag, , Date_Time, Value, ,)"
[Parse File-I] Interpreted line from config file "MSG(1).ACTION.ACTION"
The 1st line shows what was read from the input file, the second file shows how the line was interpreted when the error was encountered. In this case the .ACTION keyword is entered twice.
[Parse File-W] The definition of MSG(n) is empty
This is a warning that an empty message definition has been specified. This often caused by the default MSG allocation: every time a MSG definition is referenced (even implicitly) by number that does not exist yet, a MSG definition is created. For example, if you specify:
[MSG]
MSG(1).NAME = "ReadTime"
MSG(3).NAME = "ReadValue"
in the configuration file, MSG(1).NAME =.. will create an empty MSG definition 1, MSG(3).NAME = .. will create an empty MSG definition 3, and implicitly, an empty MSG definition 2 is created as well.
Appendix B:
CSV (Comma Delimited) Data Files
Data File Example
BATCH-1,17-Feb-04 08:00:25,1234.3
BATCH-2,17-Feb-04 08:00:25,134.3
BATCH-3,17-Feb-04 08:00:25,123.3
BATCH-4,17-Feb-04 08:00:25,1234
BATCH-5,17-Feb-04 08:00:25,234.3
BATCH-6,17-Feb-04 08:00:25,34.3
Configuration File Example
' BatchFl.ini
' shows UFL Interface being able to read BatchFl Interface
' typic data files
' a data file consists of lines that look like the following line
' mytagname, 01-Jan-04 08:00:01, 30
' valid keys CR, LF, CRLF (default)
[FILE]
' name all message types
[MSG]
MSG(1).NAME = "BatchFL" ' MSG(1) is an example for Batch File Data
'fields are like internal variables
[FIELD]
FIELD(1).NAME="Tagname"
'String is default, so this line could also be omitted
FIELD(1).TYPE="String"
FIELD(2).NAME="Timestamp"
FIELD(2).TYPE="Time"
FIELD(2).FORMAT="dd-MMM-yy hh:mm:ss", _
"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec"
FIELD(3).NAME="Value"
FIELD(3).TYPE="Number"
[BatchFL]
' basically recognize message type
' by this timestamp format
BatchFL.FILTER = C1=="*,??-???-?? ??:??:??,*"
Tagname = C1 - (",")
Timestamp = C1(",")-(",*")
' or Timestamp = ["*,(??-???-?? ??:??:??),*"]
' or Timestamp = ["*,(##-???-## ##:##:##),*"]
Value = C1("*,??-???-?? ??:??:??,")- NEWLINE
' or Value = C1("*,*,")- NEWLINE
' or Value = ["*,*,(*)"]
' send value to PI
BatchFL.ACTION = StoreInPi(Tagname,, Timestamp, Value,,)
Explanation
A comma delimited data file is a rather simple case for the UFL interface. There is only one message type and messages consist of only one line. Separating the fields from each other is also easy because the comma serves as search string.
In the configuration file we use names for the message type (BatchFL) and for the fields (Tagname, Timestamp, Value). This makes it more readable.
A valid data line is recognized based on the timestamp format (BatchFL.FILTER = C1=="*,??-???-?? ??:??:??,*").
First the field containing the tagname is read in. It is positioned between column 1 and the first occurring comma (Tagname = C1 - (",")).
Then the timestamp field is read. The date/time format uses 3 character month abbreviations, so it is important to know in which language they are given. The second parameter of the Format attribute allows correspondence with most languages. The configuration file also shows two alternatives for reading the timestamp field.
Next we read the value. The value field starts after the comma that follows the timestamp and ends with the line itself. Two alternatives are given as well.
Finally the data is sent to a PI tag (StoreInPi). Once this is completed the interface does not find further commands in the configuration file and does a new iteration of the configuration file with the next data line, … until the data file reaches its end.
The PI_UFL thus covers much ‘wider spectrum’ of data files. The data file structure does not have to be strictly orthogonal (i.e. ‘column oriented’). For example the same ini file (as above) can be applied onto the data file that does not have ‘strictly lined up’ columns:
BATCH-one,17-Feb-04 08:00:25,1234.3
BATCH-five,17-Feb-04 08:00:25,134.3
BATCH-eleven,17-Feb-04 08:00:25,123.3
Appendix C:
XML Document Files
Data File Example
GMT+1
2004,01,22,12,00,00
17940
GMT+1
2004,01,22,12,00,00
52320
GMT+1
2004,01,22,12,00,00
1618776
Configuration File Example
' XML_EXAMPLE.ini
' ------------------------------------------------------
'
[MSG]
MSG(1).NAME = "XML_LINE_MP"
MSG(2).NAME = "XML_LINE_TZ"
MSG(3).NAME = "XML_LINE_MQ"
MSG(4).NAME = "XML_LINE_TS"
MSG(5).NAME = "XML_LINE_PV"
'-------------------------------------------------------------
[FIELD]
FIELD(1).NAME = "TAG_ID"
FIELD(2).NAME = "TIMEZONE"
FIELD(3).NAME = "TIMESTAMP"
FIELD(3).TYPE = "Time"
FIELD(3).FORMAT = "yyyy,MM,dd,hh,mm,ss"
FIELD(4).NAME = "DST"
FIELD(4).Type = "DSTFlag"
FIELD(4).Format = "no,yes"
FIELD(5).NAME = "UOM"
FIELD(6).NAME = "STATUS"
FIELD(7).NAME = "QUALITY"
FIELD(8).NAME = "VALUE"
'-------------------------------------------------------------
' TAG_ID and Unit of Measure
[XML_LINE_MP]
XML_LINE_MP.FILTER= C1=="*")-(" ................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.