OkiePC
Lifetime Supporting Member
Well I finally got my bugs and kinks worked out and with some helpful advice from Nathan and others, it is working.
It was a royal pain to complete using remote access. I don't know if their on site keyboard has a key stuck on or what, but I could not get windows to restore by clicking on them in the tack bar. I could not type a backspace key...it always displayed some special character when I tried...there were a half dozen other weird things that had me baffled. I ended up using notepad on my local machine to make editing easier, then copied and pasted into their remote PC. I spent about 8 hours on this, but I told them I could do it in two, so they will be billed for 2...
I created a data change script for the $Minute tag. This way, I can create the log file at 5 minutes til midnight each night. If I waited until after midnight, then I have to mess with looking at the previous days data which means I have to subtract one from the day, then decide what to do if the result is zero...how many days are in the previous month, etc... so I avoid all that mess by simply running before midnight and not worrying about the last couple of minutes each day.
Here's the script that worked:
It was a royal pain to complete using remote access. I don't know if their on site keyboard has a key stuck on or what, but I could not get windows to restore by clicking on them in the tack bar. I could not type a backspace key...it always displayed some special character when I tried...there were a half dozen other weird things that had me baffled. I ended up using notepad on my local machine to make editing easier, then copied and pasted into their remote PC. I spent about 8 hours on this, but I told them I could do it in two, so they will be billed for 2...
I created a data change script for the $Minute tag. This way, I can create the log file at 5 minutes til midnight each night. If I waited until after midnight, then I have to mess with looking at the previous days data which means I have to subtract one from the day, then decide what to do if the result is zero...how many days are in the previous month, etc... so I avoid all that mess by simply running before midnight and not worrying about the last couple of minutes each day.
Here's the script that worked:
Code:
DIM TEMP1 AS MESSAGE;
DIM TEMP2 AS MESSAGE;
TEMP1 = StringLeft ( $TimeString,5);
TEMP2 = StringRight ( $TimeString,2);
IF TEMP1 == "11:55" THEN
IF TEMP2 == "PM" THEN
SMonth = StringMid ( $DateString, 1,2 );
SDay = StringMid ( $DateString, 4,2 );
SYear = StringMid ( $DateString, 7,4 );
SDateString = SYear + SMonth + SDay;
HDWDBDir="C:\WW\xxxxxxx"; {xxxxx is the database name}
HDWDuration="86400s";
HDWDataDir="C:\WW\DATA_LOG";
HDWFilename = "C:\LOGS\" + SDateString + ".csv";
HDWDuration = "85500s";
HDWInterval = "900s";
HDWStartDate = SMonth + "/" + SDay + "/" + SYear;
HDWStartTime = "00:00:00";
HDWTags = "$DATE,$TIME,DISTRIBUTIONCHLORINE+";
HDWTags1 = "DISTRIBUTIONTURBIDITY,FILTER1TURB+";
HDWTags2 = "FILTER2TURB,FILTER3TURB";
HDWWriteFile = 1;
HDWWriteFile = HDWWriteFile;
ENDIF;
ENDIF;
Last edited: