Wonderware version 10 data logging

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:

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:
Looks good...
Glad you got it resolved.

What remote connection are you using?
I usually use LogMeIn or TeamViewer....(I like LogMeIn a lot better, seems to be a cleaner and simpler connection.)
I usually use dropbox.com or box.com to transfer files between PCs.
 
Script to Export the Histdata

Hi All,

I do have a similar situation wherein I need to send the historical data to be sent to an excel file
Can I have the script that many of you in this thread had used for automatic transfer from historical logging to excel.

Thanks in advance.

My mail-id is [email protected].

Regards

S. Gopalakrishnan
 
How many tags?
Are you already building a *.csv file?

It does not automatically send the file to Excel. First you build the file with histdata.exe or "FileWriteMessage" function which builds a csv file that Excel recognizes. You select the file to open it with Excel.
 
Hi Nathan,

Customer has just asked me to find any possibility there to send logged data to his SAP system.

I had told him that i can give a CSV file from where he can take the needful data. However i dont have the list for the number of data.

I have worked with HISTDATA.exe in one of my earlier project; however i had told that customer to send the data whenever he needs by selecting from the TREND and press a button manually.

I just want to know if there are any scripts which i can use as a "While Running" script and send the data.

Regards

S. Gopalakrishnan
 
There are instructions on using histdata to automatically fill in an Excel spreadsheet...
You will need Intouch manual to see how to set up.
 
Thanks Nathan for the reply.

Actually i went through the full Thread in the forum today morning, however i couldnt see the Script by Another Member OkiePC, thats the reason I had posted my reply.

Only now i am able to see the Script given by OkiePC.

Thanks for the support, i shall check the same when my customer asks me to have the data for his SAP integration
 

Similar Topics

Hello, Looking for some help on returning a tag's alarm group. I can only find documentation on returning a "selected" item's alarm group from...
Replies
2
Views
1,512
Hello all, I have programmed a script in InTouch which will increment a value (lets say "tag1") from 0 to 10000 within a given interval. This...
Replies
18
Views
5,914
Hi all, I am trying to create a dynamic security window in Wonderware 9. I understand how to add usernames and passwords in the security menu...
Replies
2
Views
2,017
Hi guys, We have two ovens running Wonderware Intouch apps in version 8.0. We got version 10.0 software on our shop laptop so were playing...
Replies
4
Views
3,297
Hi, I need to upgrade an Wonderware InTouch V8.x to the current version on Win 7 64bit, and I have some questions for this (I've never done it)...
Replies
5
Views
2,597
Back
Top Bottom