omanlng

use UFL interface to store Point values to PI system

Discussion created by omanlng on Jan 2, 2014
Latest reply on Jan 17, 2014 by pingram

I want to use UFL interface to store data from CSV file in PI system. some value coming for example as number and some time coming as <0.1 and <0.2.

 

so I use the below configurations:

 

--------------------------------------------------------------------------------------------

 

PI Point configuration:

 

 

 

- Point type: Float32 ( because we want trend the value)

 

- Point source: SLIM

 

- Location1: 1

 

- Instrument tag: the same as what is coming in CSV file.

 

---------------------------------------------------------------------------------------------

 

UFL interface configuration:

 

 

 

[FIELD]

 

- FIELD(1).NAME="Name1"

 

- FIELD(1).TYPE="String"

 

- FIELD(2).NAME="Timestamp"

 

- FIELD(2).TYPE="DateTime"

 

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

 

- FIELD(3).NAME="Name2"

 

- FIELD(3).TYPE="String"

 

- FIELD(4).NAME="Value"

 

- FIELD(4).TYPE="String"

 

 

 

[MSG]

 

SG(1).NAME="MSG_1"

 

 

 

[MSG_1]

 

MSG_1.FILTER=C1=="*,*,*,*"

 

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

 

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

 

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

 

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

 

 

 

IF(Value == "<0.1") then StoreInPI(,Name1&"."&Name2 ,Timestamp,0,-12, ) ENDIF

 

IF(Value == "<0.2") then StoreInPI(,Name1&"."&Name2 ,Timestamp,0,-13, ) ELSE StoreInPI(Name1&"."&Name2 , ,Timestamp,Value, , ) ENDIF

 

--------------------------------------------------------------------------------------------

 

when I run the interface, the error Cannot convert <0.01 from String to R8.

 

hint: -12 and -13 should be reference to digital state value in system as for example <0.1 and <0.2 .

Outcomes