LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write 1D array to TDMS with multiple channels

Solved!
Go to solution

Hi A.,

 


@A.Daniel01 wrote:

I just need to know how can I write each index of my u8 array in 1 different channel and keep writting.


Use a 2D array!

When you want to write 1 sample for 2 channels then that array should contain 2 rows and one column…

 

Btw. the TDMSOpen belongs before the loop, and there is a TDMSClose missing after the loop!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 11 of 16
(649 Views)

The vi is just a subvi, thats why I don't close it, and I can make a 2D array with my 1D array but when I write it in the tdms the lenght is allways 1 with the last value, thats why I think I need to use a for loop, but I don't know how to use it, I tried a lot of things but only this worked, and again I have the problem of the number of iterations.

ADaniel01_0-1683893838119.png

 

0 Kudos
Message 12 of 16
(645 Views)

Hi.

Just a stupid question: why do you need a loop at all?

This one works...

image.png

Message 13 of 16
(622 Views)

I just need something like that, if u can tell me what SpalAnzahl means to try it in my VI.

0 Kudos
Message 14 of 16
(614 Views)

Hi A.,

 


@A.Daniel01 wrote:

 when I write it in the tdms the lenght is allways 1 with the last value, thats why I think I need to use a for loop, but I don't know how to use it,


I told you to place the TDMSOpen before the loop and put a TDMSClose after the loop, but you failed to follow my advice.

And now you wonder why your TDMS file is not written properly!?

 

Recommendations:

  • Visit the Training Resources offered at the top of the LabVIEW board and learn atleast some basics.
  • When you get advice then you should follow that advice…

 

Conclusion: It's all your fault!

 

"SpalAnzahl" is the property to set the visible "number of columns" for that array indicator.

"AnzZeilen" is the number of visible rows. (Someone at NI thought it would be a good idea to translate both labels to German using different abbrevation rules…)

Setting those properties is irrelevant to your problem as it only set the visual look of the indicator…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 15 of 16
(603 Views)
Solution
Accepted by topic author A.Daniel01

After a few attempts, I discovered the Data Layout option in the write function. Now, I can write 1D arrays in different channels, which is exactly what I had asked for initially.

ADaniel01_1-1684233417805.png

 

Thank you for the help.

0 Kudos
Message 16 of 16
(550 Views)