05-12-2023 07:13 AM
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!
05-12-2023 07:17 AM
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.
05-12-2023 08:26 AM
Hi.
Just a stupid question: why do you need a loop at all?
This one works...
05-12-2023 08:42 AM
I just need something like that, if u can tell me what SpalAnzahl means to try it in my VI.
05-12-2023 09:22 AM - edited 05-12-2023 09:25 AM
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:
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…
05-16-2023 05:38 AM
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.
Thank you for the help.