Posted 16 May 2009 Hello, Wonder if somebody can assisst with a problem I am having. I require to log 3 sets of data per day to analyse shift data. the times are 0600 - 1400 1400-2200 and 2200-0600 my logging starts at 0600 precisely and logs for 8 hours stopping logging at 1359 and 59 seconds. I have noticed that the start of logging varies from 0600 to 0900, this is no good because I use a template to transfer the csv files which need to be the same size. Do I need to do a script for Opening and Closing Log files as well. Regards Peter Share this post Link to post Share on other sites
Posted 22 May 2009 Hi Peter, I think you've struck on a problem here. CX-Supervisor's Data Logging is quick to setup and nicely handles all the file management for you... but some times not flexible enough when you want to do something more clever. This is one uf my bug-bears and something I hope is improved in version 3.0 !! I think there have been a couple threads before, but few good workarounds as I remember? One problems you're battling is that the new log files are always create at midnight - midnight UTC that is (i.e. 0:00 GMT). They start when the runtime starts and then (for daily logging) starts a new file at midnight GMT. End of. Nada. The 2 options I can see for you: 1) Stop the files being split by choosing e.g. 1 Year log file (preventing midnight rollover!). Start logging at the start of the shift and here's the trick - at the start of the next shift call ClearLogFile() script to erase the whole log and start again. Of course you'll want to backup or export the data first!! So option 1 is use a huge file, but only ever keep 1 shifts data in it by continuous flushing. 2) Log ALL the data into 1 file again, but don't flush. Export all the data and then external means (e.g. Excel spreadsheet, or custom VB Tool) to 'oick' the shift data you need. Oh. And the third of the 2 options I suppose is to log the data yourself, e.g. into a database or CSV file - then you are in full control but will take some coding... this is probably my favourite - and I think the installed Database Demo does something like this on the Logging page. Your thoughts?? Regards, Bertie Share this post Link to post Share on other sites