DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Extract data from NRF files

Solved!
Go to solution

Hello!

 

So I am working on a project where I have data files that are written on 12 channels to a .nrf file.  Since NRF seems to be a fairly unique file format I have not come up with better software than DIAdem to open the data.  I am looking for a way to programmatically take the data from each of the channels and grab the values every x number of data points.  I am using Visual Studio, writing in C#, using the DIAdem COM library.

 

I have written a very basic program at this point which uses CmdExecuteSync ( "DataFileImport('"+ file.FillName + "')" ); to import the .nrf file in to DIAdem but from there I am lost.  I have tried exporting the data using the DataFileSaveSel function, but unfortunately the output CSV ends up being nearly a gigabyte in size, which is too large for my needs.  I am hoping there is a way to perform the operation I need within DIAdem and if so someone might help get me pointed in the right direction.

 

Thank you very much in advance for any and all help.

0 Kudos
Message 1 of 7
(5,037 Views)

Have a look on DIAdems "Reduce Classification" functionallity.

Maybe that is what you are looking for.

 

It can be found in

ANALYSIS->Statistics->Reduce Classification

Message 2 of 7
(5,022 Views)
Solution
Accepted by topic author Kub85

Hi Kub,

 

I recommend you use the reduced loading capability of DIAdem, like this:

 

n = 10
SectionBegin = 1 SectionEnd = 1000 Call DataDelAll Call DataFileLoadRed(FileDlgName, "", "", "IntervalWidth", N, 1, SectionBegin, SectionEnd)

This will load every nth value from value 1 to value 1000,

Brad Turpin

DIAdem Product Support Engineer

National Instruments

Message 3 of 7
(5,014 Views)

Exactly what I was looking for.  Thanks to both of you!

0 Kudos
Message 4 of 7
(5,007 Views)

I hate to bother you again but I have one quick follow-up question to ask about this.  Is there a way to tell it to run to the end of the file instead of a value where SectionEnd is specified?  I have run into an issue where I cannot be sure how long the data is, nor where to stop for sure.

 

That you very much! 

0 Kudos
Message 5 of 7
(4,876 Views)

I pulled up the Function Help for DataFileLoadRed and see that if SectionBegin and SectionEnd both have the value 0, DIAdem loads the complete channel.  Hope that's helpful!

Michael Keane
National Instruments
Message 6 of 7
(4,850 Views)

Hi Kub,

 

Some file formats store a property that details how long a given channel is, but most file formats do not. DIAdem DataPlugins will expose that property if it exists, but in its absence the DataPlugin will simply read to the end of the file when running DataFileLoad(). Sometimes you can derive an upper limit for the channel size based on the number of channels and bytes in the file, but with complicated file formats this also is not possible with any accuracy.  What you can always do, though, is set the upper limit equal to the number of bytes of the file.  The DataFileLoadRed() command will automatically load as many values as it finds within the amount you specify, so this should work for you:

 

SectionEnd = FileSize(DataFilePath)

Brad Turpin

DIAdem Product Support Engineer

National Instruments

Message 7 of 7
(4,844 Views)