DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

Write Module Error Handling

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?

 

Thank you!

0 Kudos
Message 1 of 8
(7,931 Views)

Turn off the Write protection switch... or, more reliably, turn on the Multiflle feature. 

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 2 of 8
(7,930 Views)

Write protection is turned off. Does multifile just increment a value at the end of the file name?

0 Kudos
Message 3 of 8
(7,928 Views)

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. 

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 4 of 8
(7,925 Views)

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.

 

0 Kudos
Message 5 of 8
(7,917 Views)

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?

0 Kudos
Message 6 of 8
(7,913 Views)

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 

0 Kudos
Message 7 of 8
(3,997 Views)

King-reale,

 

That's a VI for LabVIEW. It will not work with DASYLab. Thanks for reviewing the DASYLab forum!

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 8 of 8
(3,988 Views)