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: 

How to generate a TDM file from embedded C application

Hi all,

 

I'm working on an embedded C application that will have logging capabilities.

Having worked with TDM files in the past I might like to use that rather than text/csv or a proprietary binary format.

 

Does a library of TDM functions exist in source form?
I've seen there's a DLL C API for Visual Studio but this isn't compatible for my embedded C application.

 

Thanks,

Craig

 

PS Feel free to move this topic to a more appropriate board but this seem most fitting

0 Kudos
Message 1 of 6
(3,088 Views)

What does embedded mean in your case?

0 Kudos
Message 2 of 6
(3,060 Views)

Hi AndreasK,

 

Thanks for the reply.

In my case I mean a microcontroller which is performing some closed loop control function.

I wish to collect data from it's inputs onto an sdcard for later analysis.

 

Regards,

Craig

0 Kudos
Message 3 of 6
(3,057 Views)

Hi UKCraig,

 

You could just write an interleaved (set of) binary file(s) with your embedded program, then create a matching TDM header file beforehand and/or afterwards with a Windows program.  We have TDM header file writing functions in DLL form.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 4 of 6
(3,045 Views)

Thanks Brad, that seems like a reasonable way forward, if no C library source exists.

 

I can find plenty of documentation for TDMS, but very little for TDM. Is there something like the TDMS File Format Internal Structure whitepaper for TDM?

Can you point me towards an example of pre/post TDM header writing?

 

Thanks,

Craig

0 Kudos
Message 5 of 6
(3,037 Views)

Hi Craig,

 

Shoot me an email.  I can send you an unsupported C++ library that will create TDM Header files.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

brad.turpin@ni.com

 

0 Kudos
Message 6 of 6
(3,031 Views)