AnsweredAssumed Answered

problem with ufldesigner need help with if condition

Question asked by avishay on Apr 18, 2019

Hello i have ufl i wrote and i try at the end to add only the first data column and it did not catch me i would like yours help thank ( see at end of the file)

 

[INTERFACE]

PLUG-IN=AsciiFiles.dll

 

[PLUG-IN]

IFM=D:\\test\*.*

IFS=N

REN=_OK

ERR=BAD

PURGETIME=1d

PFN=False

NEWLINE=13,10

 

[SETTING]

DEB=5

MAXLOG=10

MAXLOGSIZE=20

MSGINERROR=D:\ftproot\systemforcast\log\err.log

OUTPUT=D:\ftproot\systemforcast\log\err1.log

LOCALE=en-us

 

[FIELD]

FIELD(1).NAME="tagTime"

FIELD(1).TYPE="DateTime"

FIELD(1).FORMAT="dd.MM.yyyy hh:mm"

FIELD(2).NAME="tagpv"

FIELD(2).TYPE="String"

FIELD(3).NAME="tagyhap"

FIELD(3).TYPE="String"

FIELD(4).NAME="pvVal"

FIELD(4).TYPE="Number"

FIELD(5).NAME="yhapVal"

FIELD(5).TYPE="Number"

FIELD(6).NAME="tagTotal"

FIELD(6).TYPE="String"

FIELD(7).NAME="tagNeto"

FIELD(7).TYPE="String"

FIELD(8).NAME="totalVal"

FIELD(8).TYPE="Number"

FIELD(9).NAME="netoVal"

FIELD(9).TYPE="Number"

 

[MSG]

MSG(1).NAME="MSG_1"

 

[MSG_1]

MSG_1.FILTER=C1=="*"

tagTime=["(*) * * * *"]

pvVal=["* (*) * * *"]

yhapVal=["* * (*) * *"]

totalVal=["* * * (*) *"]

netoVal=["* * * * (*)"]

tagyhap="2test"

tagpv="1test"

tagNeto="3test"

tagTotal="4ltest"

StoreInPI(tagpv, ,tagTime,pvVal, , )

IF(field(3)=="na") THEN

yhapVal="null"

Else

StoreInPI(tagyhap, ,tagTime,yhapVal, , )

Endif

IF(field(4)=="na") THEN

totalVal="null"

Else

StoreInPI(tagTotal, ,tagTime,totalVal, , )

Endif

IF(field(5)=="na") THEN

netoVal="null"

Else

StoreInPI(tagNeto, ,tagTime,netoVal, , )

Endif

 

this is the file

30.03.2019 15:00 841 914 5845 5004

30.03.2019 16:00 574 1301 5895 5321

30.03.2019 17:00 177 1473 6080 5903

30.03.2019 18:00 0 1480 6770 6770

30.03.2019 19:00 0 1540 7590 7590

30.03.2019 20:00 0 1560 7620 7620

30.03.2019 21:00 0 1200 7330 7330

30.03.2019 22:00 0 975 6945 6945

30.03.2019 23:00 0 975 6275 6275

31.03.2019 00:00 0 975 5665 5665

31.03.2019 01:00 0 0 4560 4560

31.03.2019 02:00 0 0 4340 4340

31.03.2019 03:00 0 0 4190 4190

31.03.2019 04:00 0 0 4240 4240

31.03.2019 05:00 0 0 4610 4610

31.03.2019 06:00 0 0 4460 4460

31.03.2019 07:00 306 0 5116 4810

31.03.2019 08:00 684 0 5504 4820

31.03.2019 09:00 924 0 5494 4570

31.03.2019 10:00 1056 0 5546 4490

31.03.2019 11:00 1119 0 5479 4360

31.03.2019 12:00 1125 0 5375 4250

31.03.2019 13:00 1107 0 5267 4160

31.03.2019 14:00 1026 0 5236 4210

31.03.2019 15:00 870 0 5230 4360

31.03.2019 16:00 594 0 5214 4620

31.03.2019 17:00 183 0 5453 5270

31.03.2019 18:00 0 0 6220 6220

31.03.2019 19:00 0 0 6750 6750

31.03.2019 20:00 0 0 6730 6730

31.03.2019 21:00 0 0 6400 6400

31.03.2019 22:00 0 0 5820 5820

31.03.2019 23:00 0 0 5360 5360

01.04.2019 00:00 0 0 4940 4940

01.04.2019 01:00 0 0 340 340

01.04.2019 02:00 0 0 320 320

01.04.2019 03:00 0 0 300 300

01.04.2019 04:00 0 0 300 300

01.04.2019 05:00 0 0 310 310

01.04.2019 06:00 0 0 320 320

01.04.2019 07:00 306 0 666 360

01.04.2019 08:00 684 0 1094 410

01.04.2019 09:00 924 0 1344 420

01.04.2019 10:00 1056 0 1496 440

01.04.2019 11:00 1119 0 1559 440

01.04.2019 12:00 1125 0 1555 430

01.04.2019 13:00 1107 0 1537 430

01.04.2019 14:00 1026 0 1466 440

01.04.2019 15:00 870 0 1300 430

01.04.2019 16:00 594 0 1014 420

01.04.2019 17:00 183 0 603 420

01.04.2019 18:00 0 0 450 450

01.04.2019 19:00 0 0 500 500

01.04.2019 20:00 0 0 500 500

01.04.2019 21:00 0 0 480 480

01.04.2019 22:00 0 0 460 460

01.04.2019 23:00 0 0 430 430

30.03.2019 22:00 0 17:00 333 na na na

30.03.2019 22:00 0 18:00 444 na na na

Outcomes