Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

PI Interface for Universal File and Stream Loading UFL

[PLUG-IN] section

  • Last UpdatedNov 16, 2022
  • 10 minute read

This section contains plug-in-specific settings. The following tables describe the settings.

ASCII file settings

Setting

Description

ERR

File extension to be assigned to files that caused errors during processing. The default error suffix is .ERR.

Example: Err = BAD

IFM

Required: The input files to be processed. When the interface runs as NT service and the data files reside on a network drive, use UNC paths to specify the location.

Examples:

  • IFM = C:\myfolder\Data\data*.txt

  • IFM = \\mynode\myshare\Data\*.txt

IFS

Specifies the order in which input files are processed. Valid arguments are:

C: Creation date (default)

M: Modification date

N: File Name

Example: IFS=C

NEWLINE

Specifies line-end character(s). Default is CRLF (ASCII 13 and 10).

Example: NEWLINE = "STOP" OR "END"

PFI

Prepend File Info. Adds a line containing the data file name, creation, and modification time stamps.

Default value is FALSE. If set to TRUE, the inserted line uses the format File_Name, Creation_Time_Stamp, Modification_Timestamp

Time stamps use the format dd-MMM-yyy hh:mm:ss.nnn.

PFI_PREFIX

Used with the PFI keyword. Precedes the data file name, creation, and modification time stamps with specified text. Default value is an empty string.

Example: PFI_PREFIX = "Data file info : "

PFN

Prepend File Name. To include the filename as the first line in the input stream, set to TRUE. Default value is FALSE.

PFN_PREFIX

Used with the PFN keyword. Precedes the filename with specified text. Default value is an empty string.

Example: PFN_PREFIX = "DATAFILE: "

PFP

Processed File Path

The processed data files will be stored in the referenced directory. The default directory is specified through IFM.

Example: PFP=C:\Program Files\PIPC\Interfaces\PI_UFL\Data\Output

PURGETIME

Specify the amount of time to wait before purging processed data files. The time specified is relative to the time on the interface node and is compared against the to-be-purged file processed time. Default is one day (1d). The minimum value is one second (1s). Specify time as follows:

  • s seconds

  • m minutes

  • h hours

  • d days

    Only renamed files that were processed without error are purged.

    Example: PURGETIME = 10m

RBP

Optional: Rename file before processing it, to ensure that the file is processed only once if multiple instances of the interface are processing the same directory. The default value is no renaming.

Example: RBP = TempFile1.txt

REN

Specifies the extension to be assigned to successfully-process input files. Default is _OK. In addition, the file is assigned a suffix specifying the date and time it was processed. The format of the date-time suffix is dd MMM yyyy_hh mm ss.nnn. The format of the date-time suffix cannot be configured. Note that the renaming scheme changed after version 2.x of the PI Interface for UFL.

Example: REN = SUCC

WORDWRAP

Breaks input line into lines of specified length. Overrides NEWLINE if specified. Maximum setting is 10240.

Example: WORDWRAP = 11

Data file contents:

TagName1 1 TagName2 2 TagName3 3 TagName4 4

Resulting lines:

TagName1 1

TagName2 2

TagName3 3

TagName4 4

When specifying the NEWLINE clause, note the following:

  • If the lines in the input file are terminated in more than one way, specify the line endings in double quotes and use the OR clause to specify valid line endings.

    For example: NEWLINE = "event end>" OR "STOP"

  • To specify ASCII line endings, use comma-separated number with no white space.

    For example: 13,10

  • You can specify line endings as ASCII values or strings, but not both.

    For example: NEWLINE = "event end>" OR 13,10 is invalid.

  • String comparisons are case sensitive.

Serial port settings

Setting

Description

BITS

Number of bits. Valid values: 4, 5, 6, 7, and 8. Default value is 8.

Example: BITS = 8

COM

The serial port number. Default value is 1.

Example: COM = 2

COMDATA

Full path to a file in which the interface stores raw data read from the serial port. Intended for troubleshooting.

Example: COMDATA = c:\UFLLogs\rawdata.txt

ICBR

Idle Count Before Reconnect. When the specified number of scan classes without data are completed, the COM port will be reinitialized. When this keyword is not defined, the interface does not do any run-time verification of the status of the port.

NEWLINE

Specifies the line-end character. Default is CRLF (ASCII 13 and 10).

Note: NEWLINE defined with the Serial Plug-In does not support the OR clause. This behavior is different than the NEWLINE used with the ASCII Files Plug-In.

Example: NEWLINE = "STOP"

PARITY

Specifies parity of incoming data. Valid values:

EVEN

ODD

NO (default)

MARK

SPACE

SPEED

Port BAUD. Default is 9600 bps.

STOPBITS

Number of stop-bits. Valid values:

0: 1 stop bit (default)

1: 1.5 stop bit

2: 2 stop bits

POP3 settings

Setting

Description

ATTACHMENT_PREFIX

For use with MAIL_ATTACHMENT. Specifies text to be prepended to the contents of the attachment. Default is [Attachment]:

Example: ATTACHMENT_PREFIX = [Message Attachment]:

BODY_PREFIX

For use with MAIL_BODY. Specifies text to be prepended to the contents of the email body. Default is [Body]:

Example: BODY_PREFIX = [Message Body]:

DATE_PREFIX

For use with MAIL_DATE. Specifies text to be prepended to the date. Default pattern is [Date]:

Example: DATE_PREFIX= [Message Date]:

FILTER_FROM

Process emails from one or more specified addresses. Email from other sources is ignored, but can be forwarded to the backup address. Separate multiple address using semicolons. If you omit this clause, all emails from the specified server will be processed.

Example: FILTER_FROM = me@plant1.com;lab@plant1.com

FORWARD_TO

Specify a backup email address. Useful when emails need to be available after being processed or in case of errors. The SMTP server and port number (through which the email is forwarded) are specified using the keywords SMTP_SERVER and SMTP_PORT. By default, email is not forwarded.

Example: FORWARD_TO = uflBackup@osisoft.com

FORWARD_AS_UFLSTREAM

Enables email forwarding. By default, email is not forwarded.

Example: FORWARD_AS_UFLSTREAM = True

FROM_PREFIX

For use with MAIL_FROM. Specifies text to be prepended to the sender. Default pattern is [From]:

Example: From_Prefix = [Message From]:

MAIL_ATTACHMENT

To disable processing of attachments, set to False. By default, ASCII attachments are processed. The interface supports zipped attachments with version 3.4.x and later.

Example: Mail_Attachment = False

Note: The maximum size of all attachments is 10 MB.

MAIL_BODY

To disable processing of the body of the email, set to False. By default, email body is processed.

Example: Mail_Body = False

MAIL_DATE

Prepend Date. By default, the date when the email was sent is prepended to the beginning of the email body. To disable this feature, set to False.

Example: Mail_Date = False

MAIL_FROM

Prepend Sender. By default, the sender’s email address is prepended to the beginning of the email body. To disable this feature, set to False.

Example: Mail_From = False

MAIL_SUBJECT

Prepend Subject. By default, the subject is prepended to the beginning of the email body. To disable this feature, set to False.

Example: Mail_Subject = False

PFN

Prepend File Name. To include the filename of the attachment as the first line in the attachment, set to True.

To assist parsing, the filename can be prefixed with a specified string pattern. Default value is False.

PFN_PREFIX

Used with the PFN keyword, precedes the filename in the attachment with specified text. Default value is an empty string.

Example: PFN_PREFIX = "ATTACHED FILE: "

POP3_COMMAND_WAIT

Number of milliseconds to wait for the POP3 answer. Default: 500 ms. Applicable when the POP3 server response times are long.

Example: POP3_Command_Wait = 1000

POP3_PASSWORD

Specify the password for the POP3 user.

Example: POP3_PASSWORD = Let_Me_In

Note: For more details, see the paragraph below this table.

POP3_PORT

Specify the port number of the POP3 server. Default value is an empty string.

Example: POP3_Port = 110

POP3_SERVER

URL of the POP3 server. Default value is localhost.

To enable the secure (POP3S) protocol, prepend the POP3 server URL with the pop3s:// prefix. For example: pop3s://pop.gmail.com

Alternatively, use the pop3:// prefix for the unsecure POP3 protocol. For example: pop3://email.seznam.cz

The URL can also contain a port number. For example: pop3://pop.gmail.com:995

Note: If the port number is not in the URL, the default port is used. The value specified through POP3 PORT setting is only considered when the URL does not have any port specified.

POP3_USER

Mandatory: Email account on the POP3 server.

Example: POP3_User = ufl@osisoft.com or POP3 User = ufl

POP3_VERIFYSERVICECERT

If an email server is accessed through the secure protocol (POP3S), this parameter, when set to True, will verify the existence of a valid, CA signed certificate. The default value is True.

Example: POP3_VerifyServerCert=False

SMTP_PORT

Specify the port number of the SMTP server. Default value is an empty string.

Example: SMTP_Port = 25

SMTP_SERVER

URL of the SMTP server to which emails can be forwarded. See the FORWARD_TO setting for more details. Default value is the URL specified through the POP3_Server parameter.

To enable the secure (SMTPs) protocol, prepend the SMTP server URL with the smtps:// prefix. For example: smtps://gmail.com

Alternatively, use the smtps:// prefix for the unsecure protocol. For example: smtp://email.seznam.cz

The URL can also contain a port number. For example: smtps://smtp.gmail.com:465

Note: If the port number is not in the URL, the default port is used. The value specified through SMTP PORT setting is only considered when the URL does not have any port specified.

SMTP_USER

The user name that will be used for forwarding an email.

Example: SMTP_USER = ufl@osisoft.com or SMTP_USER = ufl

SUBJECT_PREFIX

For use with the MAIL_SUBJECT keyword. Specifies a string to be prepended to the subject line of incoming email. Default value is [Subject]:

POP3 and SMTP passwords

The interface requires the email user's password in order to access the POP3 or SMTP email server. You can specify the password in the configuration .ini file using the POP3_PASSWORD and SMTP_PASSWORD keywords, but specifying a password in clear text is not secure. The alternative is to run the interface interactively and enter the password when prompted. The interface will encrypt the password and store it in the same directory with the configuration file as a file named POP3.PWD or SMTP.PWD or both. After the file has been created, you can run the interface as a service, and it will read the password from the .pwd file.

Beginning with version 3.6.5, the POP3 and SMTP passwords are no longer maintained in the .pwd files, nor do they remain in clear text in the configuration .ini file.

Instead, they are stored in the Windows Credential Manager, the .pwd files deleted, and the clear text in the configuration .ini file obfuscated; that is, replaced with a string of asterisks.

If you need to update the credentials, stop the service, update the configuration .ini file by replacing the obfuscated password with a new one, and then start the service again.

Note: If, after restarting interface version 3.6.5 and higher the .pwd files are not deleted, or the plain text passwords are not replaced by asterisks in the .ini file, check to confirm that the interface NT service account has write permissions to these files.

The corresponding entry in the Windows Credential Manager has the following name pattern: service name_pop3 or service name_smtp. For example: pi_ufl1_pop3

On restarts of the interface, the passwords for POP3 and SMTP servers are then read from the Windows Credential Manager.

BatchFL settings

Setting

Description

ADJUST

Specifies the number of minutes to adjust the time stamp. For example, to add an hour to the time stamp, specify 60. To subtract an hour, specify -60. By default, time stamps are not adjusted.

Example: ADJUST = 60

ALIAS

The data file specifies an alias instead of a PI tag name. If ALIAS is specified, you must specify a point source PS. The interface searches for the alias in the ExDesc or InstrumentTag field of points with the specified point source. Valid values are E (Extended Descriptor) or I (Instrument Tag). By default, the interface uses the tag name.

Example: ALIAS = E

DATETIME_FORMAT

Specify time string format.

Example:

DATETIME_FORMAT = dd-MMM-yyyy hh:mm:ss

DATETIME_MONTH_FORMAT

Specify month format.

Example:

DATETIME_MONTH_FORMAT = Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec

DIGITAL_SET

If POINT_TYPE is Digital, you must specify the name of an existing digital state set name. Default is System.

Example: DIGITAL_SET = My_Digital_Set

ERR

File extension to be assigned to files that caused errors during processing. The default error suffix is ERR.

Example: Err = BAD

FIELD_SEPARATOR

Specifies the field separator between tag name and time stamp, and time stamp and value. Default separator is a comma.

Example: FIELD_SEPARATOR = |

IFM

The input files to be processed. When the interface runs as a service and the data files reside on a network drive, use UNC paths to specify the location.

Examples:

IFM = C:\myfolder\Data\data*.txt

IFM = \\mynode\myshare\Data\*.txt

IFS

Specifies the order in which input files are processed. Valid arguments are:

C: Creation date (default)

M: Modification date

N: File name

Example: IFS=C

POINT_TYPE

Specifies the data type to be used when the interface attempts to create a previously undefined point. By default, undefined points are not automatically created.

Example: POINT_TYPE = Float32

PURGETIME

Specify the amount of time to wait before purging processed data files. The time specified is relative to the time on the interface node and is compared against the to-be-purged file processed time. Default is one day (1d). The minimum value is 1s (one second). Specify time as follows:

s: seconds

m: minutes

h: hours

d: days

Only files that were processed without error are purged.

Example: PURGETIME = 10m

REMOVE_BLANKS

By default, leading and trailing blanks are trimmed from strings. To disable trimming, set this option to FALSE.

Example: REMOVE_BLANKS = True

REN

Specifies the extension to be assigned to successfully-processed input files. Default is "_OK". In addition, the file is assigned a suffix specifying the date and time it was processed. The format of the date-time suffix is dd MMM yyyy_hh mm ss.nnn. The format of the date-time suffix cannot be configured. Note that the renaming scheme changed after version 2.x of the UFL interface.

Example: REN = SUCC

SCALE

Scale is valid for numeric points only.

The default value is 0 (no scaling). To enable scaling, set the value to 1.

If scaling is enabled, the interface reads the UserReal1 point attribute and applies it as a multiplication coefficient to the value in the data file, even for UserReal1 = 0.

SLEEP

Specifies the number of seconds to pause between processing files, to throttle the rate at which the data files get processed. By default, there is no delay between files.

Example: SLEEP = 10

In This Topic
TitleResults for “How to create a CRG?”Also Available in