To read value type in UFL Interface

Hi All,

 

I am trying to set up the UFL interface where it will read the data from CSV file which contain 'tagname', 'timestamp', 'value'. There will 42 different tag in that CSV. all tag value are float excel last one which have string value.

I am trying to write the IF else loop in INI file but it is not accepting the syntax. could you please help me to understand how can I ready value type in INI file.

 

FIELD(1).NAME="Tag"

 

FIELD(1).TYPE="String"

 

FIELD(2).NAME="TimeStamp"

 

FIELD(2).TYPE="DateTime"

 

FIELD(2).FORMAT="yyyy-MM-dd hh:mm:ss"

 

FIELD(3).NAME="Value_Number"

 

FIELD(3).TYPE="Number"

 

FIELD(4).NAME="Value_String"

 

FIELD(4).TYPE="String"

 

 

[MSG]

 

MSG(1).NAME="Data"

 

 

[Data]

 

Data.FILTER=C1=="*"

 

Tag=["(*),*,*"]

 

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

 

Value_Number=["*,*,(*)"]

 

Value_String=["*,*,(*)"]

IF (Value_Number is Number) THEN

 

StoreInPI(Tag, ,TimeStamp,Value_Number, , )

 

ELSE StoreInPI(Tag, ,TimeStamp,Value_String, , )

 

ENDIF

 

in IF loop at Number position I am getting syntax error. 

 

Kind Regards,

Prasad

Parents
No Data
Reply Children
  • thank you folks for all your suggestion.

    I did little different approach now, I have filter data with tags names as tags have identical parameter in their name. Please see below.

     

    FIELD(1).NAME="tagName"

    FIELD(1).TYPE="String"

    FIELD(2).NAME="TimeStamp"

    FIELD(2).TYPE="DateTime"

    FIELD(2).FORMAT="dd-MMM-yyyy hh:mm:ss", "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec"

    FIELD(3).NAME="value"

    FIELD(3).TYPE="Number"

    FIELD(4).NAME="stringValue"

    FIELD(4).TYPE="String"

     

    [MSG]

    MSG(1).NAME="MSG_1"

    MSG(2).NAME="MSG_2"

     

    [MSG_1]

    MSG_1.FILTER=C1=="*####*"

    StoreInPI(tagName, ,TimeStamp,value, , )

    tagName=["(*),*,*"]

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

    value=["*,*,(*)"]

     

    [MSG_2]

    MSG_2.FILTER=C1=="*###*"

    StoreInPI(tagName, ,TimeStamp,stringValue, , )

    tagName=["(*),*,*"]

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

    stringValue=["*,*,(*)"]