Hi all,
I am trying to import a list of values into an "_original" datapoint config using the #DpValue functionality of the ASCII import tool.
The text is as follows (of course, in the correct format):
#DpValue
Manager/User: ASC (1)/0
ElementName: MyDataPoint.MyElement
TypeName: MyType
_original.._value: ListValue_1, "ListValue_2", "ListValue_3"
This syntax is as per exports of the same lists from existing datapoints.
In the _original config window for the datapoint, I expect to see three separate values, with (selection: n/3)
However, WinCC OA does not recognise this as a list. Instead, it imports the whole text as one string, "ListValue_1, "ListValue_2", "ListValue_3"".
So the _original config has only one value, and (selection: n/1)
Could anyone suggest the correct syntax to import this as a list with multiple distinct values?
WinCC OA version = 3.11
Operating System = Windows Server 2008 R2
Kind regards,
Angus Heyworth
ASCII Import: Importing List into #DpValue
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: ASCII Import: Importing List into #DpValue
It looks like you are using the ASCII format V2.
Normally the format V1 is used. The V2 format is not needed any more.
What is the datatype of the dp element where the dyn values shall be saved?
Depending on the datatype the format has to be different.
The easiest way to see how it works is
-- to create a datapoint in the PARA module
-- set some original values
-- make an ASCII export in format V1
Best Regards
Leopold Knipp
Senior Support Specialist
Normally the format V1 is used. The V2 format is not needed any more.
What is the datatype of the dp element where the dyn values shall be saved?
Depending on the datatype the format has to be different.
The easiest way to see how it works is
-- to create a datapoint in the PARA module
-- set some original values
-- make an ASCII export in format V1
Best Regards
Leopold Knipp
Senior Support Specialist
- AngusETM
- Posts:37
- Joined: Tue Apr 25, 2017 4:48 pm
Re: ASCII Import: Importing List into #DpValue
hi Leopold,
Thanks for your reply.
I've investigated further and discovered that the problem is caused by Microsoft Excel 2016 adding additional quotation marks to the file when it is saved.
For example:
Excel will display this: State1New, "state2New", "State3New"
But it will save as this: "State1New, ""state2New"", ""State3New"""
Is there any known option to solve this behaviour?
What text editors are commonly used?
We've discovered a workaround, which is to copy+paste into Notepad++ then save. However, of course this is not ideal.
Thanks for your reply.
I've investigated further and discovered that the problem is caused by Microsoft Excel 2016 adding additional quotation marks to the file when it is saved.
For example:
Excel will display this: State1New, "state2New", "State3New"
But it will save as this: "State1New, ""state2New"", ""State3New"""
Is there any known option to solve this behaviour?
What text editors are commonly used?
We've discovered a workaround, which is to copy+paste into Notepad++ then save. However, of course this is not ideal.
- adaneau
- Posts:310
- Joined: Tue Feb 21, 2012 9:49 am
Re: ASCII Import: Importing List into #DpValue
Hi,
I also noticed this behavior with Excel...
From stackoverflow
I also noticed this behavior with Excel...
From stackoverflow
No easy solution here than using np++ or vim to fix it before import...This is standard behavior (and similar to the way CSV files are saved). See the RFC 4180 – Common Format and MIME Type for Comma-Separated Values (CSV) Files:
If double-quotes are used to enclose fields, then a double-quote appearing inside a field must be escaped by preceding it with another double quote.
- AngusETM
- Posts:37
- Joined: Tue Apr 25, 2017 4:48 pm
Re: ASCII Import: Importing List into #DpValue
Thanks Alexandre.
Yes, I saw the stackoverflow post but was hoping for a "magic fix". However agreed, it's apparently impossible! Incredible.
Copy+pasting into Notepad++ seems to be the best fix.
Yes, I saw the stackoverflow post but was hoping for a "magic fix". However agreed, it's apparently impossible! Incredible.
Copy+pasting into Notepad++ seems to be the best fix.