LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS files

Hello, I want to log data into a TDMS file every time I click a button, but the file is being created multiple times.

Thank you, 

KS200_1-1713529774111.png

 

 

0 Kudos
Message 1 of 14
(273 Views)

Hi KS200,

 


@KS200 wrote:

Hello, I want to log data into a TDMS file every time I click a button, but the file is being created multiple times.


Because that's what you do in your VI: create a new TDMS file using the timestamp in the filename…

 

When you want to log into one (1) file then you should create the file once before the loop!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 14
(268 Views)

Thank you. If I want to create a new file each time I click a button, how do I do that? Because when I try to create it before the loop, only one file is created. If I click the button again, no other file is created.

0 Kudos
Message 3 of 14
(265 Views)

Hi KS200,

 


@KS200 wrote:

Thank you. If I want to create a new file each time I click a button, how do I do that?


Then you create a new file when you click the button (inside a case structure).

Hint: Use a latching button on your front panel…

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 14
(250 Views)

You can use Boolean Crossing PtByPt VI to detect the rising edge of your shared variable signal.

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 5 of 14
(230 Views)

Hello, I tried both solutions and I can create a file each time I click the button, but the file only contains one value each time. How can I fix that? Thank you.

0 Kudos
Message 6 of 14
(155 Views)

Hi KS,

 


@KS200 wrote:

the file only contains one value each time. How can I fix that?


Write more data/samples to the file!

 

Maybe the more reasonable help would be to analyze your code. Unfortunately you don't show it to us…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 14
(142 Views)

Hello, I am using this VI, thank you 

0 Kudos
Message 8 of 14
(137 Views)

Hi KS,

 

please downconvert your VI and attach again.

 

(Many of use don't use the latest LabVIEW versions due to license issues, so you should downconvert to LV2021 or older. I prefer LV2019.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 14
(133 Views)

Hello, I am going to look into how I can do that. In the meantime, here is an image of the VI. Thank you.

KS200_0-1713775549233.png

KS200_1-1713775563826.png

 

0 Kudos
Message 10 of 14
(130 Views)