FactoryTalk View Studio - How to write expression for valve / agitator animation

geoffewart

Member
Join Date
Jul 2012
Location
St. Croix
Posts
7
I'm trying to create new graphics for some open / close valves we're installing. The standard I have to follow calls for the valve to be green when open, red when closed and yellow when travelling or neither open or closed (stuck). After reading another thread on here I've created 3 versions of the graphic (red, green and yellow) and set the visibility for each to only come on when called for. Problem is my expression for the yellow valve checks out in the syntax checker but error in the when the application is run on the PV. Here's the expression:
IF {[DistillationPLC]Beer_Well_Feed_To_Beer_Stills_Valve.FAILCL} OR {[DistillationPLC]Beer_Well_Feed_To_Beer_Stills_Valve.FAILOP} = 1 THEN TRUE ELSE FALSE

If it doesn't show the whole Expressions/computer talk is pretty foreign to me.

Also I have an agitator that turns green when on but is supposed to rotate. The system/BlinkFast tag works but I can't figure out how to connect it to my process tag to tell it when to blink. I've tried if/then/else, equals, "&", no expression and possibly a few others.

Thanks in advance for any help!
 
Try leaving off the last part. FAILCL OR FAILOP is a valid logical OR expression. If either tag is TRUE the result will be TRUE or 1.
{[DistillationPLC]Beer_Well_Feed_To_Beer_Stills_Valve.FAILCL} OR {[DistillationPLC]Beer_Well_Feed_To_Beer_Stills_Valve.FAILOP}
The system/BlinkFast tag works but I can't figure out how to connect it to my process tag to tell it when to blink.
You need to create two agitator images, stacked one on top of the other. The second one will be rotated about 45 degrees from the first one. Then tie each image's Visibility animation attribute to one of the states of the system/blinkfast bit (1 or 0).

First Agitator image:
If AGITATOR_A100_RUNNING THEN system\blinkfast=1 ELSE ""

Second Agitator image rotated 45 degrees:
If AGITATOR_A100_RUNNING THEN system\blinkfast=0 ELSE ""
 
Last edited:
Thanks for that, unfortunately when I put {[DistillationPLC]Beer_Well_Agitator_Holding_Coil_In} THEN system\blinkfast=1 ELSE ""
I get an error saying "The branches of the if...then...eslse...statement do not have return mathcing types
 
Thanks for that, unfortunately when I put {[DistillationPLC]Beer_Well_Agitator_Holding_Coil_In} THEN system\blinkfast=1 ELSE ""
I get an error saying "The branches of the if...then...eslse...statement do not have return mathcing types

I am basing this on RSView32, but in that case the System Tags are Read Only. So, you can't set them. Probably what you want is something like;

{[DistillationPLC]Beer_Well_Agitator_Holding_Coil_In}
and system\blinkfast=1 Then "" Else ""

You could use this with Visibility.

I personally think one object and then using states and the colors is better. So if the the above was true then 1 for Green, if not true 0 for red. If this is a contactor, getting the Yellow Flashing might be a little tougher unless you have a N/C Contact to prove the Contactor is open. Even in that case, would the screen even register such a short event?

We basically the same scheme for Valves, and it should work fine for that.

Stu....
 
Thanks guys, I got the agitator to work with: {[DistillationPLC]Beer_Well_Holding_Coil_In} = system\blinkfast
I then superimposed two agitator blades rotated about 45* as suggested and set one to have the expression true state be visible and one to be invisible. Seems to work pretty well so far.

As for the valves, I'm waiting for them to finish getting installed (need air) to test and verify. In the meantime I'll connect with RSLogix and simulate the open and closed signal to verify the animation. Currently all are flashing yellow indicating neither open or closed so at least that part seems to be working.
 
Thanks guys, I got the agitator to work with: {[DistillationPLC]Beer_Well_Holding_Coil_In} = system\blinkfast
If that tag is what shows that your agitator is running, then changing its value to system\blinkfast could cause problems. I think you need something like this that works with the "Rotation" instead of the "Visibility" animation. Set the rotation to be 0 degrees at Minimum Value (0 for system/blinkfast) and 45 degrees at Maximum Value (1 for system/blinkfast). Then if your Agitator is ON, it rotates from 0 to 45 degrees as blinkfast goes from 0 to 1. If the Agitator is OFF, then it stops rotating (unlike your method which will rotate forever and also changes the value of a tag).

IF {[DistillationPLC]Beer_Well_Holding_Coil_In} THEN system\blinkfast ELSE 0

I am basing this on RSView32, but in that case the System Tags are Read Only. So, you can't set them.
Exactly right. Sorry for the error. I should not have included the "=1" or "=0", and it should be "0" at the end (although I have some old examples that did work with the empty set double quotes "").

If AGITATOR_A100_RUNNING THEN system\blinkfast ELSE 0
 
Last edited:
Factory talk View Studio Version 6.10 to 7.0

I have created my projects in Factory Talk View Studio ver 6.10

I want to download Factory Talk view Studio Version 7.0

After installing factory Talk view Studio 7.0 , Can I open all of my projects created in ver 6.10. in version 7.0 ??

Do I need to Convert it to 7.0 or don't need to touch

Thanks guys
 

Similar Topics

Hello, I made a change in alarm setup in factory view studio, where I changed a alarm message text. After that I made a run application and...
Replies
0
Views
131
Hi all, I'm having an issue with connecting View Studio emulation to a real PLC. I am running View Studio 8.01 on a Hyper-V virtual machine...
Replies
0
Views
260
Hello. I have a Project I'm doing in Factorytalk View Studio. One of my displays I created has a bunch of red x's on all of the objects I created...
Replies
6
Views
680
So, I'm new to the PLC world (fresh graduate) and at my job I've been pretty much only helping out the other programmers with simpler tasks while...
Replies
1
Views
625
Good morning, I have a project coming up that will require my HMI runtime to toggle from English to Spanish via selector switch. What is the...
Replies
0
Views
459
Back
Top Bottom