09-22-2017 05:16 AM
Hello,
I'm trying to import data from a .org file. Most of the file is binary except some parts are ASCII. I want to import the following data:
A0 0,99357062 0,00048 A1 -4,6255517E-6 2,1281E-6 A2 8,2389271E-9 2,4556E-9 A3 -2,571435E-12 8,0372E-13
Only 1 channel is need, it's the first column of numbers.
Group name should be "DE0203" extracted from this line:
Courbe de correction du Débitmètre Eau DE0203 à 20°C
Could you help me to configure the dataplugin wizard ?
Thank you
09-22-2017 04:27 PM
Hi Romain,
That file's mostly binary. I was hoping you meant that there was an ASCII header section at the top of the file, but the ASCII properties are embedded in the binary section. The only ASCII section is the first line:
CPYA 3,540 #
You're going to have to describe how the binary data is stored. What program stored this binary file?
Brad Turpin
DIAdem Product Support Engineer
National Instruments
09-22-2017 05:07 PM
Hi Romain,
I created a simple DataPlugin to look for the first line that starts with "A0" and loads 4 rows of values from the second column. It also looks for the first line that starts with "Courbe" and uses the whole line as the Group name. If you want just the serial number in that line, you'll need to provide additional lines like that one so I can tell how best to parse it. I have no way of knowing how that information varies from file to file.
The DataPlugin ignores everything else in the file other than those 4 lines. If you try this on other *.org files that are huge, the DataPlugin may perform slowly, depending how far down in those files the 2 lines are that it's searching for.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
09-25-2017 01:53 AM
Thank you very much, it's exactly what I needed.
How have created the data plugin ? By script or by data plugin wizard ?
09-25-2017 09:44 AM
Hi Romain,
I created the DataPlugin from scratch in the DIAdem SCRIPT panel. The Wizard is not helpful for special tasks like these.
Brad Turpin
DIAdem Product Support Engineer
National Instruments