AnsweredAssumed Answered

How to prepare simple data validation in UFL .ini file

Question asked by piotrszelag on Jan 17, 2016
Latest reply on Jan 18, 2016 by piotrszelag

I would like to sent data from txt file to PI tags but I have a problem with "bad data"

I read Re: PI UFL - Migrating Historical Digital Values from Another Historian  but i think that it isn't exact what I need (or maybe becouse of I'm starting to learn UFL and I can't adopt explanation in my case)

 

So, I have a flat file

and I want to sent into PI three values: Temp_out, Hi_temp, Low_temp. In this case there are "bad data" in one row and two columns. My "bad data"=="---".

When I want to sent this file through UFL I get message:

and any value in row where is "bad data" isn't sent to PI (even if there is "good data" like in example - in one from three columns is a good value that should be sent to PI)

 

In PI SMT Archive Editor I have data like below

red frame - there is no data for time 4:00 AM, how to prepare .ini file to make message "Bad data" in Value column, similary to message in green frame where is a message which appears when there is no data for value.

My currenet ini file:

 

[INTERFACE]

PLUG-IN=AsciiFiles.dll

 

[PLUG-IN]

IFM=C:\DanedoUFL\*.txt

IFS=N

REN=_OK

ERR=BAD

PURGETIME=1d

PFN=False

NEWLINE=13,10

 

[SETTING]

DEB=0

MAXLOG=10

MAXLOGSIZE=20

MSGINERROR=C:\Program Files\PIPC\Interfaces\PI_UFL\Logs\err.log

OUTPUT=C:\Program Files\PIPC\Interfaces\PI_UFL\Logs\out.log

LOCALE=en-us

 

[FIELD]

FIELD(1).NAME="TimeStamp"

FIELD(1).TYPE="DateTime"

FIELD(1).FORMAT="yy-MM-ddh:mm"

'Srednia temperatura otoczenia

FIELD(2).NAME="Wartosc_1"

FIELD(2).TYPE="Number"

'Minimalna temperatura otoczenia

FIELD(3).NAME="Wartosc_2"

FIELD(3).TYPE="Number"

'Maksymalna temperatura otoczenia

FIELD(4).NAME="Wartosc_3"

FIELD(4).TYPE="Number"

 

 

[MSG]

MSG(1).NAME="Dane"

 

[Dane]

Dane.FILTER=C1=="1"

TimeStamp=["(*) * * * *"] & ["* (*) * * *"]

Wartosc_1=["* * (*) * *"]

Wartosc_2=["* * * (*) *"]

Wartosc_3=["* * * * (*)"]

StoreInPI("WL_Temp_Out", ,TimeStamp,Wartosc_1, , )

StoreInPI("WL_Temp_Out_Min", ,TimeStamp,Wartosc_2, , )

StoreInPI("WL_Temp_Out_Max", ,TimeStamp,Wartosc_3, , )

Outcomes