DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Store Tabular data in diadem TDM file.

Solved!
Go to solution

 

Hi,

 

Is there any way to store tables in TDM files?

After processing data my results are a list of values which is in the form of table. And normally we save only the TDM file (and not the TDR file), in this case if I want to save the table I have prepared what method could be used?

 

Hope the question is clear else do let me know.

 

Thanks in advance.

 

Regards,

fazshah.

0 Kudos
Message 1 of 7
(5,007 Views)

Hi faz,

 

Typically a REPORT table displays either channel values or property values, both of which save with the TDM file.  Are you using some other forma of table?

 

The sort answer I'd give would be to have a group of channels in the Data Portal somewhere, with on channel for each REPORT table column.  This may or may not match your use case, though.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 2 of 7
(5,000 Views)

 

Hi Brad,

 

I am doing some calculations based on the channels in the data portal, after which I get some result values. These values are entered in table.

So basically I have a table with 'Text lists'.

 

Having channels for each column is not sufficient. Is there any other way.

Another thought I had is to open an excel file and enter the values and save in the location of my data. But I would prefer have it in single file.

 

Thanks.

 

Regards,

fazshah.

0 Kudos
Message 3 of 7
(4,996 Views)

Hi fazshah,

 

What do you have in each field of your Text List in the REPORT table?  Are they formulas that request properties from Root, Group, or Channels in the Data Portal, do they reference global variables, or do you programmatically create the Text List so that it contains the content you want to display as plain text?

 

I strongly recommend that you save your scalar results as properties and reference those properties with formulas in your Text List.  Properties will save automatically to the TDM or TDMS data file, and when you reload that data file and the REPORT layout, your table will show the results again.

 

Brad Turpin

DIAdem Product Support Engineer

National Instrumets

0 Kudos
Message 4 of 7
(4,968 Views)
Hi Brad,

The results are not always properties of channel, some are scalar results (like that of Xms values). And I don't want to create global variables because I need to keep adding columns representing each condition so it gets complicated (no. of columns are not fixed)
I was thinking to programmatically create them as plain text.
But your method is much better. Only thing is, how to call the property of channel into the table through formula? If you could explain on that it would be really helpful.

Thanks in advance.

Regards,
fazshah
0 Kudos
Message 5 of 7
(4,961 Views)
Solution
Accepted by topic author faz_shah

Hi fazshah,

 

Once you calculate the scalar metric you want to display in your table's Text List field, first save that metric as a property attached to the Root, or a Group or Channel in the Data Portal:

 

Data.Root.Properties.Add "PropName", PropValue
'----------------- or -------------------------
Set Group = Data.Root.ChannelGroups("GroupName")
Group.Properties.Add "PropName", PropValue
'----------------- or -------------------------
Set Channel = Group.Channels("ChannelName")
Channel.Properties.Add "PropName", PropValue

Then you can add the formula to the Text List field that displays that property you just wrote:

 

PropName = @@Data.Root.Properties("PropName").Value@@
PropName = @@Data.Root.ChannelGroups("GroupName").Properties("PropName").Value@@
PropName = @@Data.Root.ChannelGroups("GroupName").Channels("ChannelName").Properties("PropName").Value@@

You can also reference Groups and Channels by numeric index instead of name, if you prefer.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

Message 6 of 7
(4,953 Views)

 

Oh, shoot!

 

Didn't think it was that easy. Thanks alot anyway.

 

Regards,

fazshah

0 Kudos
Message 7 of 7
(4,938 Views)