Manuel Aiello Posted November 9, 2021 Report Share Posted November 9, 2021 (edited) Hi, i'm fairly new to Labview and i'm currently stucked in a problem that i think is very simple but to which i can't find a simple solution. I'm using a data acquisition device to get measured temperature, force, pressure and i would like to save those data (with header) on a spreadsheet file when i press a button (the "write to file" button in the Vi attached) and stop recording data when unpressed. I can now do this but if i stop and restart the recording the new data are just appended to the previous file without header, so i cannot distinguish when a new recording started. Actually what i wanted to achive with this Vi was to automatically create a file with a specified name (with header wich is only present one time in it) that is changing to each press of the button and without asking for a new path for every new file. Is there a way to simply do this? thank you. MVB.vi così.txt Edited November 9, 2021 by Manuel Aiello Quote Link to comment
Rolf Kalbermatter Posted November 18, 2021 Report Share Posted November 18, 2021 (edited) Couldn't view your VI as I don't have LabVIEW 2020 installed on this machine but you want to basically detect that the boolean you use to find out if you want to write to the file has switched from false to true. An edge detector is very simple to do with a feedback register like this. Change the boolean inputs inversion to detect the falling edge. When the rising edge boolean is true, write your header and then the data, otherwise only write the data. Edited November 18, 2021 by Rolf Kalbermatter Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.