WonderWare

MJC

Member
Join Date
Mar 2011
Location
ILL
Posts
125
Hello,
I working with InTouch wonderware ver.10.6 a standalone application running on the PC, I'm a novice in Wonderware and need some help.

The PLC AB SLC5/05 Communicates with the WonderWare. The program in the PLC captures water flow data calculates and stores it in Float address. This occurs every hour for 24hr F202:0-23 then the data is overwritten with new value, all data is time stamped in the PLC.
So I have the following

F202:0-23 Flow GPH
N203:0-23 Month
N204:0-23 Day
N204:0-23 Year
N205:0-23 Hour
N206:0-23 Minute

I have to show the 24hour data on the application window, so one widow with the time stamp and the other with flow.
Using my method I would have to create a Text String with ## for each individual address, and that’s a lot of work, not mentioning aligning everything together.
Is there a better way of doing this in Wonderware. I see that a script can be written but I'm not sure how to write that out and how to pertain this to a window of text.

Please help anyone.

Thanks in advance.
 
gro them together

Make a cell and make sure it works once. Then copy/paste it and use substitute tags. That's the only way I know
 
CRTL-L and CTRL-R will become your friends in Wonderware....Create one, and use cut/paste as previous poster suggested. Then CRTL-R for tag substitution or CTRL-L for string substitutions. Wouldn't take more than 5-10 minutes to build a table like you're wanting.
 
Thanks for the suggestions,
I was thinking more in line of having a single text object and entering two tags.
Month (N203:0) Day (N24:0)
Then same for hour and minute.

i guess its just going to take getting used to it
 
That's exactly what we're telling you to do with Cells and tag substitution. Create your layout with multiple text objects/tags, then group them together as one cell. At that point it's a single object you can move around. Click on it and select tag substitution and you can wholesale change all the tags, even using find/replace features.
 
Again thanks for the helpful suggestion of creating a cell that made things a lot quicker, thank you.

As I continue to stumble with Wondereware I have few more questions, this time with tag data logging.
Here is what I’m trying to achieve;
I need to log F202:0 every hour over the period of 24 hrs and then print that 24hr log data, I also need to save the log file on the PC.

I have read few help files but I just don’t seem to gasp the concepts and procedure for what needs to be setup. So far I have marked all the tags that need to be logged under TAGNAME DICTIONARY and checked LOG DATA box of desired tag. Under HISTORICAL LOGGING PROPERTIES I enabled logging and defined the directory and how long to sore log files for.

Next I'm not sure to define exporting the 24hr log of the tag to excel file and printing every 24 hr.

Again big thanks for all you support.
 
You might be interested in using FileWriteMessage and FileWriteFields script functions to create .csv data archive files.

The data logging that you have setup is for trend charts, although you may use HistData to selectively convert the logs to a text format.

I've given you some ideas here, but what you do with those ideas could vary greatly. Actual examples of data archiving applications that I have done would be too complicated to describe in a forum conversation.
 
As bit_bucket says, you'll need to use FileWriteMessage to a CSV file on every hour. To do this, create a condition script that excecutes ON TRUE on $Minute == 59 (or 0)...In that script do a FileWriteMessage to a CSV file of the data you want to record. Create another script that executes ON TRUE on $Hour = 0 (Midnight) that prints the file and deletes it.

If you want to retain the files, use your scripting to create a unique filename based on the system $DateTime string. Use Left, Mid, Right String functions to parse out the date and append that to your file name.

Lastly, you need to decide if the data recording is time critical to PLC time or to HMI time. The above uses the PC clock. If you want to use the PLC clock, generate logic that sets a bit every hour and instead of ON TRUE on $Hour = 0, create a condition script ON TRUE on the bit from the PLC. The condition script in addition to writing the message should clear the bit in the PLC for the next hour.

It really is pretty simple and most of us familiar with WW/PLC could do the above in about 10 minutes. Read the help on FileWrite and Condition Scripts and you'll get there. Then add the knowledge to your toolbag for future projects :)
 
I write several .csv files in my Intouch Applications.
I also install Microsoft "Office Web Components" ("OWC" is free download if to be used as read only) to get the Excel spreadsheet Active X component and I load into Intouch, so operators can read the files from inside an Intouch window..
 
Thanks for your help guys.
Below I listed the 3 scripts in WW that will store values in Excel file based on time or trigger value in my case and print/save data in folder.
The FIlePrint instruction has to be obtained from WW support.



**************PRINTING TO DATA FILE****************************************

Condition Script: ($Minute ==15)

FLOW0=Text ($Hour, "00") + ":" + Text ($Minute, "00") ;

Filename1 ="C:\LOG\"+Text ($Month, "00") + Text ($Day, "00") + Text ($Year, "00") +"-1"+ ".csv";

FileWriteFields( Filename1, -1, "FLOW0", 4 );



*************WRITE HEADING IN EXCEL FILE**********************************

Condition Script: ( $Hour==0 AND $Minute==1 AND $Second==5)

Filename1 ="C:\LOG\"+Text ($Month, "00") + Text ($Day, "00") + Text ($Year, "00") +"-1"+ ".csv";


FLOW0=Text ($Hour, "00") + ":" + Text ($Minute, "00") ;

jobname0=”
HISTORICAL REPORT

Jobname1= Text ($Month, "00") + Text ($Day, "00") + Text ($Year, "00") +"-1"+ ".csv";

heading0=” FLOW1”;
heading1=” FLOW2”;
heading2=” FLOW3”;
heading3=” FLOW4”;

FileWriteFields ( Filename1,-1 ,”Jobname0”, 1);
FileWriteFields ( Filename1,-1 ,”Jobname1”, 1);

FileWriteFields ( Filename1,-1 ,”heading0”, 4);


***************************PRINT FILE TO PRINTER*******************************

Condition script: $Hour==23 AND $Minute==56 AND Seconds==40

Filename1 ="C:\LOG\"+Text ($Month, "00") + Text ($Day, "00") + Text ($Year, "00") +"-1"+ ".csv";

FilePrint ( Filename1, “INVISIBLE” ) ;

{printnow1=0;}
 
Don't forget to download and install Microsoft OWC.. Then you can install the "Microsoft Office 11 Spreadsheet" as an ActiveX wizard.
That way you can read the file from inside your Intouch app.
After installing OWC you go to Intouch development Configure> Wizard/ActiveX. Then you can install spreadsheet ActiveX. Then load wizard into any window. Really easy.
 
Remember too, that if your InTouch IO Server is set up to refresh only actively displayed tags (which is the preferred default), then you will need to either display the tags of interest within a window, or copy them to a memory or indirect tag within a script just prior to writing the tag values to a file, in order to refresh the tags' values to those in the PLC.
 
Remember too, that if your InTouch IO Server is set up to refresh only actively displayed tags (which is the preferred default), then you will need to either display the tags of interest within a window, or copy them to a memory or indirect tag within a script just prior to writing the tag values to a file, in order to refresh the tags' values to those in the PLC.

Theirs an easier way to refresh on Active I/O server tags than displaying them, and if the Indirect tag is formed by parsing the string name of the tag, then that doesn't work either.

The easier method and one that takes no processing power in WW is to create a condition script that's never true (IE 1 == 2), and assign any value to the tags in the scrpit (IE tag1 = 1, tag2 = 1). Since the script never fires, doesn't matter what value you assign to the tag, but this method puts the tag on the I/O stack to be updated.
 
Theirs an easier way to refresh on Active I/O server tags than displaying them, and if the Indirect tag is formed by parsing the string name of the tag, then that doesn't work either.

The easier method and one that takes no processing power in WW is to create a condition script that's never true (IE 1 == 2), and assign any value to the tags in the scrpit (IE tag1 = 1, tag2 = 1). Since the script never fires, doesn't matter what value you assign to the tag, but this method puts the tag on the I/O stack to be updated.

Interesting. I'd never thought of trying that. I've typically just copied the PLC tags to memory tags to force a refresh. That method also allowed me to use sequential tagnames for the FileWriteFields function even if the tags reading the PLC data weren't named with that sequential structure. One set of memory tags can be used in multiple scripts when employing this method.
 

Similar Topics

Hi guys, I have experience with PLC to Excel etc...just starting on using intouch scada screens. I have an Excel sheet that uses mainly...
Replies
1
Views
159
Hello everyone, Recently, my Archestra IDE shut down while I was editing. After restarting the IDE, I noticed warning symbols under my opened...
Replies
1
Views
105
Good morning all. I'm working on a rehab where they had a standalone InTouch 2014 HMI that they called a SCADA, but it's really basic stuff. The...
Replies
4
Views
190
Hi, We are setting up an Aveva Plant SCADA node with the intention to connect it to a Wonderware Historian node. Everywhere I look online I see...
Replies
1
Views
184
Hola chicos. Tengo un problema con el driver de comucicacion dasabcip 5, y un plc controllogix v34, ya realice la comunicacion pero en ciertos...
Replies
2
Views
168
Back
Top Bottom