From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

loading or saving only part of data

Hi,

 

is there a possibility to cut all channels of a tdm dataset and save the parts seperately? I've got huge datasets and want to cut all channels at specific indices. for example I want to divide a sataset into 2 parts and save all channels from index 1345-26543 and 26543-564321 as new tdm files. I thought maybe it's possible to load only parts of the files but I can't find such an option at reduced loading for example.

I'm using diadem version 14.0.1f6022 service pack 1 and datafinder version 14.0.2f5811 and would be very thankfull for your help!

Thank you in advance

 

0 Kudos
Message 1 of 4
(3,630 Views)

Instead of splitting the file you can use the reduced load method.

 

 

Option Explicit

dim filePath : filePath = ProgramDrv & "libr\Data\example.tdm"

data.Root.Clear

Call DataFileLoadRed(filePath,"TDM","","IntervalWidth",1,1,0,50)
Call DataFileLoadRed(filePath,"TDM","","IntervalWidth",1,1,50,100)

So you can work on the part of the file you like to.

If you really want to split just save the content of data portal after loading.

 

This is also available in DIAdem file dialog:

out1.png

 

inserting the indices in the following dialog.

 

out2.png

 

 

0 Kudos
Message 2 of 4
(3,627 Views)

Hi,

 

I find AndreasK proposition a very good one.

But in case you already have your data loaded for some reason you could alternatively copy the data to other channels using DataBlCopy for example and the just save the new channels:

 

Befehl: DataBlCopy - DIAdem 2012 Hilfe - National Instruments
http://zone.ni.com/reference/de-XX/help/370858K-0113/comoff/datablcopy/

 

Best regards,

Christoph

Staff Applications Engineer
National Instruments
Certified LabVIEW Developer (CLD), Certified LabVIEW Embedded Systems Developer (CLED)


Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved
0 Kudos
Message 3 of 4
(3,609 Views)

Hi,

 

the option in the DIAdem file dialog is for some reason not working with my data, I don't know why. But the skript is working perfectly, thank you very much for your help!

Kind regards

0 Kudos
Message 4 of 4
(3,576 Views)