LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

some questions about TDM /TDX file(with my demo program)

I would suggest writing blocks of data in the form of 1 dimension or 2 dimension arrays. This would reduce the traffic between the writes tremendously. instead of writing m times or m*n times you would just have to write once. For this purpose you would need to use OLE Interfaces for Arrays. You can then pass a 1D or 2D array by specifying its indices (lower and upper). You would need to use the ValueRangeGet/Set methods. More information onthese can be found in the DIAdem Help section. You can also find information on the ChanValSet/Get functions in the Help>>Context>>Functions>>Commands tab.

Hope this helps
Nandini
NI
0 Kudos
Message 11 of 15
(1,211 Views)

gztek,

I don't have any great solutions for you, but here are a couple ideas:

1) Are you sure you really need to save the data every time?  Do you expect the machine to hang/crash/shutdown or is the data extremely critical?  With the current design of the program, you can already lose as many as 40000 data points if the program exits unexpectedly.  You could lose even more data if you overlow the thread safe queue.  If you can call save every 10-60 iterations instead of every iteration, you should see some performance improvement.

2) You could save the data into multiple files.  For example, save each iteration of data into a separate file.  File1.tdm, File2,tdm,...FileXX.tdm.  Then after all of the data has been saved, you could loop over each of the individual files and combine them into one large file.  The operation of combining the small files into one large file might be somewhat time consuming, but you could do this after all of the data has been saved at which time any performance lag should not be such a problem.

We are aware of this performance issue and are looking into it.  We hope to improve performance in a future release.

-Jeff

 

0 Kudos
Message 12 of 15
(1,194 Views)
 Jeff ,Nandini

 

 
0 Kudos
Message 13 of 15
(1,187 Views)

Hi  Nandini ,Jeff

Thank you for your suggestions, I will try them.

gztek

0 Kudos
Message 14 of 15
(1,185 Views)

Hi gztek,

Just today we pushged live a new KB that outlines how to create a TDM header file for an existing binary file or files.  This way you can stream the binary file with standard C functions and just write a quick XML ASCII file with the TDM header writer dll afterwards.

http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=FF8F09184A0F1103E0340003BA7CCD71&p_...

This link may take a few hours to turn live,
Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 15 of 15
(1,149 Views)