DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

EXPORTING ASCII DATA

i have for eg 10 channels. I need to save them in ascii format by which i mean - i want to save 10 individual files with each channels data points in. I right now an using "chdx" function but that is very slow. Does anyone know a better way of doing this? Thanks!
0 Kudos
Message 1 of 15
(5,526 Views)
If you have version 9.1 available, there is an easy way to do this:

1. Select the data channel(s) (column(s)) you want to save in the Data Portal
2. In the NAVIGATOR, go to the "FILE" menu and select "Save as ..."
3. In the dialog, check the box that says "Only elements selected in the Data Portal" and select the file type "CSV"

DIAdem will now only save that channel(s) you have selected in the data portal.

Let me know if you need additional information,

Otmar
Otmar D. Foehner
0 Kudos
Message 2 of 15
(5,524 Views)
Hi Otmar,

Thanks a lot for the info. I however have access to Diadem 8.0 and 8.1. Please send me info on how i can do this in the above mentioned versions.

Thanks SN
Message 3 of 15
(5,524 Views)
Please try this:

-----------
DataSaveKey = "Block"
DataSaveType = "ASCII"
AsciiRealFormat = "d.ddd" ' more "d" give more precisison, or "e" for scientific formats
AsciiOrdLength = 5 ' space padding for integers of different lengths
AsciiSep = "," ' you can type in ASCII code instead, i.e. = 9 for TAB

For i = 1 to 4
Call DataSaveSel("c:\temp\" & "ASCIIout"+str(i), i)
Next
-----------------------------

Simply Cut&Paste this into your AUTO Editor and run it after changing the directory from "c:\temp\". It will create a *.DAT and a *.ASC file. Ignore the *.DAT, the *.ASC files is what you want.

Let me know if this works for you,

Otmar
Otmar D. Foehner
0 Kudos
Message 4 of 15
(5,524 Views)
I am so sorry, everytime I think i have conveyed what i want to do I realize i didnt convey my message at all. I apologize for giving incomplete information. I want 10 channels saved in ascii files with their channel data points in it. The extension of this file should be XXXXX.1 for the first file, XXXXX.2 for the second file.... XXXXX.10 for the 10th file. And i have no idea how to do this in an efficient way. I apologize again! Thanks. SN
0 Kudos
Message 5 of 15
(5,524 Views)
Hi mga,

Try these modifications:

DataSaveKey = "Block"
DataSaveType = "ASCII"
AsciiRealFormat = "d.ddd" ' more "d"s give more precisison, or "e" for scientific
AsciiOrdLength = 5 ' space padding for integers of different lengths
AsciiSep = "," ' you can type in ASCII code instead, i.e. = 9 for TAB

Set fso = CreateObject("Scripting.FileSystemObject")
For i = 1 to GlobUsedChn
FilePathStem = "c:\ASCIIout"
Call DataSaveSel(FilePathStem, i)
iStr = "." & Right("000" & i, 3)
Call fso.MoveFile(FilePathStem & ".ASC", FilePathStem & iStr)
Call fso.DeleteFile(FilePathStem & ".DAT", TRUE)
Next

Regards,
Brad Turpin
DIAdem Product Support Engineer
National Instruments
0 Kudos
Message 6 of 15
(5,525 Views)
I want to do just the opposite, I want to export all of my data channels into one ASCII file. The problem I keep having is every time I save the file as an ASCII, all of my channels placed in succession in one very long column. How can i fix this?
0 Kudos
Message 7 of 15
(5,301 Views)
Hi Croxtonj,
 
The feature I am seeing is, when I save for example three channels in a .csv file, I get one column in the following format
channelData1 <some_sort_of_delimeter> channelData2 <some_sort_of_delimeter> channelData3.
 
Is this what you are seeing? This shouldn't be a concern because you can open this file back in DIAdem using the csv data storage and it will automatically parse this one column and give you three different channels.
 
I hope this helps
 
SijinK
National Instruments
0 Kudos
Message 8 of 15
(5,284 Views)
This is for a third party so I have to be able to open it in as text or ASCII file. When ever I open the Data in notepad I get one contionous column with out any delimiters. 
0 Kudos
Message 9 of 15
(5,281 Views)

Hi Cronxtonj,

What is the version of DIAdem you are using. Here is an example .csv I created. if I open up in noted I see three different colums. I am curious to find out if you see three colums or not. I am using DIAdem 9.1

SijinK

National Instruments

0 Kudos
Message 10 of 15
(5,274 Views)