800xA 5.1-4 -- Creating a static reference to parent object with Expression Editor and PG2 Graphic Builder
ISSUE: I'm attempting to create an aspect (Graphic Element PG2) under a Generic OPC Object with an array of indicators to indicate if a controller is in alarm and what alarms are occurring. For each indicator I used a rectangle to indicate the state of each alarm using the follow code in the [FillColor] field:
if AlarmList1 = True then
This works fine for the first object, but when I copy the aspect to another object the new aspect pulls the original object's reference information to the [FillColor] field. As seen below:
if ACT020:AlarmList1 = True then
DESIRED BEHAVIOR: I would like the AlarmList1 to be statically referenced in any subsequent copies of the aspect. The control connection has the same alarm arrays for all actuators. I would prefer not to place the aspect in the Object Library because there are so many Generic OPC Object's in the project.
Voted best answer
Well the "official" answer is "Late Binding" but late binding is so horribly broken that the performance of your graphics will suffer. So dont use late binding.
When you build solutions in the object type structure, the aspect needs to be placed on the PARENT, and reference the child. This way all the references remain static and are properly resolved when the aspect is added to a graphic. You can still do most of the display elements on the child object, but use a display link or wrapper aspect on the parent that then links to the child. Put the parent aspect on the graphic.
When you copy / paste and aspect between different places in the control structure the PG2 does not resolve in the same way that VB graphics used to. As you see, it keeps the reference to the original source. You need to use the display reference tool, or edit the graphic and change all the references manually.
Im guessing from your variable names and requirement for lots of third party OPC that this is a QCS system ? The standard QCS Aspects really should be sufficient for everything that you want to do.
Seriously, ABB need to urgently address just why late binding performance is so awful.