DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Building - Generating Channel in DIAdem

I have a bit of an issue with a large data file that is "TDMS" format.  The way the data was generated was not Channel Group>Channel with values.

 

The data is 14363 Channel Groups with the results of interest saved as Properties of the Channel Group and not as a Channel within the group.

 

I was trying to think of ways to construct a new Channel - referencing the Channel Group Properties that have the channel of interest values, but DIAdem is not happy about me trying to reference a Property in a channel value - any hints?

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 1 of 5
(3,691 Views)

A little more information:

Two fields in the Properties are used to build a set of channels.

 

Chain runs from 0-n and would be the Channel Number

Index is the channel data order from 0-n under the channel number

 

The properties associated with these Chain Numbers and Indices are Power for example and are also listed as a property.

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 2 of 5
(3,684 Views)

There is an API (CreateDataFileHeaderAccess) that can be  used t o access meta content of an 'tdms' file without having to load it into data portal.

I adedd an example that just creates a string channel of the group names.

You can hopefully adapt this to your use case.

 

Option Explicit

dim tdmsFile : tdmsFile = "C:\temp\Test.tdms"

' create header access to just access meta information of the file
dim store : Set store = CreateDataFileHeaderAccess.Open(tdmsFile ,"TDMS", True)

' collection of all groups  of the file.
dim srcGroups : set srcGroups = store.RootElements(1).Children

' create a target channel
data.Root.Clear
dim destChn : set destChn = data.Root.ChannelGroups.Add("g").Channels.Add("c",DataTypeChnString)
destChn.ReservedSize = srcGroups.Count

dim i : for i = 1 to srcGroups.Count
  dim srcGrpProp : set srcGrpProp = srcGroups(i).Properties
  srcGrpProp.ListInstanceProperties = True ' make sure to call this on property object. Else custom properties will be invisible
  
  ' access properties and work with them. Here I am using just the name
  destChn(i) = srcGrpProp("name").value
Next

 

Message 3 of 5
(3,651 Views)

Hi Ryan,

 

It sounds to me like your best bet is to index those TDMS files and query the items of interest with the DataFinder interface in the DIAdem NAVIGATOR.  The Search Results you get back can turn a column of Group or Chanel properties from N different Groups or Channels into a data channel in the Data Portal that has N values.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

Message 4 of 5
(3,641 Views)

Brad,

I thought that would/should be possible, but the file was taking a long time to index, having 5000+ channel groups with each having multiple properties and with all the values of interest being properties of the channel groups and not channel values.  I created a LabVIEW parser to create a channel based on the result values of interest and add it into the file.  Since this is a post process analysis that can be run from Test Stand I think this approach might be best.  That way the channels can be created as part of the test sequence and even in separate files if desired with the proper channel configuration already laid out.  

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 5 of 5
(3,638 Views)