Fix Dynamics Fan Rotation

S

Thread Starter

Steven Landau

Does anybody know how to make a object rotate at a different rate based on a database tag?

My client wants the fan to spin differently based on the RPM from the tach.

Steve Landau
VP Controls & Automation
SPEC
92 Montvale Ave
Stoneham MA 01890

Office: 781-438-3337
Fax: 781-438-5297
Cell: 617-908-9232
e-mail: [email protected]
e-mail to pager: [email protected] (short messages
only)

----"THE ENGINEERS WHO BUILD"----
 
C
Here is one way to make it work:
In the PLC, add a timer that resets itself when complete. Change the preset of this timer to be someting like: preset=1800-RPM(act). This will let the timer cycle quicker for faster RPM's.
Then when the timer completes do: Angle=Angle +1 and If Angle>360 then Angle=0.

Every ccycle of the timer will spin the object one more degree. In Dynamics you can animate the RotationAngle of the object to you want to spin with the Angle register in the PLC.

This will work but you will have to play with the timer preset calculation to get the rotation speeds you want. The only problem might be that the database tag might not update quick enough to see a smooth rotating object.

Craig Simon
Hoffman Enclosures
 
A

Anthony Kerstens

Do you mean a graphic on an HMI spin at a rate
proportional to a measurement?

This is a personal preference, but I would never do something like that. It's nothing more than a frill that adds overhead to the application, and to the bill at the end of the month. Also, if it doesn't work _exactly_ the way the customer _thinks_ it should, he's going to obsess over it and use it as a point of contention.

Been there, done that, got the battle scars.

Anthony Kerstens P.Eng.
 
I can think of about a dozen different ways to accomplish this . . . need to know what kind of object (assuming it is a fan), what kind of
controller (PC, PLC, Drive) . . . flesh out the details on what you are trying to accomplish and if history of this forum is any indication . . . you will get plenty of answers.

Ken Brown
Applied Motion Systems, Inc.
http://www.kinemation.com
 
S

Sage, Pete (IndSys, GEFanuc, Albany)

Rotation animation is typically done by animating the rotation in degrees from 0 to 360. What you want is a tag that changes the angle based on the
RPM. Certainly the PLC could be configured to do this. However, there should be numerous ways to do this in an HMI.

While I'm certainly not an Fix expert I'd imagine most HMIs would be able to do the following. In either event there're several ways to do it in
CIMPLICITY (the company I work for) - and I'd imagine these are similar for all modern HMI packages.

Solution 1
----------

Assume two tags - RPM and ANGLE

ANGLE would be an accumulator point whose equation is

(RPM / 60.0) * scan time (in seconds)

with a rollover value of 360.

The RPM point is configured On Scan, so that the equations update regardless of whether the RPM value changes.

Then the animation on the fan is simply ANGLE with range of 0-360.

In order to provide smooth animation you'd probably have to scan the point at 100-500ms.

If you only have a couple of points and fast communication to the device this probably won't matter, if you have thousands of RPM points this is really a waste of processing power.

In general this isn't a great solution because processing power is being burned regardless of whether anyone is looking at the screen.

Solution 2
----------

A better solution would be to develop it in a screen script. In this case you have the single tag RPM which could be scanned once a second. On the rotation object configure a periodic event with a period of 200ms (more or less depending on the smoothness you want) that runs a screen script. The script would essentially implement its own accumulator logic. To further reduce load I'd only read the value of the RPM point every second. The screen script would be something like:

Dim angle as single
Dim lastRPM as integer
Dim counter as integer

Sub OnTimer()
if counter = 0 then lastRPM = PointGet("RPM")
angle = angle + ( (lastRPM / 60.0) * .2) ' .2 = 200 ms
again:
if angle > 360 then
angle = angle - 360
goto again
end if
CimGetEventObject().Variable("Rotation") = angle
CimGetScreen.Refresh()
counter = counter + 1
if counter = 5 then counter = 0
End Sub

This method at least only beats on the system if the user is looking at the screen. Essentially we are driving the rotation of the object through a variable called "Rotation" that is configured to drive the rotation.

Pete
 
Top