Wonderware Programming Script – Crane Working Mechanism

Posted by

Hello Wonderware Intouch Users, I hope you all are doing good. Today, in this post we will demonstrate the working of a crane which is used as an example to enhance Wonderware Programming  Script knowledge using the wonderware intouch scada.

We have already covered various other SCADA scripting examples in our previous posts. For all the readers directly landing on this page I suggest to visit these wonderware intouch scada scripting examples as well.

To know more what is wonderware programming you can visit this page.

Now, we proceed to our this latest crane working scada script. We will first look on the mechanism we will follow to make this wonderware programming script, then we will see what all tags would be required here, followed by the wonderware intouch scada script.

Lets see now the mechanism we would use here which will further help to write the intouch scada script.

Mechanism of the example – Crane Working Wonderware Programming Script

What we are looking to achieve here is – hook of the crane lifts the load from one end, takes this load to other end and puts it in a truck. Once the load is put, truck move ahead taking the load. Hook goes back to the first end and the process repeats. Very simple, Right?

wonderware programming script
Design

Great, we have decided what we are going to do here hence the time now is to decide what all tags would be used to achieve this wonderware programming script. Well, here we are going to use only one tag, yes you read it right only one tag. Consequently, the real work here is with the wonderware intouch functions. Important functions used here are visibility, height and location.

wonderware programming script
Height, Location , visibility

First we will understand and prepare the experiment with a slider then we will automate the system with wonderware intouch script.

Conceptualization – Wonderware Programming Script

We take a line first. This line can be assumed as the arm of the crane. We will understand this later. And then a slider. First and the only tagname required will be for slider. The tagname we take here is “s1”.

Read hereHow to define the tagnames?

Now we choose the hook for the crane which will take the load from one end to other. To select this hook click on the icon for symbol factory and go to Intouch object process to find a box hook.

wonderware programming script
Hook

Next we take a box and 3 more hooks. Why we take total 4 hooks will get clear in further reading. Finally we take a truck which carries the load at other end.

wonderware programming script
Different components used

Assigning Values to the tagnames – Wonderware InTouch Programming

The time now is to assign values to the tagname. I will start here with the box. As the hook will pull up the box from the bottom to up there will be change in the position of box. To achieve that we will accordingly choose the function present in the wonderware programming script. The function used here will be location. Then break the symbol and double click to open the functions. We select here position and under that vertical. Consequently, a window to fill in the value comes up.

Filling values here is crucial. We need to note the initial value of the box (on y axis) and decide where we need to put it vertically from its initial position. The difference in the position will be used here. The difference value here is 150 and the s1 value is 20 to 40. This means between 20 to 40 value in the slider, there will be change in vertical location of box, the change will be 150.

wonderware programming script
Vertical Location Values of Box

The hook comes into play here. As the box will move up from 20 to 40 value in the slider, it should be visible that the hook is taking up the box from ground. For that to happen we take two hooks here with same tagname s1 but with different visibility. First hook will be visible when s1 < 20.

First hook is supposed to move down so there is change in height as well as the location of the hook. I have taken the initial height or min height of this hook as 30 when the slider value is 0. When slider value becomes 20 maximum height of hook becomes 100 and there is movement of 5 in between these value. See the pic for clear understanding.

wonderware programming script
Hook 1- Height value
wonderware programming script
Hook 1- vertical value
wonderware programming script
Hook 1 – visibility

We can see now when the value of slider changes from 0 to 20 hook moves down. When the value of slider becomes 20 hook disappears. Now what we want is hook picks this box and moves up. To do this we take another hook visibility of which obviously is s1>20. The position and min & max height is clear
from the pic below.

wonderware programming script - wonderware scada script
Hook 2 – visibility value
wonderware programming script
Hook 2 – horizontal value

The work for second hook is pretty opposite of the first one. This hook moves up after picking the box. The values in the height can be simply reversed. We have taken the visibility here s1>20 and s1<60. And also we have taken the horizontal movement of the hook. The horizontal movement begins when
the value of slider changes from 40 to 60. Which means when the value of slider change from 20 to 40 hook moves up along with the box looking like the box is moving up with the hook. This is because box
also changes it values between 20 to 40. Then between 40 to 60 hook and box move horizontally.

wonderware programming script
hook 2 height values

Now the box having visibility s1<60 disappears. We take another box here which visibilty is s1>60. We also take two other hooks at the opposite end the working of these two is completely opposite
of what we did at the other end. Refer to pic for better understanding.

wonderware intouch scada script
Box visibility values
wonderware programming script
Box horizontal value

Now the truck comes into play where we have taken only its horizontal movement which starts when the value of slider changes from 80 to 100.

For better understanding I have split  the arrangement of different hooks and boxes. Ultimately we need to merge these duplicate hooks and boxes to make sure that it looks like there is single hook and single box. Please look on the videos below to see how this works. First videos show the split components. Second one shows merged components.

See the split components video – Wonderware Programming

 

Merged Components Video – Wonderware Programming

 

Finally we put the wonderware programming script to make this go automated.

You can see the complete video here on our YouTube channel – Wonderware InTouch Users YouTube

If you liked this post or it helped you to excel your wonderware programming script please help us to grow and spread the knowledge to the world. Please like our @facebook page.

Leave a Reply

Your email address will not be published. Required fields are marked *