LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write data into an excel file "only one time"

Solved!
Go to solution

Hi, I’d like to write selected data to an Excel file.

 

I want to write the data only when I press a button, so I created a case structure with a button that triggers the write action.

 

However, since this is in a for loop, the data gets written multiple times by the time I finish pressing the button.

How can I ensure the data is written only once?

 

One solution might be to increase the loop time so I have time to release the button, but is there another way to achieve this?

Download All
0 Kudos
Message 1 of 3
(309 Views)
Solution
Accepted by topic author Alexb91

Hi Alex,

 


@Alexb91 wrote:

However, since this is in a for loop, the data gets written multiple times by the time I finish pressing the button.

How can I ensure the data is written only once?


Set the button to a latching "Mechanical action" mode.

 

Learn about the different possible "Mechanical action" modes for buttons and their use cases!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 3
(305 Views)

Thank you very much for your help!

 

I just saw a solution you wrote for someone in 2006, almost 20 years ago.

I don't know how many of us would have managed without your precious help.

 

I wish you all the best.

 

 

0 Kudos
Message 3 of 3
(286 Views)