ascii manager to update array original values

Find and share HowTos to various installations / configurations!
7 posts • Page 1 of 1
tmalone
Posts:192
Joined: Mon Nov 22, 2010 11:21 pm

ascii manager to update array original values

Post by tmalone »

I used the ASCII manager to export 2 items
Datapoints D
Original values

The Excel view is as I expected with the arrays ending up in a single cell under _original.._value. They look like: 23, 26, 22, 27, 30

So, I copied one that I liked the values, and changed the names match the other DPs.

Every original value with just a single value imported just fine. The array values are still empty? They were empty before, and they are still empty?

Is there an issue with the syntax of the import for array values?
Is there an issue with using the timestamps from the previous values, I have been very careful to put in a time after that which was in the DPE aready?
Is there an issue with the arrays all being empty and trying to put in more than 1 value?

I have a lot of these to do, and I don't want to use PARA to insert all these arrays.

adaneau
Posts:310
Joined: Tue Feb 21, 2012 9:49 am

Re: ascii manager to update array original values

Post by adaneau »

Hi Todd,

Are you sure that Excel isnt messing up with your file?

I tried with ascii import export directly (the embedded editor) and it worked well with comma separated variable as you did.

Is there an issue with the syntax of the import for array values? I tried the same as you and it worked
Is there an issue with using the timestamps from the previous values, I have been very careful to put in a time after that which was in the DPE aready? I never cared about timestamps while using ASCII import export. I dont think it matters but to be confirmed...
Is there an issue with the arrays all being empty and trying to put in more than 1 value? My second array was empty and got filled by ASCII without issues

BR
Alex

tmalone
Posts:192
Joined: Mon Nov 22, 2010 11:21 pm

Re: ascii manager to update array original values

Post by tmalone »

I got some errors this time:

WCCOAascii_info:DpValue (103): Values for Hamina.Power.TotalMW sent.
WCCOAascii_info:Value "42,35,32" has wrong type for attribute Hamina.Environmental.RoomTemps:_original.._value!
WCCOAascii_info:DpValue (104): Values for Hamina.Environmental.RoomTemps sent.
WCCOAascii_info:Value "22,19,21" has wrong type for attribute Hamina.Environmental.Humidity:_original.._value!
WCCOAascii_info:DpValue (105): Values for Hamina.Environmental.Humidity sent.
WCCOAascii_info:DpValue (106): Values for Hamina.Security.Incidents sent.
WCCOAascii_info:DpValue (107): Values for Hamina.Equipment.LastFailure sent.
WCCOAascii_info:Value "0, 0, 2" has wrong type for attribute Hamina.Environmental.Faults:_original.._value!
WCCOAascii_info:DpValue (108): Values for Hamina.Environmental.Faults sent.
.... more

It is complaining that the "0, 0, 2" is the wrong type... it is a dyn_int... but when it is in the export, it is a string with commas???
Remove the commas??? I think this is a big FAIL of the ascii manager.

Since it is a standard export, we can't use the COM connection and import directly with Excel.

adaneau
Posts:310
Joined: Tue Feb 21, 2012 9:49 am

Re: ascii manager to update array original values

Post by adaneau »

Hi Todd,

Excel is definitely messing up with your file.

You shouldnt have "0, 0, 2" but 0,0,2 inside ascii file, otherwise it will be seen as string

This is why I hate to use excel with dpl, it messes up descriptions and others things...

BR
Alex

tmalone
Posts:192
Joined: Mon Nov 22, 2010 11:21 pm

Re: ascii manager to update array original values

Post by tmalone »

Perfect solution. That was the issue, the quotes made it look like a string, removing them solved it.

FYI, for anyone having to do this. Open the file with the text editor from ASCII manager, not Excel. Then use this editor to replace all " with . Import and done!

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: ascii manager to update array original values

Post by leoknipp »

Replacing all double quotes " by another character in an ASCII file will probably cause other problems as in some parts of the ASCII file the double quotes are needed.
Therefore you have to be careful when editing ASCII files and replacing strings.

Best Regards
Leopold Knipp
Senior Support Specialist

tmalone
Posts:192
Joined: Mon Nov 22, 2010 11:21 pm

Re: ascii manager to update array original values

Post by tmalone »

Replaced with blank, nothing, no character.

Works fine. How about making the ASCII manager a bit smarter to know what the target data type is?

7 posts • Page 1 of 1