07-03-2025 01:39 PM
Hello! I'm trying to have it so that my data will save to a excel file with the custom naming parameters I put on the front panel. I have this code but when I stop the program, I get the error message that I attached below. I've also attached a picture of the part of my code that I believe is the problem. Any guidance would be appreciated!
Solved! Go to Solution.
07-03-2025 01:50 PM
We cannot tell from a truncated picture, for example what are the values of the various string controls? Do they contain any character not allowed in filenames?
(Saving after the toplevel loop is problematic in general, because if it fails, all data is lost. I recommend a proper state machine instead)
07-03-2025 02:01 PM
The values are just numbers. The only aspect of the code that is missing from the photo is the waveform chart and DAQ Assistant.
07-03-2025 02:40 PM
There are many things "questionable" in the incomplete picture of code you presented.
Bob Schor
07-03-2025 02:44 PM
Your path has problem.
It should look like:
C:\Users\your username\desktop\your filename
07-03-2025 02:57 PM
@zou wrote:
Your path has problem.
It should look like:
C:\Users\your username\desktop\your filename
I did not want to make any assumptions about the user hierarchy, because someone could potentially create a root folder name "Desktop" if they try hard enough. 😄
In particular, if you want to save on the desktop (not a good idea in general because it will most often behind a window!) you should use this function.
07-03-2025 03:04 PM
THANK YOU SO MUCH! It's always the small things I mess up. I feel really dumb now. 😛