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: 

DIAdem programming - How to access each cell in table data?

Solved!
Go to solution

How do we access each cell in current access TDMS file using the DIAdem script enviroment? Would anyone send me an code example?

 

Thank you,

0 Kudos
Message 1 of 4
(4,702 Views)

Hi NiCoder,

 

There are several ways of doing this.  I'll answer your question after you describe what you want to accomplish with the cell values.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 2 of 4
(4,690 Views)

I have data file with 12002 rows and 35 columns and data are in hex format.  I want to loop thought each cell per each column to get bit information and decode the value into string.  For example: one cell bit 5 could be ON, OFF, or FAILED. 

0 Kudos
Message 3 of 4
(4,687 Views)
Solution
Accepted by topic author NiCoder

Hi NiCoder,

 

If you could load those channels as numeric channels instead of string channels, then you could use the "GetB" function in the Channel Calculator to pull out a specific bit value from a numeric channel (that contains integers).  You could alternatively convert all the channels from string channels to numeric channels, then use the "GetB" function to pull out all 0 or 1 values from the 5th bit of each channel's values.  Running this command with ChnCalculate() will execute much faster than accessing each channel value one at a time, although you can use the GetB() function with each channel value in a loop.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

Message 4 of 4
(4,683 Views)