04-19-2024 07:30 AM
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,
04-19-2024 07:32 AM
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!
04-19-2024 07:36 AM
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.
04-19-2024 07:54 AM
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…
04-19-2024 08:05 AM
You can use Boolean Crossing PtByPt VI to detect the rising edge of your shared variable signal.
04-22-2024 02:39 AM
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.
04-22-2024 03:06 AM
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…
04-22-2024 03:35 AM
Hello, I am using this VI, thank you
04-22-2024 03:41 AM
04-22-2024 03:47 AM
Hello, I am going to look into how I can do that. In the meantime, here is an image of the VI. Thank you.