DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Function DDC_RemoveChannel(...) failed

Hi there,

i work with the DIAdem Connectivity Library to handle TDM and TDMS files.
With the TDM datas all works fine but using TDMS files causes in errors.

I try to remove a channel from an channel group with the API-function
DDC_RemoveChannel(). The next function i use is DDC_GetNumChannels(). This function shows me a channel number which is one smaller than before removing the channel. Then i save the file and close the file. Everything without errors. The next time i open the file all channels are present! Even the removed channel!

What can i do to correct this?

Thanks for help!

Patrick
0 Kudos
Message 1 of 5
(3,969 Views)
Hi Patrick,

As I know is there no easy way to delete a channel in a TDMS file. But we would like to analyze the behavior more in detail. Unfortunately lots of colleagues are on vacation so that we need a little bit time for the answer.

Greetings
Walter
0 Kudos
Message 2 of 5
(3,922 Views)
Hi Walter,

Thank you for the reply. Please let me know if you have a hint to solve the problem!

Greetings
Patrick
0 Kudos
Message 3 of 5
(3,916 Views)

Hi Patrick,

My understanding is that channel deletion is currently not supported in the TDMS api.  So regardless of whether you're using the TDMS VIs in LabVIEW or the C++ functions you have tried, the underlying file format api just doesn't support this action yet.  There has been talk about adding this, so hopefully this will change in the future.  The TDM file format does support channel deletion, so this is why the same function exists and works for TDM files.  For the time being I think your only option is to re-write the TDMS file under a different name with all the channels EXCEPT the ones you want to delete.  Then if you wish you can delete the original file and rename the new file to the deleted file's name.

Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 4 of 5
(3,892 Views)
Hi Brad,

Thank you for this information! I will try it in your way.
Please let me know if "remove channel" or "set data values" for TDMS-Data will be added in the library.

Thanks for help!

Patrick

0 Kudos
Message 5 of 5
(3,883 Views)