Wonderware Intouch Rotation Question

jimdi4

Member
Join Date
Aug 2004
Posts
108
Hello, I would like to do a continous rotation of an object when a bit is true (1).

I am using Wonderware Windowmaker 9.0.

So far, I set the objects Miscellaneous/Orientation. Set the bit(tagname tied to it). Then set the Value at Max CCW at 0, the Value at MaxCW at 10, the CCW Rotation at 0, the CW Rotation at 360. The Centerof Rotationoffset from object centerpoint: X position = 0....and the Y position=0.

I added a button to test, but what happpens is the test object will only rotate when the bit is toggled back and forth, it will not continously rotate when the bit is true...any thoughts here...

thanks
 
I don't have WW available to me right now but it sounds like you need a analog HMI tag made up and do a windows script that:

IF Tag = True AND HMI_Tag < max rotation THEN
HMI_Tag = HMI_Tag + constant
ELSE IF HMI_Tag > max rotation
HMI_Tag = 0
END IF

and have the rotation tied to the HMI_Tag. My logic above might not be exact for WW but you get the idea.
 
I put:



IF TEST == 1 AND $Second < 360 THEN
TEST = 1;
ELSE IF $Second > 360 THEN
TEST = 0;
ENDIF;
ENDIF;


and I get

"expecting another operand"
 
harryting's suggestions work

Use your bit tag in place of TEST1 and the orientation animation should be tied to HMI_Tag of some other memory integer you specify.

IF TEST1 == 1 AND (HMI_Tag < 360) THEN
HMI_Tag = HMI_Tag + 2;
ELSE IF HMI_Tag > 360 THEN
HMI_Tag = 0;
ENDIF;
ENDIF;
 
I'm agreed in principle with what everyone has posted so far.

For a continuously animated rotation, you need a continually changing tag. I typically would use the $Second system tag as you suggested.

Marc


PS: You might need to define a new tag and set that up in a "QuickFunction" like:

If Test==1 Then MyFunction=$Second;
Else MyFunction=0;
Endif;
 
Last edited:
I just want to make it clear that this is the first Wonderware job I am doing thats why I may be tripping on my own two feet here...


To test this i created a pushbutton and for the discrete value i called it test1.

I double clicked on my animation for the rotation and added the following in the miscelaneous orientation :

IF TEST1 == 1 AND (rotation < 360) THEN
rotation = rotation + 2;
ELSE IF rotation > 360 THEN
rotation= 0;
ENDIF;
ENDIF;

When I click on "OK" I still get "expecting another operand"....Is there a way you can see if I am doing the same thing you are?.. or am I missing something here? I did notice the tagname "rotation" that I created did not have the same access as the rest of the tags...could this be creating the problem? If so how do you change the tagname access w/o reimporting all the tags?
 
PS: You might need to define a new tag and set that up in a "QuickFunction" like:


Quickfunction????

Ok, Now I see it...I added that bit of code to a "quickfucntion" and saved it as "rotation" but how do I tie it to the object?

When you doubleclick on the object the Animation pops up...I chose ...Miscellaneous...Orietation...but its looking for an expression not a quickfunction??? Pease clarfy...
 
Last edited:
jimdi4 said:
When I click on "OK" I still get "expecting another operand"....Is there a way you can see if I am doing the same thing you are?.. or am I missing something here? I did notice the tagname "rotation" that I created did not have the same access as the rest of the tags...could this be creating the problem? If so how do you change the tagname access w/o reimporting all the tags?


That is why I added the edit for the "QuickFunction". If you update a tag through a "QuickFunction", you can use a much more complicated expression than you can in the Animation Link Expression.

Try something like what I posted above (or your own code) in a quick function (I typed it from memory, so you might need to work on syntax a bit), then reference your quick-function Tag name in your animation link.




Looks like our posts crossed on the net. Yes - a quickfunction is found under "Scripts" on your project navigation tree.


Good luck,

Marc


PS: I have not used 9.0 - I would assume this functionality hasn't changed . . .
 
Last edited:
Yes there is a bit of a propagation delay here...I am updating my question and you are already answering it....Maybe I should wait a couple of minutes b-4 I posted...


Ok, Now I see it...I added that bit of code to a "quickfucntion" and saved it as "rotation" but how do I tie it to the object?

When you doubleclick on the object the Animation pops up...I chose ...Miscellaneous...Orietation...but its looking for an expression not a quickfunction??? Please clarfy...
 
Last edited:
ENDIF;
ENDIF;

I don't have WW here but I think you might have one more ENDIF than required.

As for your question on expression. An Expression is can include function, numbers, etc... eg. 2+2 is an expression, SIN(X) is an expression and X == Y is an logical (0 or 1) expression.
 
Well - I broke out WindowMaker and fooled around for a minute - here's probably the simplest way that I could find:


Set your orientation expression equal to: TEST1*$SECOND, then scale your orientation properties so that 0-60 = 0 - 360.


Marc


PS: I only got the quickfunction working for a "one-shot" kind of update. It might need to go into a Script that runs regularly to get that to work (which is definitely NOT what you want to do). While I'm sure that I have done it before, I couldn't figure it out quickly today (and I think the above solution is better anyhow!)
 
What I wound up doing was utilize a condition script. That worked perfect for my application. :p ;)
 

Similar Topics

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
103
Hi, I am upgrading a Wonderware SCADA form version 9.5 to version 23. I am able to migrate all the graphic, but when to activate the runtime this...
Replies
8
Views
338
Hi all, I am using OI.GATEWAY.2 to communicate to the PLC using an OPC UA. I can see the tags using an OPC explorer connecting to the...
Replies
0
Views
129
For a while, I have been working with InTouch 10.1. The problem I am currently facing is the need to implement certain functions that do not...
Replies
0
Views
440
Hi guys. I am using Intouch Wonderware. Does anyone know how to enlarge the AlarmViewerCtrl properties window? In my case it is cut off as in the...
Replies
11
Views
1,449
Back
Top Bottom