Reandy
Member
I'm having an issue with getting animation to work as I expect it should work. It only seems to change when I exit the display, then come back to the display.
Goal: Create 2 vertical bar graphs, the left one to be the PV of a PID loop, and the right one to be the SP of the PID loop. Always have the right bar graph be 50% (in the middle) no matter what the SP is. Have the left bar graph show the PV in the same scale as the SP bar graph is. I want to make these bar graphs dynamic so I can show a range of just 20 (zoomed in)(+10 and -10 of SP) instead of a range of 200 (low) to 300 (high).
To see what I am describing... In the PLC, create 3 tags (int/real doesn't matter) just make them the same type. For simplicity, I will use SLC500 style integer:
N7:0 (set point)
N7:1 (set point - 10)
N7:2 (set point + 10)
Create logic which subtracts 10 to N7:0 and puts it in N7:1
Create logic which adds 10 to N7:0 and puts it in N7:2
Put a value in N7:0 of 250, observe N7:1 now equals 240, and N7:2 now equals 260
In FactoryTalk View Studio create a rectangle. Right Click/Select Animation/Fill. In the expression for the tag put in N7:0. Under "Expression range" select radio button "Read from tags". In "Min:" put in N7:1. In "Max:" put in N7:2. Apply/Close. What we should observe when we run this is that the bar graph always stays half filled (Yes I know we could just show a graphic which represents 50% (not dynamic), but my goal builds upon this concept, so let's continue)
When I observe this in run mode in studio, and on the client, is that as i change the SP in the PLC, the bar graph does not always stay only 50% filled. If I bring up another display, and then come back to this display, then it shows correctly. It's almost as if this "read from tags" animation only is updated when the display opens.
Other things to note... I'm putting a scale to the left of these 2 bar graphs. It has 3 major ticks, and 1 minor tick. I have text with tags inserted on the top major tick (N7:2). On the middle tick (N7:0 the SP) and N7:1 on the lower tick. Of course these update just fine, always showing the SP (N7:0) on the middle tick. And the other ticks updating their +/- 10. The left bar graph for the PV, I have it with the same "read from tags" on it's Animation/fill "Expression Range / Read from tags". I have the PV tag in the fill expression. This bar graph acts like the SP one, only updates and scales correctly when the window is opened.
Right now, my only "work around" is to have the operator change graphics, and then come back to this one, right after he/she makes a SP change.
Goal: Create 2 vertical bar graphs, the left one to be the PV of a PID loop, and the right one to be the SP of the PID loop. Always have the right bar graph be 50% (in the middle) no matter what the SP is. Have the left bar graph show the PV in the same scale as the SP bar graph is. I want to make these bar graphs dynamic so I can show a range of just 20 (zoomed in)(+10 and -10 of SP) instead of a range of 200 (low) to 300 (high).
To see what I am describing... In the PLC, create 3 tags (int/real doesn't matter) just make them the same type. For simplicity, I will use SLC500 style integer:
N7:0 (set point)
N7:1 (set point - 10)
N7:2 (set point + 10)
Create logic which subtracts 10 to N7:0 and puts it in N7:1
Create logic which adds 10 to N7:0 and puts it in N7:2
Put a value in N7:0 of 250, observe N7:1 now equals 240, and N7:2 now equals 260
In FactoryTalk View Studio create a rectangle. Right Click/Select Animation/Fill. In the expression for the tag put in N7:0. Under "Expression range" select radio button "Read from tags". In "Min:" put in N7:1. In "Max:" put in N7:2. Apply/Close. What we should observe when we run this is that the bar graph always stays half filled (Yes I know we could just show a graphic which represents 50% (not dynamic), but my goal builds upon this concept, so let's continue)
When I observe this in run mode in studio, and on the client, is that as i change the SP in the PLC, the bar graph does not always stay only 50% filled. If I bring up another display, and then come back to this display, then it shows correctly. It's almost as if this "read from tags" animation only is updated when the display opens.
Other things to note... I'm putting a scale to the left of these 2 bar graphs. It has 3 major ticks, and 1 minor tick. I have text with tags inserted on the top major tick (N7:2). On the middle tick (N7:0 the SP) and N7:1 on the lower tick. Of course these update just fine, always showing the SP (N7:0) on the middle tick. And the other ticks updating their +/- 10. The left bar graph for the PV, I have it with the same "read from tags" on it's Animation/fill "Expression Range / Read from tags". I have the PV tag in the fill expression. This bar graph acts like the SP one, only updates and scales correctly when the window is opened.
Right now, my only "work around" is to have the operator change graphics, and then come back to this one, right after he/she makes a SP change.