Miscellaneous functions
- Last UpdatedNov 16, 2022
- 2 minute read
Specify actions in the message-specific section that filters and processes messages. For examples, see the example files installed with the interface, or see the topic Learn about UFL examples.
Miscellaneous PI UFL interface functions
|
Action |
Description |
|---|---|
|
Add(name, value) |
Adds a name value pair into the collection. For an explanation and example, see the description of StoreInPIPoints() in section Data storage in PI points. |
|
AppendLines(n) |
Takes n lines from the input stream and appends them to the currently processed line for evaluation. |
|
BOS() |
Returns 1 (Int32) when it is the first line of the stream. Otherwise returns 0. |
|
Clear() |
Clears the collection. For an explanation and example, see the description of StoreInPIPoints() in topic Data storage in PI points. |
|
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. |
|
DigCode(system_digital_state string) |
Returns the number (Int32) corresponding to the specified system digital state (string). If a string which does not correspond to any of the strings in the system digital state table is used (for example, if DigCode="Some unused string"), then DigCode returns the minimum value of type LONG. which is -2147483647. |
|
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. REM: 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 UTC time in DateTime format. REM: For messages from a file, NowUTC() returns the same time stamp, the time when the file is opened for reading. |
|
Number16FromHex(HexNumString) |
Converts a string containing a hexadecimal number to Int16. |
|
NumberFromHex(HexNumString) |
Converts a string containing a hexadecimal number to Int32. |
|
Print("string") Print(FieldName) |
Print specified string or value of specified field to log file. |
|
SetNextMsg(MSG,[NumberOfMsgs]) |
Change order in which filters are applied to messages. By default, filters are applied in the order in which they are specified in the configuration file. This action redirects the specified number of following messages to the filter for the specified message. If you omit the number of messages, all subsequent messages are directed to the specified filter. |
|
SkipFile() |
Skip the rest of the lines that arrived in a batch of input stream lines, for example in a data file. SkipFile() can be used when a certain message indicates that the incoming data is invalid. |
|
SkipLines(n) |
Skip the specified number of lines from the input stream. |
|
StoreInPI() |
Sends data to a specified PI point. See topic Data storage in PI points. |
|
StoreInPIPoints() |
Creates a PI point. See topic Data storage in PI points. |
|
ToString(FieldName) |
Returns the fieldname/variable converted to string. |