LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing Boolean array values to TDMS

Solved!
Go to solution
Highlighted

I have an array of boolean switches. I want to be able to log the state (1 or 0) of the boolean switch every second in a TDMS file. Since I have three switches, I want three separate columns that has the state of that switch. Ex:

 

Switch 1        Switch 2         Switch 3

      1                     0                    0   

   1                     0                    0

   0                     0                    0

   0                     0                    0

 

How could I achieve this? Whenever I try, the TDMS file just has all the values in one column. Any help is appreciated!

0 Kudos
Message 1 of 4
(180 Views)
Highlighted
Solution
Accepted by topic author osharifi

Hello,

Here is a way to do what you want

Yddet_0-1590160975576.png

Yddet

 

0 Kudos
Message 2 of 4
(145 Views)
Highlighted

On top of adding the Create or Replace enum input (otherwise it opens an existing file) I set the data layout input to Interleaved on the write function, and added the 1D string array like Yddet did naming the TDMS channels.  There are many installed TDMS examples in the Help >> Find Examples tool.

Message 3 of 4
(64 Views)
Highlighted

Thanks Hooovahh, I didn't know

Yddet

0 Kudos
Message 4 of 4
(41 Views)