AnsweredAssumed Answered

Help with UFL ini (PI Connector for UFL)

Question asked by AFlor on Apr 10, 2019
Latest reply on Apr 15, 2019 by AFlor

Hi all,

 

I have a problem with mi INI file in UFL connector. The problem is that i am not able to store values with the timestamp specified in data file.

Datafile is like this:

+-------------------------------------------------------------------------------
| Measurements received at :  9-APR-2019 16:19:07.28
+-------------------------------------------------------------------------------
| Global MEAsurements.
| R4-Furnace Pressure                        P.HOR | Pa       =    12.58984   
| R4-Fuel-oil Temperature                          | °C       =   0.0000000E+00
| R4-Calorific Value of Fuel-oil                   | kcal/l   =   0.0000000E+00
+-------------------------------------------------------------------------------
| Recuperator MEAsurements.
| R4-Inlet Air Temperature                         | °C       =   0.0000000E+00
+-------------------------------------------------------------------------------
| Zone  1 - RECUPERATION, TOP.
| R4-TC#1 Temperature                        TC.21 | °C       =    82.5625   
| R4-TC#2 Temperature                        TC.22 | °C       =    76.1875   
| R4-Oxygen Content                           O2.1 | %        =   0.0000000E+00
+-------------------------------------------------------------------------------
| Zone  2 - RECUPERATION, BOTTOM.
| R4-TC#1 Temperature                        TC.28 | °C       =    678.4375   
| R4-TC#2 Temperature                        TC.27 | °C       =    673.0625   
+-------------------------------------------------------------------------------

 

My INI file is this one:

'Declare fields, with name and data type
[FIELD]
FIELD(1).Name="Timest"
FIELD(1).Type="DateTime"
FIELD(1).Format= "d-MMM-yyyy hh:mm:ss","JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC"
FIELD(2).Name = "Value"
FIELD(2).Type = "Number"
FIELD(3).Name = "TagName"
FIELD(3).Type = "String"


'Define name for message
[MSG]
MSG(1).Name = "Timestamp"
MSG(2).Name = "Data"

'Define filters
[Timestamp]
Timestamp.Filter = C1 == " | Measurements received*"
Timest=C1(":")-(".") 'timestamp starts at column 30
[Data]
Data.Filter = C2=="|*" AND C53=="|*"
Value = C65-C80 'value field starts at column 65
TagName = C2("|")-("|") 'tag name starts at column 4
TagName = REPLACE(TagName," ","")
Tagname = "PLANT_" & TagName

'StoreinPI data with timestamp
StoreInPI(TagName, ,Timest, Value)

 

All values retrieved are timestamped with processing time of the datafile, instead of Timest field.

 

Any idea of what is wrong or how can i retrieve correct timestamp?

 

Another minor problem is that REPLACE function is not doing anything and tags are named like this one:

"R4-Furnace Pressure                        P.HOR "

 

Thanks in advance.

Outcomes