Wonderware version 10 data logging

OkiePC

Lifetime Supporting Member
Join Date
Mar 2005
Location
ENE of Nowhere Oklahoma
Posts
11,790
I am working with a customer using Intouch version 10.0.002 in a water plant and they want to add logging for about 4 tags to record the CL2 residual and turbidity during off hours. Right now, they write down the values they read from the standalone SCADA system for reporting to the state.

This is on a Windows XP SP3 32 bit Dell Optiplex PC. They do have a development license but I find no evidence that Historical Logging is running. There are two historical trend line charts set up within the application.

What they are looking for is probably more of a tabular chart with reading taken at 15 minute intervals in order to transfer that info to their mandatory reports.

I know enough about Wonderware to get myself in trouble if I try to guess how much time it will take me to make this work and later find out it isn't even possible with the available software.

I am leaning toward slapping a Data Station Plus in there and FTP Sync because I know for sure I can do that with about 4 hours development time...

Unless one of you Wonderware Gurus can convince me that this is doable with HistData or something and can guide me through the steps to enable it.

I sure hate to be the one to touch this old PC and have a hard drive crash, so if we earn the trust of this new customer I will probably propose a new Ignition SCADA machine at some point. For now, they just want the state officials off their back.

All advice appreciated.
 
If you just want to create a historical trend chart, that's very simple. In WindowMaker, look at "Special", "Configure", "Historical Logging". Make sure that Historical Logging is enabled, and that the path to the folder where you want to store your trend history files is specified. Set the number of days you want to keep the history files before they are automatically deleted.

NOTE: If you specify a folder that is not the application folder (recommended), be sure to create that folder. It will not be automatically created.

Then, look at the tags under "Special", "Tagname Dictionary" and make sure that the "Log Data" checkbox is checked for each tag that you want to trend.

Create a window for the Historical Trend display and drop in a "Historical Trend Wizard". It's pretty easy and self explanatory to configure the trend chart. The help files are good.

If you want to convert segments of trend history files to .csv files, then you'll need to run the HistData.exe program whenever WindowViewer runs. There is a HistData wizard that will step you through setup of the file conversion controls. Again, the help files are good.

You don't need to be concerned about HistData at all if you only want to display trend history on a trend chart.
 
Excellent feedback, thanks! They already have a Trend chart with the pertinent tags populated in it. I used remote access to look at that trend and I was able to look at data from several days ago. I think these guys already have what they need, they just don't know how to use it, but making a table rather than a trend would probably be beneficial to them.

So it appears all that they lack is the HistData set up to create a table in order to get the numbers they need in a readable text format into a csv file. I will open Windowmaker and double check that the tags are set for logging just as CYA.

For this table, I should be able to set this up so that the operators can open a csv file and get values for their control points in a table format. I could go so far as to write an Excel macro to make it pretty and printer friendly. Sound reasonable?
 
You can also load the Microsoft Spreadsheet active-x and then the operators can read the csv in the active-x window in Intouch.
You will need to download and install Microsoft OWC to get access to the MS Office Active-X files.
 
Excellent feedback, thanks! They already have a Trend chart with the pertinent tags populated in it. I used remote access to look at that trend and I was able to look at data from several days ago. I think these guys already have what they need, they just don't know how to use it, but making a table rather than a trend would probably be beneficial to them.

So it appears all that they lack is the HistData set up to create a table in order to get the numbers they need in a readable text format into a csv file. I will open Windowmaker and double check that the tags are set for logging just as CYA.

For this table, I should be able to set this up so that the operators can open a csv file and get values for their control points in a table format. I could go so far as to write an Excel macro to make it pretty and printer friendly. Sound reasonable?

Yes, that sounds reasonable.
This is an informative link to a .pdf file: https://www.logic-control.com/datasheets/1/InTouch/ITDataManagement.pdf
 
Alrighty, I am trying to pull this off now and found some issues...
1) The HistData Wizard creates a button that the operator will have to press to create the csv file. This button is associated with a trend chart. The time between samples is not fixed, but depends on where the trend's presently displayed range is set. I'd prefer this happen all the time without requiring the operator to press a button and at 15 minute intervals around the clock, new file at midnight or once a week...

2) there is no room for this button on their trend page and I cannot figure out how to adjust the size of the trend object in order to make a little space for it.

EDIT: Okay, I can't resize any of these objects but did manage to move them a few pixels and squeeze this new button into position.
 
Last edited:
Alrighty, I am trying to pull this off now and found some issues...
1) The HistData Wizard creates a button that the operator will have to press to create the csv file. This button is associated with a trend chart. The time between samples is not fixed, but depends on where the trend's presently displayed range is set. I'd prefer this happen all the time without requiring the operator to press a button and at 15 minute intervals around the clock, new file at midnight or once a week...

2) there is no room for this button on their trend page and I cannot figure out how to adjust the size of the trend object in order to make a little space for it.

EDIT: Okay, I can't resize any of these objects but did manage to move them a few pixels and squeeze this new button into position.

Any function that can be triggered by a pushbutton can instead be triggered by a script. I'm sure that you could also control the interval rate with scripts.
 
Do you have access to 10.5? I have a nice Hist window that saves 2 trends and sets up pens for the histdata function..
 
Do you have access to 10.5? I have a nice Hist window that saves 2 trends and sets up pens for the histdata function..

No, I sure don't.

So I have a crude setup working that requires operator intervention, which in my opinion is not really good enough...

But I did read in the help file about the tags that get automatically created using the HistData wizard. So, I should be able to write script that can manipulate those tags and get the system to create the file automatically. I just need to learn about Wonderware scripting now.

On a positive note, the csv file it generates is pretty much just what we need, with a header row that consists of meaningful tag names, a time/date column and data in proper units for operator consumption.


So what I envision is a script that runs daily around midnight. The script would create the filename based on the yyyymmdd or similar. It should also set the required parameters for the range and then run to create the csv file.

I need to learn about WW scripting and how to do this based on the system clock now.
 
Here is script for changing the date string to a number..


SMonth =StringMid( $DateString, 1,2 );
SDay = StringMid ($DateString,4,2);
SYear = StringMid ($DateString,7,2);
SDateString = SMonth + SDay + SYear;


NOTE: This works only if Windows date is set for 00/00/00 or 00-00-00.
MUST be 2 digit month, day, and year. ie...Feb. 2, 2107 is shown as 02/02/17....NOT 2/2/17

If you want "yyyymmdd", you will have to do some editing to the String commands.

I usually change the regional date settings to also use a "-" and not a "/". If the string build is configured wrong, or customer changes windows date format...if a "/" is calculated to "SDateString"...it is not accepted as a valid file name, so no write, whereas a "-" is accepted as part of a file name.
 
I have some pen assignment scripts for working in the History Analysis Trend window...
If you want to look at them....
 
That's helpful, thanks!

My goal is to have a script that runs at or near midnight and extracts this data automatically. I will wait until in the evening to log into the customer PC to make any changes so that I am not in the way of their operation.

Questions:

If I write a script to manipulate the tags created by the HistData wizard, then I would expect that it does not matter whether the trend page is being viewed or where the "scooters" are set. I can simply put the values I want into HDWFILENAME, HDWDURATION, HDWINTERVAL, HDWSTARTDATE, HDWSTARTTIME, etc, then set HDWWRITEFILE to a "1" and it will execute.

Do I need to change HDWWRITEFILE back to a zero also with a script?

What is a good method to trigger this to happen at a specific time each day?

Thank for your help on this.
 
Yes you will have to reset histdata Writefile tag to 0.
If you use HistData Wizard then what is in the trend chart is irrelevant. You are strictly pulling data from the *.lgh history file.

PM me your email and I will send more info...
 
Last edited:
You can use a condition script with $Hour == 0 and $Minute = 5 to run it 5 minutes after midnight. I prefer to avoid on the hour exactly as everyone seems to set up tasks to run then.

I do exactly what you are doing (except minute data) for several WTPs here. Happy to send you my scripts if you are still stuck.

I normally also prepare a little page which executes these scripts manually with a specified date, if required, on a button press. If they manage to kill HistData or the PC ends up turned off at midnight you won't get an export. Of course you'll also have data gaps if the PC is off unless they have more than one workstation. But sometimes 12 hours of data is better than no data for the drinking water assessors!
 
You will probably want to make sure in "Windows Regional Settings" that time is set to display in 24 hour mode.
This will make it easier to understand $Hour.

(Actually I do not understand why people do not operate all industrial PCs in 24Hr mode, far easier as far a data logging, scripting, and file building is concerned.)
 

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,514
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,599
Back
Top Bottom