Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

20/8/2018 Wonderware Programming - Tank Filling Example With Complete Script - Wonderware InTouch Users

Wonderware InTouch Users


Please Like and follow us :)

Home Wonderware Programming Tuts

Ths Sims 2 Free Download About Us Disclaimer

Contact Us

Search This
Website

Custom S

wonderware programming

Wonderware
Recent Posts
Programming – Tank Wonderware
Programming
Filling Example With Script – Crane
Working
Complete Script Mechanism

http://wonderwareintouchusers.com/wonderware-programming-tank-filling-example-complete-script/ 1/11
20/8/2018 Wonderware Programming - Tank Filling Example With Complete Script - Wonderware InTouch Users

Posted by admin Wonderware


Programming –
Hello, Wonderware InTouch Users. In the series Tank Filling
of Wonderware programming tutorials we have Example With
crafted another tutorial for you all. In this Complete Script
tutorial we will discuss the infamous tank filling Wonderware

example. Unlike other tank filling examples this Programming –


Orientation
has many additional features.
Function
Wonderware Script
Various features included in this tank filling
Example
example are – use of three tanks each with a
Wonderware
valve and pipe combination. As there are more
Tagname Problem
tanks and pipes, consequently, there is more
– Exceeded
wonderware programming. We would now
Dictionary Limit of
discuss the process to make tank filling
Tags Problem
example in wonderware intouch application Solved
using wonderware script.  In order to grasp the Detailed
example more easily please follow steps given Explanation Of
below. Each Wonderware
InTouch Function –
With Examples

Step to make Tank Filling Example Recommended


using Wonderware Progarmming Articles
Script –
Wonde
rware
Step 1 – Draw the layout of the components
InTouch
Installa
The basic layout of the components used in the
tion With Symbol
example is shown in the picture below. Make
Factory

http://wonderwareintouchusers.com/wonderware-programming-tank-filling-example-complete-script/ 2/11
20/8/2018 Wonderware Programming - Tank Filling Example With Complete Script - Wonderware InTouch Users

the layout shown below using components Wonde


available in the symbol factory. rware
Progra
mming
Script – Crane
Working
Mechanism

Wonde
rware
Progra
mming

Layout – A Step-By-Step
Learning Guide

Step 2 – Give the tagnames to the


Fault
components in the tank filling example
Detecti
on In
We already know the importance of tagnames
Overhe
In wonderware programming. In regard of this,
ad Transmission
our next step is to provide tagnames to the
Lines –
components used.
Wonderware
Intouch SCADA
Project Help

InTouch
Wonde
rware
– Your
The various tagnames that we have chosen are
Industrial
as follows (in order – top to bottom) – Refer Automation Friend
picture above.

Valve (v)
http://wonderwareintouchusers.com/wonderware-programming-tank-filling-example-complete-script/ 3/11
20/8/2018 Wonderware Programming - Tank Filling Example With Complete Script - Wonderware InTouch Users

Tank (t1)
Valve (v1)
Pipe (p1) –Right angle pipe
Pipe (p2)
Right angle pipe – Pipe (p3)
Valve (v2)
Tank (t2)
Valve (v3)
Pipe (p4)
Pipe (p5) – Right angle pipe
Tank (t3)

If you want to know about tagnames in


wonderware programming please visit –
Wonderware Tagnames.

Step 3 – Wonderware programming Script

This is the most important step. Moreover, this


step is the main aim of this article. Here we will
write the script required for the task. But, firstly
we should discuss what the task is.

The task for this tank filling example is as


follows. In this example we would –

Switch on the valve v.


Fill the tank t1 when v gets on.
Turn on valve v1 when t1 is full.

http://wonderwareintouchusers.com/wonderware-programming-tank-filling-example-complete-script/ 4/11
20/8/2018 Wonderware Programming - Tank Filling Example With Complete Script - Wonderware InTouch Users

Start flow in pipe p1 and p2 when v1 turned


on.
Start flow in p3 when p2 full.
Turn on valve v2 when p3 is full.
Fill the tank t2 when v2 gets on.
Turn on valve v3 when t2 is full.
Start flow in p4 and p5 when v3 is on.
Start filling tank t3 when p5 is full.

So, above is the sequence of tasks which we


need to accomplish. In regard of this, we would
now write the wonderware script required for
the above tank filling exercise.

Wonderware script for the On Show –

v=0;

t1=0;

v1=0;

p1=0;

p2=0;

p3=0;

v2=0;

t2=0;

v3=0;
http://wonderwareintouchusers.com/wonderware-programming-tank-filling-example-complete-script/ 5/11
20/8/2018 Wonderware Programming - Tank Filling Example With Complete Script - Wonderware InTouch Users

p4=0;

p5=0;

t3=0;

On show scipt

Wonderware Script for the While showing –

IF t1==0 THEN v=1;ENDIF;

IF v==1 AND t1<=100 THEN t1=t1+1;ENDIF;

IF t1>=100 THEN v1=1; ENDIF;

IF v1==1 AND p1<=100 THEN


p1=p1+1;ENDIF;

IF p1>=100 THEN p2=p2+1;ENDIF;

IF p2>=100 THEN p3=p3+1;ENDIF;

http://wonderwareintouchusers.com/wonderware-programming-tank-filling-example-complete-script/ 6/11
20/8/2018 Wonderware Programming - Tank Filling Example With Complete Script - Wonderware InTouch Users

IF p3>=100 THEN v2=1;ENDIF;

IF v2==1 THEN t2=t2+1;ENDIF;

IF t2>=100 THEN v3=1;ENDIF;

IF v3==1 THEN p4=p4+1;ENDIF;

IF p4>=100 THEN p5=p5+1;ENDIF;

IF p5>=100 THEN t3=t3+1;ENDIF;

While showing script

For those who don’t know what ‘On show’ and


‘While Showing’ is – Visit Wonderware script
Example.

Step 4 – Run the Tank Filling Example

Now, we have written the wonderware


programming script for the tank filling example.
In this step, we will run the project made in the
http://wonderwareintouchusers.com/wonderware-programming-tank-filling-example-complete-script/ 7/11
20/8/2018 Wonderware Programming - Tank Filling Example With Complete Script - Wonderware InTouch Users

runtime window. Let’s see how our completed


example looks like.

Picture while runtime

00:00 01:38

To know more about wonderware


programming you can visit these related
tutorials.

Wonderware Programming Tutorial – 1

Wonderware Programming Tutorial – 2

http://wonderwareintouchusers.com/wonderware-programming-tank-filling-example-complete-script/ 8/11
20/8/2018 Wonderware Programming - Tank Filling Example With Complete Script - Wonderware InTouch Users

To see the complete making of this tutorial visit


– Wonderware Programming Example at
YouTube.

Stay tuned with us for more wonderware


programming script related tutorials.

If you liked our article or it helped you please


show us your love by following our @Facebook
page. For any queries you can contact us
through @Facebook or reach us here.

Share this:

 Facebook  LinkedIn  Twitter  Google

 WhatsApp  Email  More

INTOUCH PROGRAMMNIG EXAMPLE

WONDERWARE INTOUCH SCRIPT EXAMPLE

WONDERWARE PROGRAMMING

WONDERWARE PROGRAMMING EXAMPLE

WONDERWARE SCRIPT EXAMPLE

« Wonderware Programming – Orientation


Function Wonderware Script Example
Wonderware Programming Script – Crane
Working Mechanism »

2 comments

Mohammad Anas says:


December 10, 2017 at 12:39 pm

http://wonderwareintouchusers.com/wonderware-programming-tank-filling-example-complete-script/ 9/11
20/8/2018 Wonderware Programming - Tank Filling Example With Complete Script - Wonderware InTouch Users

This is a wonderful example.

Reply

admin says:
December 10, 2017 at 6:10 pm

Thank you very much Anas for that.

Reply

Leave a Reply

Your email address will not be published. Required


fields are marked *

Comment

Name *

Email *

http://wonderwareintouchusers.com/wonderware-programming-tank-filling-example-complete-script/ 10/11
20/8/2018 Wonderware Programming - Tank Filling Example With Complete Script - Wonderware InTouch Users

Website

Post Comment

Notify me of follow-up comments by email.

Notify me of new posts by email.

© Wonderware InTouch Users Content Rights Reserved. See Sitemap

http://wonderwareintouchusers.com/wonderware-programming-tank-filling-example-complete-script/ 11/11

You might also like