I'm currently writing data to .csv using the "Append" feature in the write module. Depending on a selection within the worksheet, one of two write modules is selected. This is done in order to have the same worksheet handle both longterm fatigue data (with peak/valley averaging) and shortterm tests.
If the filename already exists, in one of the other formats, however, the file is inaccessible and will stop the worksheet.
Is there a way to throw an error or warning instead of stopping the whole thing? Is there a way to validate the file before trying to write data?
Turn off the Write protection switch... or, more reliably, turn on the Multiflle feature.
I'm not sure that I understand... each write data module needs its own unique file name. DASYLab will open that file for exclusive write, and another write module cannot write to it.
I re-read what you said... and with Append, the file must not be opened by any other program, and only one write module can use that file name.
Two files can write to the same name, if one is .ASC and one is .DDF, because they're not the same file.
If you want to post a simplified version of the worksheet, showing the problem, then I can look at it.
I'll try to get a simplified worksheet written up. In the meantime, I have a single input for a file type. The list seen on the top left controls which of the write modules it goes to. Only one of the modules runs at a time, controlled by that list.
If the filename already exists, however, and was in the "wrong" data format, the whole measurement stops. This would be the case in the follwing example:
1) Save file in "Static" mode. Stop Test
2) Start test in "Fatigue" mode, but same file name (this could be months later)
In this case, the measurement stops (which has ramifications for the whole control system).
I'd like to have some sort of check if the file already exists. I could imagine even a simple status light that says the filename is available.
I've added a " - Fatigue" to the filename for those tests, so the two write modules use different filenames. A way to check if the filename already exists would be very helpful, though. Is there any way to do that?
Hello, COI Enginer
Hello. We have come up with a very easy answer to your problem.
If you use this function, you can solve it easily.
Have a Good time
That's a VI for LabVIEW. It will not work with DASYLab. Thanks for reviewing the DASYLab forum!