farky Posted June 11, 2009 Share Posted June 11, 2009 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 More sharing options...
AzeoTech Posted June 11, 2009 Share Posted June 11, 2009 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 More sharing options...
farky Posted June 11, 2009 Author Share Posted June 11, 2009 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. Link to comment Share on other sites More sharing options...
AzeoTech Posted June 11, 2009 Share Posted June 11, 2009 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 More sharing options...
ntrh1 Posted December 2, 2011 Share Posted December 2, 2011 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 More sharing options...
AzeoTech Posted December 2, 2011 Share Posted December 2, 2011 Don't stop the logging set. Just change the log file to 'junk'. If you stop the logging set then the code to close the existing file does not execute. Link to comment Share on other sites More sharing options...
jaresing Posted May 22, 2012 Share Posted May 22, 2012 Do you have to set up a mylog logging set to make this work? Link to comment Share on other sites More sharing options...
AzeoTech Posted May 23, 2012 Share Posted May 23, 2012 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.