Shared with Other Embedded Mimics
Each embedded Mimic has a Shared with Other Embedded Mimics setting that defines how ViewX loads the embedded Mimic into memory:
- If Shared with Other Embedded Mimics is enabled (selected), ViewX loads a single version of the embedded Mimic into memory. This version is then used as the ‘definition’ (source) for every instance of that embedded Mimic on the Mimic.
Example:
This Mimic has three instances of the same embedded Mimic. The embedded Mimic represents a pump.
Only one copy of the definition for the embedded Mimic is loaded into memory—the three instances of the embedded Mimic use the same definition. This reduces the amount of memory used by the Mimic.
- If Shared with Other Embedded Mimics is disabled (cleared), ViewX loads a separate ‘definition’ of each embedded Mimic into memory. This means that every embedded Mimic is unique and is not affected by changes to other instances of the same embedded Mimic.
For example, let’s say you have a Mimic that contains six embedded instances of a ‘Pump’ Mimic, and these embedded Mimics are only used as graphical aids (they have no animations). If the Shared with Other Embedded Mimics setting is enabled, it means ClearSCADA can load 1 ‘definition’ of the ‘Pump’ Mimic into memory and then use that single ‘definition’ for the six of the embedded Mimics. This reduces the amount of memory required and so makes performance more efficient. However, if the Shared with Other Embedded Mimics feature is disabled, ClearSCADA has to load six ‘definitions’ of the ‘Pump’ Mimic into memory - one for each embedded instance of the ‘Pump’ Mimic. This requires extra memory and so is less efficient.
By default, embedded Mimics have Shared with Other Embedded Mimics enabled (selected). This is because of the performance benefits gained by sharing, and also because many Mimics are not affected by sharing a single Mimic loaded into memory.
However, there are certain types of embedded Mimic that require the Shared with other Embedded Mimics setting to be disabled. These include embedded Mimics that use buttons and hover features, as these features require an individual ‘definition’ of an embedded Mimic to be loaded into memory (for each instance of that embedded Mimic).
We recommend that you only disable the Shared with other Embedded Mimics setting if your embedded Mimic:
- Uses Hover animations
Embedded Mimics that use hover animations need to be loaded individually, which means the Shared with Other Embedded Mimics needs to be disabled. The reason for this is that if a Mimic contains multiple instances of an embedded Mimic that uses Hover animations, the embedded Mimics need to have individual ‘definitions’ in memory. If they were to share the same ‘definition’, activating the Hover animation on one of the embedded Mimics would also cause the Hover animation to become active on the other instances of that embedded Mimic.
When the Shared with Other Embedded Mimics setting is disabled, ViewX loads separate ‘definitions’ of the embedded Mimic into memory. This allows the Hover animations of the embedded Mimics to work individually (activating the Hover animation on one instance of the embedded Mimic will have no affect of the Hover animation of another instance of the embedded Mimic).
- Contains button objects that have animations
Embedded Mimics that have buttons with animations need to be loaded individually, which means the Shared with Other Embedded Mimics setting needs to be disabled. The reason for this is similar to the situation with embedded Mimics that use Hover animations (described above); if the embedded Mimics are shared, the animation on one instance of the embedded Mimic applies to each instance of the embedded Mimic. By disabling the Shared with Other Embedded Mimics setting, you set ViewX to load separate ‘definitions’ of the embedded Mimic into memory. This means you can use the buttons on each instance of the embedded Mimic individually.
For example, let’s say a Mimic is configured to represent a power switch and LED light. The Mimic is named ‘Power LED’ and is configured so that it has animations—when the buttons are pressed, they change appearance, the color of the ‘Power LED’ changes and a value is written to a point. This ‘Power LED’ Mimic is then embedded twice onto another Mimic (named ‘Controls’). Both of the embedded ‘Power LED’ Mimics are configured to have the Shared with Other Embedded Mimics setting disabled. This sets ViewX to load 2 ‘definitions’ of the ‘Power LED’ Mimic into memory when the ‘Controls’ Mimic is displayed.
As the embedded ‘Power LED’ Mimics do not share the same ‘definition’ in memory, selecting an animated button on one of the embedded Mimics has no effect on the other embedded ‘Power LED’ Mimic. So the animated buttons can be selected independently on each embedded Mimic.
If the Shared with Other Embedded Mimics setting had been enabled, only one ‘definition’ of the embedded ‘Power LED’ Mimic would be loaded into memory. This would mean that if you selected ‘Power LED’ button on one of the embedded Mimics, the ‘Power LED’ button on the other embedded Mimic would also be selected.
- Uses indirect tags that reference parameters.
If the Mimic you are embedding uses indirect tags that reference parameters, you should disable the Shared with Other Embedded Mimics feature. This will help to prevent slow performance, which can occur when the underlying list of OPC tags are frequently changing.
Mimics are redrawn whenever there is a change to a value, including the value of a Mimic parameter. For this reason, it is vital that the Shared with Other Embedded Mimics setting is disabled for embedded Mimics that use indirect tags that reference Mimic parameters. This is because each instance of the embedded Mimic can be set to have a different source item for the Mimic parameter, and so if the ‘definition’ is shared, ViewX will have to continuously redraw the Mimic as it animates each embedded Mimic.
Example:
A Mimic named ‘Overview’ contains two instances of an embedded Mimic named ‘Valve Display’. The ‘Valve Display’ Mimic is configured to show the current value of [Parameter A] and, when embedded, has its Shared with Other Embedded Mimics setting enabled.
On the ‘Overview’ Mimic, the first instance of the embedded ‘Valve Display’ has its [Parameter A] associated with a database point named ‘1AC’. The second instance of the embedded Mimic has its [Parameter A] associated with a database point named ‘Control C1’.
When ViewX draws the ‘Overview’ Mimic, it has to draw both of the embedded Mimics.
ViewX draws the first instance of the embedded Mimic and creates a new OPC Tag for the ‘definition’ of the embedded Mimic. The new OPC tag is added to the OPC Group list of tags for the ‘Overview’ Mimic. The OPC Group list also contains the reference for the value of [Parameter A], in this case, ["1AC"+ '.'CurrentValue'].
When ViewX draws the second instance of the embedded Mimic, a different reference has to be used for the value of [Parameter A] because the second embedded Mimic is associated with the ‘Control C1’ point. This means ViewX overwrites the OPC Tag for the ‘definition’ in memory - the OPC Tag now has ["Control C1"+ '.'CurrentValue'] instead of ["1AC"+ '.'CurrentValue']. As the parameter value has changed, ViewX has to redraw the Mimic, and so rewrites the parameter as ["1AC"+ '.'CurrentValue'] and then has to overwrite it with ["Control C1"+ '.'CurrentValue'] again. This continues for as long as the ‘Overview’ Mimic is displayed and can cause slow performance.
If a Mimic contains many instances of embedded Mimics that are configured in this way, it can place a high load on the server and cause slow performance. This is because ClearSCADA is having to update and redraw the Mimic and embedded Mimics constantly.
If the embedded ‘Valve Display’ Mimics have their Shared with Embedded Mimics settings disabled, the Mimic places far less load on the server. This is because if the embedded Mimics have individual ‘definitions’ loaded into memory, ViewX will create a new OPC Tag for each ‘definition’ rather than create, and continuously overwrite, a single OPC Tag for a shared ‘definition’. As the ‘definition’ is not shared and continuously overwritten, there is less load on the server (but the Mimic will use up more memory).
For maximum Mimic performance, you should configure the Embedded Mimic Cache Size setting so that it is large enough to store the embedded Mimics on a Mimic. For more information on how to manage the cache size, see Miscellaneous Options for ViewX Clients.
To change the Shared with Other Embedded Mimics setting, display the Embedded Mimic Properties window (see Editing an Embedded Mimic), then:
- Select the Shared with Other Embedded Mimics check box to set the embedded Mimics to share a single ‘definition’. Only one ‘definition’ of the embedded Mimic will be stored in memory. This is the default setting but is inappropriate for some Mimics as it can cause slow performance (see below).
- Clear the Shared with Other Embedded Mimics check box to set the embedded Mimics to use individual ‘definitions’. A separate ‘definition’ will be loaded into memory for each individual instance of an embedded Mimic. For optimal Mimic performance, you should clear the Shared with Other Embedded Mimics check box for embedded Mimics that use:
- button animations
- hover animations
- indirect tags that reference Mimic parameters.
If your embedded Mimics have no button animations, hover animations or tags that reference Mimic parameters, you should select the Shared with Other Embedded Mimics check box. Disabling the Shared with Other Embedded Mimics feature for such embedded Mimics could cause slow performance.
The Share with other embedded Mimics setting only affects ViewX memory usage—it does not affect the storage of Mimics in the server.