Contents
Advanced

HMI Development | FactoryTalk View Studio ME Rotation Animation Tutorial | Pump Fan Motor Program

By
Vladimir Romanov
|
March 21, 2019
Table of Contents

Introduction

FactoryTalk View Studio is an extremely powerful software for building HMI applications. Many factories utilizing Allen Bradley automation hardware will resort to FactoryTalk View Machine Edition (ME) or Site Edition (SE) as their HMI platform. Although HMI development is usually straight forward, there are many caveats and hidden features which are only learned through experience.

Today, we will be looking at an implementation of an animated rotation which allows the user to create an object which rotates & indicates the movement. This animation can be applied to pumps, motors, fans and any other object which would normally rotate in the field. By utilizing such animations, you can make your HMI screens look much more presentable & intuitive to operators. Furthermore, a skilled programmer will leverage this technique to properly display the position of the given object instead of “randomly” rotating. This concept will become clear below.

The technique covered within this tutorial should work just as well in FTView ME & SE.

Creating the PLC Code Infrastructure for the Animation

The simplest way to animate an object is to create BOOL tag which when enabled rotates the object on the screen. However, this animation will look very dull and of poor representation as to what’s happening in the real system.

A good way to build the logic for a proper animation would be to leverage a TON instruction if the position of the motor is unknown. If this position is known, you may use it instead of the logic below. Make sure to scale it accordingly through multiplication or an SCP instruction.

HMI Development | FactoryTalk View Studio ME Rotation Animation Tutorial | Pump Fan Motor Program

The rung above is nothing but a timer which is running on a continuous loop. When the rung is enabled through the HMI_Rotation_Enable bit, the time starts and continues to run until this bit is de-energized. By using the HMI_Rotation.ACC value, we can rotate an object on our HMI screen.

HMI Development of the Rotation | Using Animations

By right-clicking a FactoryTalk View object, group or button, you can add an animation to it. Once inside the menu (shown below), you’ll need to make sure that you’re in the “Rotation” Tab. The definition here will give you the ability to animate the object you’ve previously selected.

HMI Development | FactoryTalk View Studio ME Rotation Animation Tutorial | Pump Fan Motor Program Studio 5000

In the “Expression” field, we’ve defined that tag upon which the rotation will be based. As mentioned above, this is the accumulated time on the timer represented by HMI_Rotation.ACC.

The following section, “Expression range”, allows us to set the minimum and maximum values which will be set by the tag. To keep it simple, we start at 0 and reset the time when the value has reached the .PRE value. Therefore, we can use the tag based definition to make things simple. You may set them manually, but this will require you to adjust these numbers should you want to speed-up or slow-down your rotation through the PLC.

The “Rotation (Degrees)” section allows the user to select the range of the rotation. Since we’re working with a fan, it will rotate 360 degrees. For other systems, this could be made smaller.

Lastly, if you desire for the center of rotation to be off-center, you can use the utility within the “Center of rotation” field. By default, the object will rotate about the center.

Modifying Display Update Times for Smooth Operation

If you launch the animation as presented above, it will work. However, it may appear to be choppy or rotate much slower than expected. This is because the default update rate of the FTView displays is low. Although it’s not critical to set it as high as possible, you do need a certain update rate in order to view the rotation smoothly. Since it depends on a PLC-based tag, it needs to receive this data consistently.

By opening the display settings, the “General” tab will display a field which is labeled as “Maximum Tag Update Rate”. Setting this value to 0.1 or 0.05 will ensure that you’re animation is flawless. Do note that this will tax your network slightly more than usual.

HMI Development | FactoryTalk View Studio ME Rotation Animation Tutorial | Pump Fan Motor Program Example

Conclusion

Working with HMIs can be challenging, but extremely rewarding. Making sure that your design is both functional and pleasing to the eye is an absolute must if you want to keep your customers & operators happy. However, it can be challenging to figure out some of the most intricate animations on your own.

Making your objects rotate can bring life to your screen and allow the operator to have a visual confirmation that a certain motor is in fact working. Of course, having a motor with feedback would be the best case scenario, but you can easily simulate this with a timer.

All you need is a few simple rungs of logic and access to the “Rotation” tab through FactoryTalk View Studio. This method will work for the ME and SE versions of terminals and will look just as great.

Video Tutorial

Got a question or comment?

Related Tutorials

Beginner

How to Build an Allen Bradley PLC Trainer Kit for PLC Training at Home

The best way to learn PLC programming is to get hands-on experience. However, as many are trying to learn how to program these devices before landing a job, it becomes crucial to invest in your own hardware in order to accelerate the learning process. That being said, a PLC programmer will face three challenges when it comes to building an effective PLC trainer.

April 10, 2020
|
By
Vladimir Romanov
Beginner

Photo Eye Sensor | How to Wire a Photoelectric Sensor into a CompactLogix Allen Bradley PLC

Learn how to work with photoelectric sensors, understand the basics, how to wire them, how to tie them into various PLCs and field devices and lastly how to troubleshoot them.

April 24, 2020
|
By
Vladimir Romanov
Beginner

PLC Programming | How to Read Ladder Logic

Learn the basics of Ladder Logic, one of the top 5 most popular types of PLC programming languages used in manufacturing environments.

April 7, 2020
|
By
Vladimir Romanov