DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

"\" is automatically changed when the channel name is "/".

Hello.

 

This changes when importing data from the ODS DB into the Data Portal.

 

like this.

 

KakaoTalk_20210525_115346067.jpg

 

Customers sometimes put "/" in the channel name.

 

To bring diadem is automatically convert this to "\".

 

So we can't make a report with this and we can't export it either.

 

Can we control this conversion?

 

0 Kudos
Message 1 of 6
(3,667 Views)

Hi KyutaeTenergy,

 

There is an automatic mechanism that DIAdem engages to swap out any "/" characters found in a channel name for "\" characters.  This is for the purpose of avoiding conflicts with the Group/Channel referencing scheme that DIAdem graph configurations use.

 

Based on your comments and the screenshot you provided, I'm going to guess that this mechanism did not engage for you because your "/" channel name characters are present with some form of dual-byte encoding, such as perhaps Unicode.  If this is the case, then this could be a bug we'd like to fix in a future version.  Could you post a data file that exhibits this issue?

 

Note that in your screenshot the only "/" characters I see with my eyes are for the unit string of each channel, and there the "/" character is allowed and never changed automatically during the loading process.  What I do see is a funny "W" character with strikethrough lines.  I'm wondering if that's how my English operating system is rendering your dual-byte encoded "/" character.  I guess that would mean that your unit strings are not in dual-byte but your channel names are?

 

Brad Turpin

Principal Technical Support Engineer

NI

0 Kudos
Message 2 of 6
(3,632 Views)

first of all. Thanks for your support.

 

Based on your reply. that means, We cannot change what is automatically converted.

 

"/" -> "\". This is the mechanism of Diadem.

 

How do I export to Excel if the user puts "/" in the channel name?

 

Can't I use "/" just for export?

 

This data is located in Asam ODS Server, so it is difficult to deliver it.

0 Kudos
Message 3 of 6
(3,619 Views)

Hi KyutaeTenergy,

 

Do you have a target structure that you need to write in the Excel file, or could you import the data into Excel from a CSV file and morph the structure afterwards in Excel?  For a target structure, you could use a DIAdem script and ActiveX to write the channel names any way you want in one step and then pass the column values with a data range object in a second step.  There are two other options for exporting to Excel file from DIAdem that may work, but I fear the "/" name restriction will get in the way there.  

 

If it's OK to export the data to an ASCII file with comma or tab or semicolon column delimiters, then again there are options to write a custom ASCII header and then the values using a DIAdem script.

 

How many columns and rows are you usually dealing with for this data from ASAM-ODS?

 

Brad Turpin

Principal Technical Support Engineer

NI

0 Kudos
Message 4 of 6
(3,565 Views)

No, we don't have a structure to fill out. It's a general structure. Channel name in first column, Unit in second column.

Here's our procedure.
1. Import data from Asam ODS server.
2. Export to Excel.
The problem is that the source data on the Asam ODS server contains a channel name "/".
User wants to export the original data that has not been modified.

Generally, our data has 50 to 60 channels and 1000 raws.

0 Kudos
Message 5 of 6
(3,534 Views)

Hi KyutaeTenergy,

 

There is a "sourceoriginalname" channel property you can read that stores the original channel name, before the loading rules changed any of the channel name characters, or you can just use the Replace() command to map any "\" characters back to "/" characters.  The simplest solution is to export the bad channel names, along with the data values, from DIAdem to Excel, then "fix" the bad channels names afterwards with the CreateExcelWorkbook() command, which can start with a template Excel file and even edit that template Excel file:

Set Workbook = CreateExcelWorkbook(ExistingExcelFilePath)
Set Sheet = Workbook.Worksheets(1)
FOR j = 1 TO 3
  Name = Sheet.Cells(1, j).Value
  Sheet.Cells(1, j).Value = Replace(Name, "\", "/")
NEXT ' j
Call Workbook.SaveAs(ExistingExcelFilePath)

Brad Turpin

Principal Technical Support Engineer

NI

0 Kudos
Message 6 of 6
(3,392 Views)