Applies To:
  • CitectSCADA 5.xx
  • CitectHMI 5.xx

I would like to know what differences are between making tag associations at runtime and design time. 

Basically they are the same. Graphics Builder is recommended to be used in ActiveX object configuration. It is very user friendly. For example, when you try to associate an ActiveX object property with a variable tag, you will be warned if their data types are different. If you choose "Yes" to ignore the warning, CitectSCADA will try to convert one type of data to another automatically at runtime. If data conversion fails, no hardware alarm will be generated.

It is also possible to use function ObjectAssociatePropertyWithTag for tag associations at runtime. When you use function ObjectAssociatePropertyWithTag for tag associations, be aware of that the function allows you to associate one ActiveX object property with more than one variable tags. If the function is called twice, for instance,

ObjectAssociatePropertyWithTag(ObjectByName("AN35"), "Size", "Tag1", "Click")
ObjectAssociatePropertyWithTag(ObjectByName("AN35"), "Size", "Tag2", "Click")

the second call doesn't overwrite the first one but append Tag2 to the update list. It ends up that

1. Both Tag1 and Tag2 are updated with value of property "Size" when event "Click" is fired.

2. Either of Tag1 and Tags changes its value, the value of property "Size" will be updated and the last one wins.

You should be also aware of that ObjectAssociatePropertyWithTag doesn't provide any warning if an ActiveX object property and its associated variable tag are different data types.

It is also noted that Graphics Builder and ObjectAssociatePropertyWithTag could be used together for tag associations. For example, some associated tags are configured at design time and some others are configured at runtime.

See also KB Articles  Q3876 and Q3889