Professional Documents
Culture Documents
PI Connector For UFL 1.3.2 User Guide
PI Connector For UFL 1.3.2 User Guide
User Guide
OSIsoft, LLC
1600 Alvarado Street
San Leandro, CA 94577 USA
Tel: (1) 510-297-5800
Fax: (1) 510-357-8136
Web: https://www.osisoft.com
Supported modifications........................................................................................................................... 30
Modify the point prefix.................................................................................................................................. 31
Start data collection...................................................................................................................................... 32
Configure PI Connector for UFL to process data............................................................................................ 32
Configuration file definitions...................................................................................................................... 33
Functions and operators............................................................................................................................ 39
Data storage in PI Points, AF elements and Event Frames..........................................................................44
Code flow control (IF statement)............................................................................................................... 48
FOREACH() statement.............................................................................................................................. 48
Iterating through comma-separated values............................................................................................... 49
Iterating through JSON arrays and receiving a value from a JSON element............................................... 50
Configuration examples.................................................................................................................................50
Data manipulation logic examples............................................................................................................. 51
Action examples........................................................................................................................................ 52
Migration from the UFL Interface.................................................................................................................. 57
General considerations.............................................................................................................................. 57
Removing unrecognized sections in the INI file.......................................................................................... 58
Changes to command line parameters...................................................................................................... 60
Connector administration......................................................................................... 63
Verify data collection..................................................................................................................................... 63
Verify connection from data source to connector.......................................................................................... 63
Diagnostics....................................................................................................................................................63
PI Data Servers.......................................................................................................................................... 64
PI Asset Servers......................................................................................................................................... 64
Message log.............................................................................................................................................. 64
Advanced Diagnostics............................................................................................................................... 65
Data buffering......................................................................................................... 67
Connector-to-PI System buffering................................................................................................................. 67
Troubleshoot buffering.................................................................................................................................. 67
PI Connector for UFL is used to transfer contextual and time-series data from textual data
sources, such as ASCII and Unicode (UTF-8), to the PI System.
PI AF elements and event frames, along with PI points, are created automatically when the
connector receives data that pass the filters specified in the configuration INI file.
Operational overview
Once configured, the connector performs the following tasks:
1. The connector either periodically scans for new data in the configured folder, or enables the
communication on a REST channel. The communication on the REST channel can be
configured in two modes:
Procedure
1. Verify the host meets the software requirements for the connector.
For more information, see Software requirements for connectors.
2. If your connector is relay-enabled, install and start the relay before installing and starting
the connector.
3. If the data source has additional requirements for installation, complete those tasks.
4. Configure security for the connector and your network.
For more information, see Connector security.
5. Identify the administration port number.
6. Identify administration group users.
• PI System
◦ PI Data Archive 2018 SP3 Patch 1 or later
◦ PI AF Server 2018 SP3 Patch 2 or later
• For relay-enabled connectors, use PI Connector Relay version 1.x. Do not use PI Connector
Relay version 2 or later.
Connector security
Connector access to PI Data Archive and PI Asset Framework (PI AF) servers is based on
Windows Integrated Security.
Note:
Configure security settings before starting the connector.
Configure security settings for connectors to provide the connector secure access to your PI
System. Security must be configured to allow the connector to write to both the PI Data Archive
and PI AF servers. For more information about configuring security, refer to the following:
• For PI Data Archive, see the topics under "PI Data Archive security" in Live Library (https://
livelibrary.osisoft.com)
• For PI AF, see the topics under "PI AF server installation and upgrade" in Live Library
(https://livelibrary.osisoft.com)
Some data source protocols are inherently insecure. OSIsoft recommends that you review the
security standards for your data source to determine the appropriate security measures
necessary to secure your system.
• File channel
OSIsoft recommends setting correct permissions for the Windows directory files that the
connector reads. Only data consumers and data producers should have write access to the
configured files.
Configure firewalls
Typically, the connector and PI Servers are not installed on the same host. Since the connector
communicates with the PI Servers using TCP sockets, any network firewalls between the
connector host and the PI Server hosts must be configured to permit the following connections.
If there are multiple firewalls (including Windows firewall on the connector or PI Server
hosts), all firewalls in the connection path must be appropriately configured.
Procedure
1. Determine whether the connector host is part of a Windows domain or workgroup.
Computer domain information can be found in the Control Panel system information, in the
Computer name, domain, and workgroup settings area.
2. Create either a dedicated domain account, or local accounts for the connector.
Note:
The account should not be a member of the host's local administrators group.
◦ If your computer is part of a domain, create a dedicated domain account for the
connector.
You must have domain administrator privileges to create domain accounts.
◦ If your computer is part of a workgroup, create identical local accounts on every machine
that hosts either the connector, the PI Data Archive server, or PI AF server, using the same
user name and password for each account.
You must have local administrator privileges to create local accounts.
Procedure
1. Launch PI System Management Tools (PI SMT).
2. Click Security > Identities, Users, & Groups, and then click the PI Identities tab.
3. Right-click within the pane, and then click New Identity.
The New Identity window opens.
4. Configure the settings for the identity.
The PI identity for the connector must have permission to write to the PI Data Archive.
5. Click Create.
Procedure
1. Launch PI System Management Tools.
2. Click Security > Identities, Users, & Groups, and then click the PI Identities tab.
3. Double-click the PI identity for the connector.
4. On the Mappings & Trusts tab, click Add under the Mapping and then add the account to be
used by the connector to the Windows Account field.
5. Click Create.
6. On the identity Properties dialog box, click OK.
Procedure
1. Launch PI System Management Tools, and then click Security > Database Security.
2. Right-click the PIPOINT table and then click Properties.
The Security window opens.
3. Click Add to open the Select window, and then select the identity to add to the access
control list.
4. Enable read and write access to the PIPOINT table, and then click OK to save the settings
and close the window.
Note:
For connectors that create digital points, read-write access to the PIDS table is also
needed.
Procedure
1. To manually create the PI AF database, open PI System Explorer and click the Database
button.
The Select Database window opens.
2. Click the New Database button.
3. Enter the name for the database and click OK.
Note:
The new database name must match the name used in the server configuration for the
connector.
PI System Explorer creates the new PI AF database.
Procedure
1. Launch PI System Explorer, and then click the Database button.
The Select Database window opens.
2. Click the security icon .
5. Enable access to the database for the Windows account for the connector. Select and
configure each of the following in the Items to Configure list:
◦ Elements
◦ Element templates
◦ Enumeration sets
◦ Optional: Event Frames. This is required only when the connector generates Event
Frames.
◦ Select the Windows account for the connector, then select Allow for Read/Write and
Read/Write Data.
6. Click OK to save the settings and close the window.
Procedure
1. Open a command prompt and enter: netstat -a -n -p TCP | find "LISTENING"
The tool displays only TCP ports that are currently in use.
2. View the last set of numbers in the second column to determine ports that are in use.
For example, the preceding figure shows that ports 80, 135, 445, and so on are in use. The
default port 5460 is available, or you can choose another unused port. Since default and
other well-known ports can be the targets of cyber attacks, choosing a non-default port can
provide an additional defense.
Procedure
1. Identify all local or domain users that require connector administrative privileges.
2. Open the Run window and enter: lusrmgr.msc, then click OK. The Local Users and Groups
window opens.
3. Double-click Groups.
4. Double-click PI Connector Administrators.
5. Click Add.
6. Enter the user's name, then click Check Names and select the user from the list and click
OK.
7. Click OK.
Procedure
1. Double-click the connectorname.exe file. The self-extracting executable window opens.
2. Set the extraction path for the installation files and click OK. The setup program opens
displaying the installation files.
3. Click OK. The connector setup wizard opens.
4. Click Next. The Port Configuration window opens.
5. Enter an administration port number for hosting the administration web service.
6. Click Check Availability. If the port is available, the message Port is available, click
Next to continue is displayed.
7. Click Next. The Windows Service Configuration window opens.
8. Enter a domain and name and password for the account that will run the connector service.
9. Click Validate. If the account and password are correct, the message Valid name and
password combination is displayed.
10. Click Next. The Alternate Buffer File Location windows opens.
11. Optional: Click Browse to select alternate file paths for buffering and other files. If you do
not specify a path, the files default to:
%ProgramData%\OSIsoft\Tau\connectorName.ConnectorHost\connectorName
Connector
12. Click Next. The Ready to install PI Connector window opens.
13. Click Install. The Installing PI Connector window opens and displays a progress bar that
indicates the status of the PI Connector installation.
14. Click Next. The Configuration Security window opens.
15. As necessary, add users to the PI Connector Administrators group:
◦ Click Add User to add the current user to the PI Connector Administrators local
group.
◦ Click Launch to add any other local or domain users that require connector
administrative privileges to the PI Connector Administrators group.
Procedure
1. Prepare the silent installation file path and identify the status of supporting software.
a. Run the connector setup kit self-extracting executable file.
The self-extracting dialog box opens. You will only complete the step to extract the
installation files, not actually proceed to install the connector or prerequisites.
b. Enter an extraction path and click OK. The installation files are extracted and the setup
program opens.
c. Cancel the installation.
2. Go to the extraction folder, and open the silent.ini file in a text editor.
3. Modify the COMMANDLINE section for the module for the connector.
See the silent.ini file included in the setup kit for more details about each of the
configurable settings:
◦ Required: SERVICE_ACCOUNT. Set this property to the name of the Windows account for
the connector service.
◦ Required: SERVICE_ACCOUNT_PASSWORD. Set this property to the password for the
Windows account for the connector service.
Note:
The password in the silent.ini file is visible to any user who has read access to
the file. Protect all copies of the file with an access control list that allows read
access to only a white list of users who know the password and denies read access
to all other users. Preferably, remove the file immediately after installation. If long-
term retention is necessary, keep the file on removable media that is stored offline
in a physically secure location.
◦ Optional: USERPORT
◦ Optional: ALTERNATEFILEPATH
4. To run the silent installation, open a command prompt window, change the working
directory to the extraction path, and enter setup.exe -f silent.ini.
Procedure
1. Open Programs and Features as an administrator from the Windows Control Panel.
2. Select the connector program, and then click Change.
Note:
Changing installation settings stops the connector service.
The connector installation wizard opens.
3. Click Next.
The installation and change options are shown.
4. Click Change to modify the settings.
5. Change installation configurations using the wizard.
Procedure
1. From the Windows Control Panel, click System and Security > Administrative Tools >
Services.
2. In the Services (Local) window, scroll to the service for your PI Connector.
3. Right-click the service and then click Stop.
4. Uninstall the connector using one of the following methods:
◦ From the Windows Control Panel, open Programs and Features, then select the
connector and click Uninstall.
◦ In the extraction folder created by the setup kit, right-click the ConnectorName.msi file
and then click Uninstall.
Note:
The version of the ConnectorName.msi file must be the same as the installed
connector.
Procedure
1. Open a command prompt window.
2. Change the working directory to the folder containing the ConnectorName.msi file.
3. Enter msiexec -x ConnectorName.msi -qn.
Procedure
• When using the computer where the connector is installed, from the Windows Start menu,
select All Programs > PI System > PI Connector for connector_name Administration .
Note:
◦ When using a remote computer, enter the following URL in the browser's address
bar: https://connectorNodeName:port#/admin/ui
◦ Some web browsers do not recognize the security certificate from the
administration site. If alerted of a security certificate, click Yes to continue.
The PI Connector Administration site opens to the main Overview page.
Procedure
1. On the PI Connector Administration page, click the Server List link.
The Server List pane displays the PI Data Archive and PI AF servers for the connector.
2. Add and configure one or more PI Data Archive servers to the PI Data servers list, and then
click Add.
Note:
For a PI Data Archive collective, add each member of the collective to the PI Data
servers list, not the collective itself.
◦ PI Data servers
A descriptive name or alias for the PI Data Archive server.
◦ Hostname or IP address
The host name or IP address of the PI Data Archive server.
3. Add and configure one or more PI AF servers to the PI Asset servers list, and then click Add.
◦ PI Asset servers
A descriptive name or alias for the PI AF server.
◦ Hostname or IP address
The host name or IP address of the PI AF server.
4. Enter additional information for the PI AF server, and then click Keep these settings.
◦ PI Asset Database
The name of the PI AF database.
conform to the PI AF syntax for element paths with the restriction that the path cannot
begin or end with a backslash path separator character.
◦ PI Data server
The host name or IP address for the associated PI Data Archive.
Procedure
1. In the navigation pane, click Server List, or click the Add or modify servers link in the
Servers configured to receive data from the connector area.
2. To modify the server list, choose one of the following options:
◦ Add a new server.
◦ Remove an existing server.
3. To modify an existing server, delete the server, and then add it with the new configuration
parameters.
Output path
By default, PI Connector for UFL stores the processed data files in %PROGRAMDATA%\OSIsoft
\PI Connectors\UFL.ConnectorHost\Output folder.
Procedure
1. From the Overview window, either click the Add or modify data sources link found under
Data Sources in the right pane, or click the Data Source List link in the left pane. Either link
opens the Data Source List window.
2. To add a new data source, enter the name in the Data source name field, and then click Add
and configure.
Note:
All Data source name values for the connector must be unique.
Configurations are not case-sensitive. For example, DataSource1 and DATASOURCE1
are considered the same.
Configuration File
Required: Specify the full path to the configuration INI file.
Note:
Be aware that pointing to the configuration INI file in the connector configuration copies
the file to the internal repository of the connector; therefore, to apply changes to an INI
file that has already been read by the connector, you should follow the steps detailed in
Modify the configuration file.
• File
The File option specifies the path and mask from where the input files will be copied. For
example:
D:\UFL\Input\Data\*.dat
or,
\\DataShare\Input\Data\*.csv
Unzip input files: The connector is capable of opening and processing the content of ZIP
archives. If you want to process both the not-zipped files as well as the ZIP archives, specify
the keyword zip at the end of the path and mask. Use the pipe | as the delimiter. For
example: D:\UFL\Input\Data\*.dat | zip.
Note:
The mask is applied on files found in the root of the ZIP archive. The content of any
subdirectory is ignored.
After processing is complete, the ZIP archive is moved to the output folder.
In this mode, the connector expects the data to be pushed to the above address. The data
format is arbitrary, and every PUT or POST request executed by a client brings in a textual
input onto which the INI logic is applied.
By default, the REST endpoint is configured to use Basic authentication and requires that a
user name and password combination be provided in a request. The password cannot be
blank; no other rules are enforced.
The PowerShell script example DataPutExample.ps1 located in the %PIHOME64%
\Connectors\UFL\PowerShellScripts folder shows how the client side logic should
appear.
• REST Client
The REST Client channel expects the endpoint address on which the GET command will be
executed. For example:
https://restcountries.eu/rest/v1/alpha/LIE
Executing the GET command on the above REST endpoint brings back the structured text
(JSON format) about one European country.
Note:
The returning data format can be JSON, XML, CSV or a plain text.
REST endpoint parameters
There are three options for extending the REST Client URL address with parameters:
UFL_Placeholder:6894/RESTServiceImpl.svc/json/|10.105.0.1|
10.105.0.2|10.105.0.3
◦ Dynamic parameters
If the URL needs to be parameterized by time, you can suffix it by the following pattern:
{relative time, output format}
Relative time format complies with the PI Time format rules, where asterisk *
denotes current time. The output format complies with the Date and Time format
specifiers described in Custom Date and Time Format Strings (https://
docs.microsoft.com/en-us/DOTNET/STANDARD/BASE-TYPES/custom-date-and-time-
format-strings). For example:
http://servername.com/data?
start={*-10m,yyyyMMdd_HHmm}&end={*,yyyyMMdd_HHmm}
The result is the text executed through the http GET command:
http://servername.com/data?start=20190228_0950&end=20190228_1000
◦ HTTP headers
Some HTTP servers require the client to send a set of operating parameters for the HTTP
transactions. These parameters are called HTTP headers and the connector allows their
definition in the form of a colon-separated name-value pair. You define the parameters
manually in: %PIHOME64%\Connectors\UFL\Configuration
\Datasource.config.json.
The HttpHeaders keyword is predefined for each data source, and initially it defines an
empty string. For example, to specify two HTTP headers, replace the empty string with
corresponding name-value pairs in square brackets and separate them by coma:
"HttpHeaders":
"[User-Agent:OSISoft UFL Connector/1.2.1.x],
[Accept:application/vnd.noaa.dwml+json;version=1]"
Note:
The connector has to be restarted in order to activate the HttpHeaders setting.
Password (REST)
Required for the REST channels: The parameter defines password for the user name specified
above and it is used for REST authentication.
Scan Time
Required: The parameter defines the time period between scans in seconds.
If needed, an offset can be specified. Offset is counted from the midnight of the current day. The
offset format is: hh:mm:ss and must be put after the number of seconds representing the scan
interval. Use comma as the delimiter.
For example, a daily scan triggered 5 minutes after midnight:
86400,00:05:00
New Line
Required: Specify the line-end character(s). If left empty, CRLF is assumed (ASCII 13 and 10). If
the lines in the input stream are terminated in more than one way, specify the line endings in
double quotes and use the OR clause to set the valid line endings, for example:
"event end>" OR "STOP"
When you have to use ASCII codes for line endings, use comma-separated numbers with no
white space in between, for example:
13,10
You can also combine the line endings expressed as ASCII codes with string representation, for
example:
"event end>" OR 13,10
String comparisons are case sensitive.
Word Wrap
Optional: A positive whole number that defines the length of the chunks (lines) the input text
will be broken into. All lines forwarded to the parsing engine of the connector will be of the
same length.
If -1 is used, the connector will take the whole input stream and forward it as one line for
parsing.
Note:
The -1 setting is mostly intended for structured formats like JSON because if the JSON
parser is applied to an incomplete JSON structure, it will return an error.
When set, the Word Wrap overwrites the New Line definition.
Store Mode
Required: Specifies whether the connector will insert or update values in PI points. When a PI
point has a value at a given timestamp, the Update selection causes the new incoming values to
overwrite it. The Insert selection causes a value to be added for that timestamp.
Locale
Required: Defines how the connector transforms the string representation of numbers to the
native numeric form; that is, which locale it uses.
Incoming TimeStamps
Required: Specifies whether incoming time stamps are UTC or Local time.
Encoding
There are two encoding options:
When the connector is set up to operate in Unicode mode, there are several limitations
because neither the INI logic nor PI point names can contain characters encoded on more
than one byte. PI points and their attributes can only accommodate ASCII characters. Hence,
the StoreEvent() function, when provided with a tag name containing Unicode characters,
forwards a modified tag name to PI Data Archive. The connector's modification logic
replaces Unicode characters with the string representation of the individual hexadecimal
codes prefixed by U+. For example: Strings encoded in UTF-8 that are forwarded to PI Data
Archive through the StoreEvent() function will have the following PI tag name(s):
UTF-8 based input PI tag name
Größe1 GrU+00F6U+00DFe1
газ в зоне 1 U+0433U+0430U+0437 U+0432 U+0437U
+043EU+043DU+0435 1
Note:
If the endpoint responded with status 500 (and the message Data queue is full), it
means that the data has not been accepted by the connector. The recommended approach
is to repeat the PUT/POST operation after a short while until the status 200 appears. An
example of such logic can be found on GitHub - PI Connector for UFL Samples (https://
github.com/osisoft/PI-Connector-for-UFL-Samples/tree/master/REST_DATA_SENDERS
%20%28REST%20SERVER%29). To log all the REST acknowledgement messages and
statuses, activate the verbose or information logging level on the administration page
of the connector.
Procedure
1. Open the INI file in a text editor.
2. Apply your changes and save the file.
3. Click either the Change or Delete button in the Data Source configuration page.
4. Navigate to the appropriate directory and select the INI file.
5. Click Save at the bottom of the configuration page.
If no syntax problems were encountered, the INI will be accepted. If problems are
encountered, an error message is displayed with the line number of the error. In that case,
edit the INI file again to correct the problem and repeat the previous steps.
Procedure
1. In the navigation pane, click the Data Source List link, or on the Overview page in the Data
sources for the PI Connector area, click Add or modify data sources.
2. Click the See Configuration link.
3. Edit the data source configurations and click Save.
Procedure
1. Stop the connector and the connector service.
2. Navigate to: %PIHOME64%\Connectors\UFL\Configuration and open the
ConnectorGlobal.config.json file.
3. Add Key-Value pairs to SubstitutionCharactersListsection. For example:
{"Key":"|","Value":""} or {"Key":"?","Value":"-"}
Note:
◦ A character can be replaced with nothing, "".
◦ If more than one character is in the key, you will get an error. If more than one
character is in the value, only the first character will be taken.
◦ Backslash (\) and double-quotes (") must be prefixed with the backslash escape
character.
The modified global configuration file should look like the following example:
{
"connectorglobal": {
"ConfigObject": {
"OutputPath":
"C:\\ProgramData\\OSIsoft\\PI Connectors\\UFL.ConnectorHost\\Output",
"PurgeTime": 1,
"RestBasicAuthentication": 1,
"ActiveRestVerifyCertificates": false,
"SubstitutionCharactersList": [
{
"Key": "\"",
"Value": ""
},
{
"Key": "\\",
"Value": "/"
},
{
"Key": "?",
"Value": "-"
}
]
}
}
}
4. Start the PI Connector for UFL service.
Results
Object names with substituted characters will be created once values are received.
Note:
Using the substitute function creates a new object name. It does not rename the object
that has already been created. For instance, if you attempt to rename a PI point using this
feature, a second point will be created leaving the so-far-collected events in the original
point.
Compression configuration
When the connector creates a PI point, the point's Compressing attribute is set to Off (or 0).
The other compression attributes (CompDev, CompDevPercent, CompMin, and CompMax) are
set to the server default values.
To specify compression attributes for individual points, use the Point Builder tool in PI System
Management Tools (PI SMT). For more information, see the PI Server topic "Point Builder" in
Live Library (https://livelibrary.osisoft.com).
To specify compression attributes for many points, edit the points in bulk using PI Builder. For
more information, see the PI Server topic "PI Builder" in Live Library (https://
livelibrary.osisoft.com).
For more information about compression attributes, see the PI Server topic "CompDev,
CompDevPercent, CompMax, and CompMin" in Live Library (https://livelibrary.osisoft.com).
Supported modifications
Add custom PI AF attributes
You can add custom attributes to the elements that were generated by the connector. To enable
the ability to add custom attributes, perform the following steps:
1. Open PI System Explorer and open the PI AF database associated with the connector.
2. In the Elements menu, find the element you wish to modify and determine the template
from which it is derived.
3. Open the Element Templates menu by selecting Library > Templates > Element Templates,
then locate the template from step 2 and select Allow Extensions on the General tab.
4. Return to the desired element in the Elements menu and add the custom attribute(s).
Note:
Any custom attributes that are added cannot be configuration items; that is,
Configuration Item must not be selected for the attributes.
Custom attribute templates can also be added to an element template, as long as Allow
Extensions is selected on the element template and Configuration Item is not selected for any
attribute templates that were added.
PI AF template modification
Several modifications to PI AF element templates that are generated by the connector are
allowed. You can add Extended Properties to the element template, assign a category to
attribute templates, and select Allow Extensions. You can also add PI AF Analysis rules directly
to an element or an element template.
Unsupported modifications
The following modifications to the PI AF structure that is generated by the connector are not
currently supported:
Procedure
1. Navigate to %PIHOME64%\Connectors\ConnectorName\Configuration\ and open the
file PIPointPrefix.config.json. For each server that a connector sends data to, the file
includes an entry with the PI Data Archive server name and connector ID. For example:
"MyServer": {
"Name": "MyServer",
"PIPointPrefix": "Example Connector"
}
2. Change the PI point prefix. For example:
"MyServer": {
"Name": "MyServer",
"PIPointPrefix": "New Prefix"
}
3. Stop the connector.
4. If you previously ran the connector and collected data on existing points, rename those
points, changing the old prefix to the new prefix.
Caution:
If you skip this step, the connector leaves the PI points with the old prefix and creates
new PI points with the new prefix. Data is not copied from the old PI points to the new
renamed PI points.
5. Start the connector.
Procedure
1. On the Overview page, find the Status of the connector area.
2. Click Start connector.
The following topics explain configuration files in detail. Refer to the referenced GitHub
address, or see the commented examples in Configuration examples for more input on the
individual functions and features.
Note:
The maximum line length supported by PI Connector for UFL is 5120 characters.
• FIELD
Defines and declares data types for the individual fields that receive data.
• MSG
Defines the types of incoming messages, and assigns a name that is used to define the
section where the message is divided.
Field names
• Field names are not case-sensitive, and must be composed of alphanumeric characters only
(no punctuation).
• Field names must not begin with a number.
• Do not use the C1, C2, …Cn keywords because they signify character position in a character
string.
• To ensure that your configuration file is readable, assign descriptive names to incoming
fields.
• For clarity, avoid assigning names that might be confused with the interface's reserved
words (such as "FIELD", "MSG", "TIME", and so on).
• Do not use any special characters. Special characters include punctuation marks, control
characters, typography elements like Em and En, mathematical operators and symbols,
slashes, dashes, brackets, braces, and underlines.
Data types
The PI UFL interface supports the following data types:
• DateTime (instant, precision - 0.0001s)
• Time (duration, precision - 0.0001s)
• String (default data type)
• Int32 (integer type)
• Number (double type)
• Collection (string, variant; set of name-values pairs)
Values in strings are cast to numbers according to the LOCALE setting. Scientific (exponential)
notation is recognized.
Date/time format
To specify the format of incoming date/time and time (duration) fields, define a format string
in the form:
Incoming date format string
InputTimeFieldName.Format = "format" [, "monthlist]"
Note:
Month abbreviations must be comma-delimited. The time stamp format string
comparison is case-sensitive. Other evaluations are not case-sensitive.
Timestamp format examples
InputTimestamp.Format = "dd-MMM-yy hh:mm:ss", _
"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec"
DSTOffset = "01:00:00"
Timestamp = Timestamp - DSTOffset
EndIf
For example:
MSG(1).Name = "HEADER"
MSG(2).Name = "DATA_LINE"
Message names are not case-sensitive. Names can contain alphanumeric characters or
underscores, but no space characters.
The following is an example of a filter that finds messages where the following are true:
• The line does not start with an exclamation point.
• Starting at position 10, the line contains the text TAG followed by any number of characters.
• Starting at position 30, the line contains the text VALUE followed by any number of
characters.
MSG(1).Filter = NOT C1=="!*" AND C10=="TAG*" AND C30=="VALUE*"
The following filter finds lines that start with "State.City.A", " State.City.B", or "State.City.C".
MSG(2).Filter = C1=="State.City.[ABC].*"
The next filter finds lines that do not begin "State.City.D", " State.City.E", or "State.City.F".
MSG(3).Filter = C1=="State.City.[!DEF].*"
To extract data based on starting and ending position, specify the range using the format Cn -
Cm. For more flexibility, you can use masks and wildcards in conjunction with position
specifiers.
Examples of extracting data from messages into fields.
Example Description
FIELD(1) = C1 - C10 Extract the first ten characters from the input line.
FIELD(2) = C11 - C11(",") Extract the field that starts at character 11 and
ends before the next comma.
FIELD(3) = C11(",") - (",") Extract the field that starts after the first comma
after character 11 and ends before the next
comma.
FIELD(4) = C31 - C41("[;,:]") Extract the characters starting at position 31 up to
(but not including) the first semi-colon, comma, or
colon after position 41.
FIELD(5) = C51 - C51("[!0123456789]") Extract characters starting at position 51 up to
' (but not including) the first non-numeric
character after position 51.
For input that is formatted as orthogonal matrices of rows and columns in comma-separated
values ( .csv ) files, the simplest way to extract and assign values to individual fields without
specifying the numeric start and end points is to use the following structure for defining the
matrix. In this example, the separator is the semicolon and the construct expects exactly three
columns in the input file.
FIELD(1)=["(*);*;*"]
FIELD(2)=["*;(*);*"]
FIELD(3)=["*;*;(*)"]
The white space characters, space and tab, can be used as separators. For example:
FIELD(1)=["(*) * *"]
FIELD(2)=["* (*) *"]
FIELD(3)=["* * (*)"]
In cases where there are many commas in the . csv file, you can reduce the effort to define the
matrix by using a diagonal matrix. For example:
FIELD(1)=["(*);*"]
FIELD(2)=["*;(*);*"]
FIELD(3)=["*;*;(*);*"]
FIELD(4)=["*;*;*;(*);*"]
...
The final asterisk in each field definition addresses all commas after the field that is extracted,
which helps avoid errors caused by missed commas.
To extract a double-quoted field and strip the quotes, use a backslash to escape the quotes:
FIELD(4) = ["*,*,*\"(*)\""]
Note:
Fields are NULL when declared; that is, their value is undefined.
The following sections describe the operations you can perform on data in fields. The data
types of all operands in the expression on the assignment's right hand side are implicitly
converted as needed.
Mathematical functions
Function Description Data Types
ABS Absolute value Number ABS (x Number)
String functions
Function Description Data Types
CHAR Converts an int32 ASCII code (0-255) to String CHAR (n Int)
a character.
CONCAT Concatenate two strings. String CONCAT (x String, y String)
INSTR Returns the position of the given Int INSTR (x String, substring String,
occurrence of a specified substring. start Int, occurrence Int)
Positions start with 1. Returns 0 if
specified substring is not found.
LOWER All characters lower-case. String LOWER (x String)
LEFT Returns the leftmost n characters. String LEFT (x String, n Int)
LEN Number of characters excluding leading Int LEN (x String)
and trailing blanks.
LTRIM Trim the leading blanks. String LTRIM (x String)
REPLACE Find the specified string and replace it String REPLACE (x String, findWhat
with the third parameter. String, replaceWith String)
RIGHT Returns the rightmost n characters. String RIGHT (x String, n Int)
RTRIM Trim the trailing blanks. String RTRIM (x String)
SPACE Character string consisting of n spaces. String SPACE (n Int)
SUBSTR String consisting of LEN characters String SUBSTR (x String, start Int,
starting at start position. LEN Int)
TRIM Trim leading and trailing blanks. String TRIM (x String)
Function Description
JsonGetItem("Json_input", Function applicable in the condition part of the FOREACH()
"Selector") statement. It populates the following predefined variables:
• __ITEM _Name
• __ITEM
Json_input (String) must be a valid JSON structure.
Selector (String) full path (backslash delimited) to a JSON
element containing other elements.
Note:
The Selector is case sensitive.
Returns false if the end of the JSON array or list of objects was
reached, otherwise it returns true.
Example:
FOREACH(JsonGetItem(__MESSAGE,"Channels
\CH_1[]")) DO
Print(__ITEM)
ENDFOR
Note:
Use the IsNumber() function to verify that the
conversion from String to Number is valid.
IF(IsNumber(Value_String) == 1) THEN
Value_Number = Value_String
ENDIF
Miscellaneous functions
Specify actions in the message-specific section that filters and processes messages.
Function Description
Add(name,value) Adds a name-value pair or just a value into the collection.
Add(value)
Function Description
DateTimeFromJulian(n) Converts a numeric Julian date to a PI time stamp. A Julian
date represents an interval of time as days and fractions of a
day since January 1, 4713 BCE Greenwich noon.
EOS() Returns 1 (Int32) when it is the last line of the stream.
Otherwise returns 0.
IsNumber("string") Determines whether the string parameter can be converted
to a numeric value. Returns 1 if a meaningful conversion
exists, 0 if not.
Now() Returns the current local time stamp in DateTime format. For
all messages read from a file, Now() returns the same time
stamp, the time when the file is opened for reading.
NowUTC() Returns the current local time stamp in UTC format. For
messages from a file, NowUTC() returns the same time
stamp, the time when the file is opened for reading.
NumberFromHex(HexNumString) Converts a string containing a hexadecimal number to
Int32.
Number16FromHex(HexNumString) Converts a string containing a hexadecimal number to
Int16.
Print(" string") Prints the string or variable value to the log.
Print(variable) Returns the variable converted to string.
Predefined variables
The following predefined string variables are recognized within the INI logic. Their meaning
summarizes the following table:
Variable name Description
__DSNAME The name of the configured data source (on the connector
administration page).
__DSDESCRIPTION Data source description.
__DSADDRESS Data source address.
• Time stamp
• Value
• Status
• Questionable flag
The syntax for this action is as follows:
StoreInPI( Tag, ElementAttribute, TimeStamp, Value[, Status, Questionable] )
Parameters:
Parameter Description Data Type
Tag Specifies the target PI point. String
(Required)
StoreEvents
This action sends the following data to the specified PI points
• Time stamp(s)
• Values
• Statuses
• Questionable flags
The syntax for this action is as follows:
StoreEvents( TagNames, ElementAttributes, TimeStamp(s), Values[, Statuses,
Questionables] )
Parameters:
Parameter Description Data Type
TagNames Specifies the target PI points. Collection of String
(Required)
Element attributes Attribute names (data references to PI Point) of the Collection of String
corresponding AF element. If you omit this
(Optional)
parameter, the points cannot be referenced
through an AF element.
TimeStamp(s) Time stamp (one for all tags) or a collection of time DateTime or Collection
stamps (per tag) to be recorded with the values. If of DateTime
(Optional)
you omit this parameter, the current system time is
recorded.
Values The values to be recorded in the target PI points. Collection of
(Required) • String
• Number
• Int32
• DateTime
StoreElement
The StoreElement() function creates or updates a PI AF element using the following
parameters:
• Full path to a PI AF element (backslash delimited string)
• Template name
• Dynamic attributes (Tag names)
• Static attributes
Using the StoreElement() function, you can create AF elements with a specified set of
dynamic and/or static attributes. Any subsequent call to this function with the same Path-
name and the same set of dynamic and static parameters (that is - the same set of attributes
keeping the same values) will not be propagated to the PI Asset server; however, any change to
the number of parameters in collections or their types will result in the element template
update
The syntax for this action is as follows:
StoreElement( Path, Template[, DynAttributes, StatAttributes] )
The square brackets indicate that those parameters are optional and can be omitted.
Parameters:
Parameter Description Data Type
Full path to AF Back slash delimited path to an AF element. For String
element instance: Gateway\Device\Dataset
(Required)
Note:
Once the AF element gets created, it is always accompanied by a template that is named
according to the AF template name parameter in StoreElement(). Please make sure
that neither the AF template name nor the data types of the template attributes are
changed after the AF element creation.
StoreEventFrame
The StoreEventFrame() function creates an Event Frame using the following parameters:
• Event frame name
• Template name
• Start time
• End time or Time out
• Referenced AF element
• Dynamic attributes (Tag names)
• Static attributes
Using this function, you can create an event frame and, optionally, reference an AF element,
which has been created by the connector. Other two optional parameters are collections of
dynamic and static parameters to the event frame.
Note:
Since connector version 1.1, the event frame name will not be suffixed with current time;
as well as calls to StoreEventFrame() with the same name and start time will update
an existing event frame.
StoreEventFrame( Name, Template, StartTime, EndTime[, RefElementPath,
DynAttributes, StatAttributes] )
Parameters:
Parameter Description Data Type
Event frame name Event frame name String
(Required)
Example: If statement
If( FIELD(1) IS NOT NULL) Then
StoreInPI(FIELD(1),,NOW(),FIELD(2),,)
EndIf
FOREACH() statement
With the FOREACH() code flow control, you can loop through sets of items in the following
well-known data formats: JSON and CSV.
Below simplified example explains the principle. The syntax shows how to iterate through a
collection of comma-separated items, print them, and add the individual items to a variable of
the Collection data type.
FOREACH (CsvGetItem(__MESSAGE,",")) DO
Print(__ITEM)
Values = Add(__ITEM)
ENDFOR
The <condition> in the FOREACH() statement can only include one of the following functions:
• CsvGetItem
• JsonGetItem
They both return Boolean. For details about their input parameters, see Functions for
extracting from well-known data formats in Functions and operators.
The expression(s) within the body of the FOREACH() statement can be arbitrary expressions
that the UFL logic supports, including the nested FOREACH().
During each iteration, the JsonGetItem() function populates the predefined variables
__ITEM_Name and __ITEM. Both variables are strings. In order to convert the __ITEM to Number,
Int32 or DateTime, assign it to another variable which is of the required type.
TagNames = Clear()
TagNames = Add(__ITEM)
ENDFOR
[Data]
Data.FILTER=C1=="*"
Values = Clear()
Value_Number =__ITEM
Values = Add(Value_Number)
ENDFOR
StoreEvents(TagNames, ,NOW(), Values)
Iterating through JSON arrays and receiving a value from a JSON element
The JSON data format has many advantages such as that it is succinct, typed and
straightforward. However, for UFL, which has been optimized for working with matrixes, the
extraction logic without the looping support, was often unwieldy and cumbersome. The syntax
got simpler with the FOREACH() statement. Users can locate a certain element. If this element
is an array or a collection of similarly looking JSON objects, the construct allows for stepping
through these sets, extracting the individual items and processing them.
Example 1
This example iterates through a JSON array and forwards the extracted variables to the PI
System employing the JsonGetItem() and JsonGetValue() functions.
Note:
The whole JSON structure is forwarded to the connector JSON parsing engine through the
__MESSAGE variable.
{
"UpdateTime":"2017-04-30 23:58:10",
"VariableList": [
{ "id": "10240", "val":123.5},
{ "id": "10241", "val":83.1},
{ "id": "10242", "val":338.0}
]
}
TimeStamp = JsonGetValue(__MESSAGE, "UpdateTime")
ID = JsonGetValue(__ITEM, "id")
Value_Number = JsonGetValue(__ITEM, "val")
StoreEvent(ID, ,TimeStamp, Value_Number)
ENDFOR
Example 2
This example iterates through a "bare" JSON array, using the [] selector, and prints out
individual array items.
["VW","BMW","Fiat"]
FOREACH (JsonGetItem(__MESSAGE, "[]")) DO
Print(__ITEM)
ENDFOR
Configuration examples
Besides the following configuration examples, there is a set of samples on GitHub - PI
Connector for UFL Samples (https://github.com/osisoft/PI-Connector-for-UFL-Samples/tree/
master/INI_FILE_EXAMPLES).
Mathematical function
[FIELD]
FIELD(1).Name = "NumVal1"
FIELD(1).Type = "Number"
FIELD(2).Name = "NumVal2"
FIELD(2).Type = "Number"
Apply ROUND():
NumVal1 = ROUND(NumVal1)
NumVal2 = ROUND(NumVal2)
String functions
[FIELD]
FIELD(1).Name = "StrVal"
FIELD(1).Type = "String"
Sub-milliseconds
[FIELD]
FIELD(1).Name = "TimeStampVal"
FIELD(1).Type = "DateTime"
FIELD(1).Format = "dd-MMM-yyyy hh:mm:ss.nnn"
FIELD(2).Name = "NumVal"
FIELD(2).Type = "Number"
[MSG(1)]
TimeStampVal = ["(*);*"]
DateTime math
Use "-" or "+" to conditionally adjust for daylight saving time.
FIELD(1).Name = "TimeStamp"
FIELD(1).Type = "DateTime"
FIELD(1).Format = "dd-MMM-yyyy hh:mm:ss"
FIELD(2).Name = "TimeOffset"
FIELD(2).Type = "Time"
FIELD(2).Format = "hh:mm:ss"
TimeOffset = "01:00:00"
IF(TimeStamp>="25-Mar-2014 03:00:00" AND TimeStamp<"28-Oct-2014 03:00:00") THEN
TimeStamp = TimeStamp - TimeOffset
ENDIF
Action examples
The following examples illustrate the use of actions to modify data in PI Data Archive as well as
in PI AF.
Note:
For all three actions; that is StoreEvent(), StoreElement() and
StoreEventFrame(), the following principle is applied: If a PI point, AF element, or
event frame does not exist, the Connector will create it; otherwise it will update the
corresponding values/properties/attributes.
StoreEvent() Example 1
This example shows a simple event to PI Data Archive:
FIELD(1).Name = "NumVal"
FIELD(1).Type = "Number"
Write a value of FIELD(1) to the PI tag "In:AB:001" (Float64) ' using current time.
NumVal = ["(*)"]
StoreEvent("In:AB:001", ,NOW(), NumVal)
StoreEvent() Example 2
Event with status and questionable to PI Data Archive.
FIELD(1).Name = "NumVal"
FIELD(1).Type = "Number"
FIELD(2).Name = "NumStatus"
FIELD(2).Type = "Number"
FIELD(3).Name = "NumQuestionable"
FIELD(3).Type = "Number"
Write a value of FIELD(1) to the PI tag "In:AB:001" (Float64) using current time. Optional
parameters to StoreEvent() are, status and questionable. Any non-zero value in the status
parameter will reflect the corresponding entry in the PI System digital set and any non-zero
value at the questionable attr. position will set on the flag questionable in PI.
NumVal = ["*,(*)"]
StoreEvent("In:AB:001", ,NOW(), NumVal, NumStatus, NumQuestionable)
StoreElement() Example 1
Simple event to PI AF with subsequent two AF elements creation. The leaf AF element will
reference the tag as its dynamic data reference.
FIELD(1).Name = "NumVal"
FIELD(1).Type = "Number"
FIELD(2).Name = "DynAttrCol"
FIELD(2).Type = "Collection"
Create two AF elements: "GatewayAB" and "GatewayAB\Input". The first one (of the
FolderType; that is, without attributes), the second one with one dynamic parameter pointing
to the previously created PI tag "In:AB:001". The name of the "GatewayAB\Input" element
dynamic attribute in AF will be "Temperature".
NumVal = ["*,(*)"]
DynAttrCol = Add("In:AB:001")
StoreElement("GatewayAB")
StoreElement("GatewayAB\Input", "Measurements2", DynAttrCol)
StoreElement() Example 2
Simple event to PI Data Archive with subsequent two AF elements creation. The leaf AF
element will reference the tag as its dynamic data reference; in addition, it will have one static
attribute.
FIELD(1).Name = "DynAttrCol"
FIELD(1).Type = "Collection"
FIELD(2).Name = "StatAttrCol"
FIELD(2).Type = "Collection"
FIELD(3).Name = "NumVal"
FIELD(3).Type = "Number"
Create two AF elements: "GatewayCD" and "GatewayCD\Input". The first one (of the
FolderType; that is, without attributes), the second one with one dynamic attribute pointing to
the previously created PI tag "In:CD:002" and one static attribute "Slot position" (Int32).
NumVal = ["*,(*)"]
StoreEvent("In:CD:002","Temperature",NOW(), NumVal)
DynAttrCol = Add("In:CD:002")
StatAttrCol = Add("Slot position", 2)
StoreElement("GatewayCD")
StoreElement("GatewayCD\Input", "Measurements2", DynAttrCol, StatAttrCol)
StoreElement() Example 3
Simple events to PI Data Archive with subsequent two AF elements creation. The leaf AF
element will reference several tags as its dynamic data references; in addition, it will also
employ one static attribute.
FIELD(1).Name = "DynAttrCol"
FIELD(1).Type = "Collection"
FIELD(2).Name = "StatAttrCol"
FIELD(2).Type = "Collection"
FIELD(3).Name = "Geo"
FIELD(4).Name = "NumVal"
FIELD(4).Type = "Number"
Create two AF elements: "GatewayEF" and "GatewayEF\Input". The first one (of the
FolderType; that is, without attributes), the second one with three dynamic attributes, pointing
to the previously created three PI tags "In:EF:001,2,3" and two static attributes "Geo-Spatial
coordinates" and a "Name" (String).
Geo = ["(*),*"]
NumVal = ["*,(*),*"]
StoreEvent("In:EF:001","Temperature", NOW(),NumVal)
NumVal = ["*,*,(*),*"]
StoreEvent("In:EF:002","Pressure",NOW(), NumVal)
NumVal = ["*,*,*,(*)"]
StoreEvent("In:EF:003","Humidity",NOW(), NumVal)
DynAttrCol = Add("In:EF:001")
DynAttrCol = Add("In:EF:002")
DynAttrCol = Add("In:EF:003")
StoreElement("GatewayEF")
StoreElement("GatewayEF\Input", "WeatherAt", DynAttrCol, StatAttrCol)
StoreEventFrame() Example 1
Simple event frame with fixed duration.
Create a plain event frame "Temperature" with ten-minute duration.
StoreEventFrame("Temperature", "EFTemp", NOW(), NOW() + "00:10:00")
StoreEventFrame() Example 2
Simple event frame started and ended when a condition is true.
FIELD(1).Name = "AttrCol"
FIELD(1).Type = "Collection"
FIELD(2).Name = "Tempr"
FIELD(2).Type = "Number"
Tempr = ["(*)"]
Open an event frame; that is, do not specify the EndTime parameter.
StoreEventFrame("TempOver_10_oC", "EFTemp", NOW(), , , AttrCol)
ENDIF
ENDIF
StoreEventFrame() Example 3
Simple event frame started and ended when a condition is true, referencing the previously-
created PI point and AF element.
FIELD(1).Name = "DynAttrCol"
FIELD(1).Type = "Collection"
FIELD(2).Name = "StatAttrCol"
FIELD(2).Type = "Collection"
FIELD(3).Name = "Tempr"
FIELD(3).Type = "Number"
Values extraction:
Tempr = ["*,(*)"]
Create two PI AF elements,"GatewayCD" and "GatewayCD\Input", with one dynamic and one
static attribute: "Slot position".
DynAttrCol = Add("In:CD:002")
StatAttrCol = Add("Slot position", 2)
StoreElement("GatewayCD")
StoreElement("GatewayCD\Input", "Measurements2", DynAttrCol, StatAttrCol)
Create an event frame "TempOver_10_oC" with one static attribute, "City", referencing a
previously created element "GatewayCD\Input".
IF( Tempr >= 10 ) THEN
DynAttrCol = Clear()
DynAttrCol = Add("In:CD:002")
StatAttrCol = Clear()
StatAttrCol = Add("City", "Ostrava")
ENDIF
ENDIF
General considerations
PI Connector for UFL can be used for collecting data to points that have been previously
populated by the UFL Interface. For this, users just need to make sure the tag names stay the
same. By default, the PI Connector for UFL prefixes all the tag names with a string, defined in
PIPointPrefix.config.json. For more information about the point prefix, see Modify the
point prefix.
Other functionality changes to be aware of:
• Due to the fact that the PI Point database cannot be utilized for storing the configuration
settings any more, the /ALIAS definitions in Extended Descriptors are ignored. That means
Section [INTERFACE]
The concept of plug-ins as implemented by the UFL Interface has been redesigned. PI
Connector for UFL still works with files in Windows directories and introduces a new
communication channel based on a REST (REpresentational State Transfer) web service. Users
choose one of these two options on the connector’s administration page.
Reading data through a serial line or through POP3 servers, is not possible with PI Connector
for UFL.
Section [PLUG-IN]
As stated in the previous paragraph, support for the Serial and POP3 plug-ins has been
removed. The following table lists only those definitions that apply to the ASCIIFiles plug-in
and explains which of the corresponding settings are used and where they can be found.
Keyword UFL Interface PI Connector for UFL
ERR File extension to be assigned to files Erroneous lines get stored in files that
that caused errors during processing. conform to the following name pattern:
The default error suffix is ERR. yyyymmdd.err.
The files are placed in: %PROGRAMDATA%
\OSIsoft\PI Connectors
\UFL.ConnectorHost\Output.
IFM Mask of the input files to be Input moved to the connector's data source
processed. When the interface runs as configuration page - the Address field.
NT service and the data files reside
on a network drive, use UNC paths to
specify the location.
Section [SETTING]
The definitions in this section have been modified or omitted as shown in the following table:
Keyword UFL Interface UFL Connector
DEB Debug level. The individual debug levels, as implemented
in UFL interface, are no longer supported. In
the Diagnostics page, tab Log Configuration,
users can specify various log-levels. The
output of the Print() function goes to the
Windows Event Log, when the Informational
level option is selected.
LOCALE Specifies how the interface Input moved to the connector's data source
transforms the string representation configuration page - the Locale field.
of numbers to the native numeric
form.
MAXLOG Maximum number of log files. N/A
MAXLOGSIZE Maximum size of log files in MB. N/A
MSGINERROR Specify the path and filename for the Erroneous lines get stored in files that
log file containing lines that were not conform to the following name pattern:
successfully processed. yyyymmdd.err.
The files are placed in: %PROGRAMDATA%
\OSIsoft\PI Connectors
\UFL.ConnectorHost\Output.
OUTPUT Specify the path and filename for the For more details on how to change this
interface log file, which contains setting, see: Configure purge time/output
debugging output. path/REST channel authentication.
PI Specific Settings
The following settings are not recognized by the PI Connector for UFL.
MSG(n).EPC = "Data Type"
MSG(n).DigitalSet = "DigitalSet"
Procedure
1. Open PI System Management Tools and click System Management Tools > Data > Current
Values, and then click the Tag Search button.
The Tag Search window opens. Tags are the name attribute of PI points.
2. Change the Point Class value to base.
3. In the Tag Mask field, enter the product name for the connector surrounded by asterisks
(for example: *connectorname*), and then click Search.
4. Select one or more tags and click OK.
The Current Values area displays the current time stamp and value of the PI points.
Diagnostics
You can view diagnostic information in the PI Connector Administration site. In the left
navigation menu, click Diagnostics. Click a tab to view more information.
PI Data Servers
This PI Data Servers tab displays each PI Data Server that have been configured for the
connector. See below for descriptions of each field in the report.
Field Description
Connection status Whether the connector is currently connected to the PI Data Server.
Number of buffers The number of buffers associated with the connector.
Buffered events The number of buffered events associated with the connector.
Buffer status Whether the buffer is currently buffering data or shows the relevant
error.
Number of buffer errors Information regarding any corruption in the buffers.
PI Asset Servers
The PI Asset Servers tab provides statistics on the status and buffering performance for the
connector. See below for descriptions of each field in the report.
Field Description
Connection status Whether the connector is currently connected to the PI AF Server.
Number of buffers The number of buffers associated with the connector.
Buffered events The number of buffered events associated with the connector.
Buffer status Whether the buffer is currently buffering data.
Number of buffer errors Information regarding any corruption in the buffers.
PI Asset count The number of PI Assets currently associated with the PI Asset Server.
Message log
The Message Log tab contains important status events and errors generated by the connector.
The 1000 most recent messages logged by the current connector service process are available.
Older messages are stored in the Windows Event Viewer in a log called PI Connectors, located
in the Applications and Services Logs folder.
The Message Log tab queries the connector every 30 seconds to check for any new log
messages. If there are new messages, the New Messages button displays in the upper-right
corner of the tab. Click the button to reveal the new messages.
Advanced Diagnostics
The Advanced Diagnostics tab contains a list of reports that provide detailed information on
the connector. Most reports contain diagnostic information used by OSIsoft Tech Support.
• Name
The name of the buffer disk.
• CurrentDiskUsage
The amount of disk space currently used by a buffer file. The connector allocates buffer files
on startup and when it needs additional buffers. The size of the buffer file is not an
indication of the amount of buffered data.
• MaxDiskUsage
The maximum amount of disk space for buffers.
• PercentDiskUsed
The percentage of total disk space being used.
Troubleshoot buffering
Errors related to writing to PI AF or PI Data Archive are indicated with a red X icon on the
connector administration page. This indicates that there is a problem with the data flow to the
PI Server, and shows the relevant error that caused the data flow to stop.
Connector to PI AF
The following error messages may result from issues related to buffering from a connector to
PI AF. Perform the corrective actions to resolve the issue. If the issue persists, contact OSIsoft
Technical Support though the OSIsoft Customer Portal Contact Us page (https://
customers.osisoft.com/s/contactus).
Cannot change an existing AF A new asset was processed with Delete the existing element and
Element's template. AF Element the same fully qualified ID as an restart the connector.
'path' with index 'ID' uses existing PI AF element but it has
template 'existingTemplate'. a different schema ID (template).
Cannot apply template
'newTemplate' representing asset
Schema 'schemaId
schemaVersion'.");
An invalid modification to an Enum entry add Delete the offending
existing AF object was attempted. enumeration set and restart the
Discarding offending event and connector.
continuing processing. ID: SFO.
24B0D811-
C129-4FD1-8AD1-4EED17D1FB
B6. Error details:
Cannot modify an existing
enumeration set. Set name
'Airport Monitor
Connector.PumpTypes'. The
number of entries in the
enumeration set has changed