Fan rotation in RSView32

nirmal

Member
Join Date
Jan 2003
Posts
17
Hi

I have a gfx image of a fan in my project. When a tag value goes to 1 the fan has to look like it is rotating. I tried using the rotation tab in animation. I gave the tab and gave a minimum degree of 0 and a maximum degree of 90 to make it rotate around the center(0,0). I did not specify any minimum and maximum input.Whenever the tag value becomes 1 the fan has to keep rotating. but when i run the program, and the tag value becomes 1 the fan just rotates to the 90 deg angle and stops.can anyone help me on how to make it seem like rotating continuously.
Thanks a lot
nirmal
 
Not sure if this will apply to yours but here is what I do.

I pick a word like N7:0, and reference my animations to the word file.

Then I step my word file through N7:0 = 1, N7:0 = 2, N7:0 = 3 etc..

Then I mapped each graphic to values.

When N7:0 = 1 show this image
When N7:0 = 2 show this image
When N7:0 = 3 show this image

etc....

Does that help?

BONUS:
Here are some free GFX libraries for RS View:
Maybe you'll find something you can use.

http://forum.mrplc.com/index.php?&act=Downloads&CODE=02&id=210
 
here's another approach ...

some people use this trick ... draw three or four separate pictures of the fan blade ... rotate the blade in each successive picture a little bit further than the blade in the previous picture ... then set up a tag which repeatedly cycles through the values 1-2-3-4, 1-2-3-4, etc. while the fan is on ... use the values in this tag to turn the visibility of each picture on and off ... sort of like animating a cartoon by drawing a slightly different picture on each page of a notebook and then rapidly flipping through the pages ... experiment with the amount of rotation, and the number of pictures, and how fast you change the numbers ... you can often get smoother results this way than by using the actual "rotation" method ... big hint: get all of the little fan blade pictures flipping off and on correctly BEFORE you try to align them on top of one another ... it's a lot easier to troubleshoot any problems that way ...

and another thing about this approach ... once you've mastered it, you can use it to animate different types of movement other than simple rotation ... examples: flags waving, water flowing, etc. ...
 
nirmal,

I just fiinished a project where I had 5 fans to animate In RSView32. I found the best technique is the one that uses the minimum steps, the minimum tags, and is easy to copy and transport. I did it this way: I used one of the built-in RSView system tags (called system\blinkfast) ANDed (Boolean AND) with my Fan Running bit. For each fan, I used two sets of blades. Each set has 4 blades on the fan. The second set is drawn shifted or rotated 45 degrees from the first. For example, for Fan F3, I have a tag called F3_RUNNING. For the Animation menu for one set of fan blades, under "Visibility", I type in the expression (F3_RUNNING & system\blinkfast=1). The system\blinkfast bit turns on and off every 0.1 seconds. The "&" combines the two tags, so that both have to be TRUE for the blades to be visible. For the second set of blades, I type in (F3_RUNNING & system\blinkfast=0). When F3_RUNNING is ON, the fan looks like it is rotating! That's all there is too it!

Let me know if you need more help with this ([email protected]). I also had to animate a bucket elevator. Now that was a challenge!
 
Last edited:
Lancie1 has an excellent approach ... just as long as the customer is willing to go along with it ... I once had to help a programmer who had tried Lancie1’s solution but couldn’t satisfy a fussy customer ... the customer kept complaining that the object didn’t really look like it was rotating ... he said it just looked like it was flashing off and on ... picky ... picky ... picky ... nothing would satisfy this guy ... he kept asking: “so which way is it rotating ... clockwise or counter-clockwise?” ... and sadly there was no valid answer ... the approach I recommended above seemed to make him happy ... animation, like beauty, seems to be in the eye of the beholder ...

but Lancie1 is absolutely right ... his approach is much better as long as you can get away with it ... try his way first ... it’s sure to be a lot easier than mine ...

and one more thing to try with Lancie1’s “two picture” method ... try blinking only the TOP fan picture whenever the fan is on ... in other words, just make the TOP fan picture invisible whenever the fan is off ... when the TOP picture blinks on and is visible, it will cover the underlying picture ... if it’s invisible, the underlying picture will show up instead ... so there’s probably no real need to animate the bottom picture at all ... this might help you clean things up even more ... as you’ve probably already found out, the less animation you put on your screens, the smoother the existing animation appears ...

and finally, the “change the value inside the PLC” animation method that chakorules brought up comes in very handy for things like robot arms, ram positions, etc. ... in other words, for things that move more slowly than spinning fan blades ... it would be a good idea to keep a few notes on the approach that he recommended ... you’re bound to need that technique someday down the road ... it comes in really handy when you need to show the operator the “actual present position” of something that moves from one sensed position to another sensed position ...
 
Hi
Thanks for the help guys. Lancie's solution was cool. So Simple. In the case of Ron's solution , how can i set a tag to go thru 1-2-3-4 cycles. iam a novice to hmi programming. By what i understand i should set up an analog tag. but how can i make it go in a cycle? can u explain me how?
Thanks a lot
nirmal
 
nirmal said:
Hi
Thanks for the help guys. Lancie's solution was cool. So Simple. In the case of Ron's solution , how can i set a tag to go thru 1-2-3-4 cycles. iam a novice to hmi programming. By what i understand i should set up an analog tag. but how can i make it go in a cycle? can u explain me how?
Thanks a lot
nirmal

Your HMI software should be able to select a bitmap based on the value (STATE) in one of the PLC registers. If you program the PLC to cycle through a sequence of values, it will give the illusion of motion.

The downside is you use program space (only a little) just to get a cute graphic on your screens.

I always feel a little guilty about making the PLC do something just for show. I think I'm still worried that Tom might come and smack me upside the head...

AK
 
have you looked at the sample files yet?

nirmal,

before you started WORKING with RSView, you should have PLAYED with the sample files first ... there is a section at the bottom of the "edit" mode tree named "Derived Tags" ... that's where you build the types of tags which automatically increment, etc. ... there is a menu selection which will let you specify the "interval" ... or in other words, how often the derived tag gets updated ... load the samples and see how the little cars are moved through the automotive assembly line ... go into the edit mode and take the samples apart piece by piece ... see how they work ... this is the best way to learn new techniques ...
 
"Thanks for the help guys. Lancie's solution was cool. So Simple. In the case of Ron's solution , how can i set a tag to go thru 1-2-3-4 cycles? "

Nirmal, to set up a tag to go thru 0-1-2-3, you need a timer of some type to control how fast your animation moves. Just add a timer and a counter to your PLC program. The timer should be started by your "Fan On" tag. Each instance that the timer gets "done", enable the counter 1 count. When the counter gets to 3 (or however many stages you need) then use its "done" condition to reset itself to 0 and start all over. In your RSView program, set up a multi-state graphic and tag that changes position based on the value of the counter accumulator (Counter 1 address would be C5:1.ACC). For example, your "Visibility" expression for the First animation could be "C5:1.ACC=0". Then if the counter is indeed at 0, that graphic will show up. This could be the default initial position, as the counter will be zero until you start the timer by starting the fan.
 
Last edited:
help

is there any body who will provide me that how to write the visibilty expression i have to make visible my object between 25 and 50 else it will not be visible in rsview32
 
Vikas,

Use an expression in the Visibility property, something like this:

"If (Tag1>24) AND (Tag1<51) THEN 1"

where your Visibility Parameter is set up to be Visible when = 1.
 
Last edited:
thanks

thank you very much lancia sir its my good luck that god gave me such a good helping person thank you very much i could need some more help may be further
 
"If ((Tag1<25) OR (Tag1>50)) THEN 1 ELSE 0"

"OR"

(Tag1<25) OR (Tag1>50)


visible option: select false

hai vikas what is u r native
 
Last edited:

Similar Topics

Hi I have used a fan object in my RSView32 program. When the input tag to the object is set to 1, the fan is supposed to keep rotating. I tried...
Replies
3
Views
5,256
hello everybody I am Nirmalya Basu, i have a problem i want to rotate a fan in rsview32 with the help of a fixed rpm which is shown in SCADA.The...
Replies
6
Views
4,441
Well actually I'm a person and not a fan but either way. I'm an old in-my-60's PLC guy and I recently had a project which spec'ed for a...
Replies
8
Views
1,207
Hi, I am trying to have my PLC start a heating fan in a linear manner. A certain percentage at a certain received setpoint. To do this, I use a...
Replies
8
Views
1,586
Hi, I've bought this PLC + HMI from Aliexpress, the one on the right that uses SSRs. and want to connect a 24V/0.2A DC fan to the output. My...
Replies
32
Views
7,098
Back
Top Bottom