08-23-2017 01:05 AM
We are developing a plugin to read data from a TDMS file and populate an Excel report template with values extracted from it. These values could be Group properties or individual channel values. While reading channel values using the function like
oGroup.Channels("Hysteresis " & Sign).Values(Rowno),
it is observed that if the channel type is numeric, the values are obtained correctly, whereas, if they are of type Text, the function ALWAYS RETURNS A BLANK string. Due to this issue, the excel report has blanks where there should have been numeric values.
DIAdem 2015 is being used, and a sample tdms and excel report created, as also the plugin vbs file, are attached herewith.
08-25-2017 01:25 AM - edited 08-25-2017 01:25 AM
Why did you use a Dataplugin.
Looks like a normal DIAdem Script would be the solution.
data.root.clear DataFileLoad "???", "TDMS" data.root
' followed by your code
P.S.: The script seems to be very complex and is not working on my machine. (path, missing files)
08-28-2017 03:07 AM
Hi Andreas,
Thanks for the reply. Our idea is to do the report creation (excel) dynamically as files get added to the data folder (reflected in the datafinder). At present, we are indeed doing it from a DIAdem script.
Yes, the code is quite complex, as we have various types of tests. The example tdms sent is for Free Pinion test (one of the Select cases in the PopulateTestData subroutine).
I have changed the file path for the Excel template. Now, if you have the Excel template file I sent, in the SAME folder as the tdms, the plugin would work and create the excel report, where you can see several column values BLANK, where there should have been numeric values, due to the issue mentioned. Please take this updated plugin script and export it.