mike72 Posted October 19, 2012 Author Share Posted October 19, 2012 thanks guru, looks like it needed the file close code to help it along. been running for 12 hours now with no hang ups. ill let you know if its stable. thanks again for everything mike Link to comment Share on other sites More sharing options...
mike72 Posted December 4, 2012 Author Share Posted December 4, 2012 hi guru back on this old topic again. the script still hangs, sometimes running for a day, sometimes 3. no definate times i can see though. thanks to your help on "device working", i get to see when the script hangs. when it hangs, it just stops reading from the file it reads from. i tried to stop and re-start the script again to get it working, but the only way i can get it going again is to re-start the whole daq program. i removed the error part of the sequence and told it to ignore all errors, still no luck. the file it reads from still gets updated every minute, so its nothing to do with that. i even wrote another sequence to save the clt, stop the weather sequence after 6 hours and restart it a few seconds later and didnt help. something in daq hangs, have you any idea what the problem can be? mike Link to comment Share on other sites More sharing options...
AzeoTech Posted December 4, 2012 Share Posted December 4, 2012 The only thing I can think of is that you never close() the file, so you are gradually chewing up file handles. Windows supports a huge number of file handles now (unlike 20 years ago), but its still finite. When you run out the system is going to act kind of weird, possibly hanging the script waiting for a new handle to become available. So, try adding: file.close(handle) right after the endcatch statement. Note you can also do file.closeAll() to close all open files, but that's kind of a last resort in cases where you lose track of your handles. Also, if it hangs again, click on SEQUENCES: in the workspace and see what line # its hanging on. Link to comment Share on other sites More sharing options...
mike72 Posted December 5, 2012 Author Share Posted December 5, 2012 hi guru ok, ill put the file.close(handle) in, and let you know what happens. thanks again for everything mike Link to comment Share on other sites More sharing options...
mike72 Posted December 14, 2012 Author Share Posted December 14, 2012 just an update on the last bit of code, looks like the close handle does the trick. havent had it die on me for a week now. thanks guru mike Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.