Logging file available read only


farky

Recommended Posts

I'm using DAQFactoryExpress - What a great product (I used to build my own Data Loggers using Forth) but this is great.

I have one problem though. I have a logging set and I create a new file each time I start logging (done in a sequence and no problem). But once the file has stopped logging (Done in another sequence and no problem) I would have expected it to be available to other applications with full access because DAQFactory is no longer using it. However I can only open it read only in Excel or any other app unless I first start another logging file or close DAQFactory. It's as if DAQFactory doesn't release the file handle to it? Can you help?

Thanks.

Link to comment
Share on other sites

Yes, this is true. The way around this is to change the logging set name, which will cause DAQFactory to close the current file and start a new one. If you are actually stopping the logging set, change the name to a junk name, then briefly start the logging set. Something like this:

private string oldname = logging.mylog.strFileName

logging.mylog.strFileName = "c:\junk.tmp"

beginlogging(mylog)

delay(1)

endlogging(mylog)

logging.mylog.strFileName = oldname

Link to comment
Share on other sites

That's great and works a treat - why didn't I think of that work round!!

Thanks for the excelent support - I think I'll be buying another Labjack and if I can persuade my clients I'll maybe be able to upgrade from the Express edition. :rolleyes:

Link to comment
Share on other sites

Excellent. Make sure and check out DAQConnect as well, which would enable you to get access to your data securely from anywhere over the Internet without having to make any firewall or other changes on custom designed, drag-and-drop screens. See www.daqconnect.com for more info or a free trial.

Link to comment
Share on other sites

  • 2 years later...

I had the same problem as above and have tried the solution, but have not had consistant results.

Sometimes after stopping the logging through 'endlogging(Mylog)' and then performing the script as shown, the 'junk' file is not created and the original file remains read only.

I have tried changing the refresh rate on the 'junk' log to a sub 1 second time, but still cannot get reliable results.

Any suggestions would be gratefully received.

Link to comment
Share on other sites

  • 5 months later...

No. As you may notice in all my other posts, I use "myXXX" as a generic name in script when I don't know the exact name the customer is using: myChannel, myLog, etc. So, you should replace "myLog" with the name of your logging set.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.