Configuration Items Affected by Scope
The majority of configuration items affected by scope are either variables, or associated with variables. Some have a Scope property, others inherit the scope from the variable with which they are associated.
Variables
The scope of both variables is defined by its Scope property. The scope affects how a variable's value, timestamp and quality (VTQ) are distributed.
- If the scope is Shared, then the VTQ will be the same for all sessions opened on that station and it is distributed across stations according to the variable's server and client lists.
- If the scope is Local Station, then the VTQ exists on each running station and is managed locally. The VTQ will be the same for all sessions opened on a given station, and the same variable may have another VTQ on another station.
- If the scope is Session Context, then the VTQ exists inside a Session. The VTQ will be different in different sessions on a given station.
- If the scope is Client Context, then the VTQ exists inside a Client Context. The VTQ will be different in different client contexts, even if attached to the same session.
Variables support all four scopes. HMI variables cannot be distributed across stations, they only support Session Context, Client Context and Local Station scopes.
For information about how scope affects other variable properties and behaviors, see the topic Properties common to all variable types.
Alarm synthesis
The scope of an alarm synthesis is automatically defined using the following rule:
- If the property Take the applied population into account is ticked, then the scope is set to Session Context because the currently applied population can be different from one session to the other.
- If one or more alarms in the synthesis are of scope Session Context, then the scope is set to Session Context.
- Else, the scope is set to Shared.
The scope of all result variables are inherited from the alarm syntheses.
If a population is modified in a session then alarm syntheses with the scope Session Context automatically take this into account.
Events
The scope of an event is inherited from the triggering variable.
- If the scope of the triggering variable is Shared, then the event triggers an action in all sessions of all stations defined in server list of the variable on which it is triggered.
- If the scope of the triggering variable is Local Station, then the event triggers an action in all sessions of the station where the condition is true.
- If the scope of the triggering variable is Session Context, then the event triggers an action only inside the session handling the event, on the station handling the session.
- If the scope of the triggering variable is Client Context, then the event triggers an action only inside the client context handling the event, on the station handling the session corresponding to the client context.
The scope of an event action created by SCADA Basic is inherited from the execution context.
It is not possible to delete a session context or client context event from a different session.
Cyclic actions
The scope a cyclic action created by configuration is defined by its Scope property.
The scope of a cyclic action created by SCADA Basic is inherited from the execution context.
It is not possible to delete a session context or client context cyclic from a different session.
SCADA Basic functions
The scope of a SCADA Basic function is inherited from the context it is called from. It can have Session Context, Client Context or Local Station context.
- When a function is run from an animation, its context is inherited from the mimic context (Client Context or Local Station).
- When a function is run from an event, its context is inherited from the scope of the variable from which the event is triggered.
- When a function is run from a cyclic action, its context is inherited from the cyclic action scope.
- When a function is run from the SCADA Basic program manager, Timetable or Function key, its context is Local Station.
Working variables declared in the SCADA Basic global program have a Local Station scope. Be careful using this type of variable with WebVue as the value will be the same for PcVue station that is the web back end and all connected WebVue instances.
Expressions on variable
The scope of an expression is inherited from the result variable. If one or more variables in an expression are of scope Session context or Client context, the scope of the result variable must match.
Sql queries
The scope of a Sql query is used to control the distribution of the Sql query results across user sessions, allowing shared data to be processed in any user context and preventing user-specific data to be accessible to other user sessions.
When using Sql variable mapping, the scope of the Sql query and the scope of the mapped variables must match. The scope of the Sql query also constrains the scope of variables that can be used as input parameters.
Mimics
The scope of a mimic is always inherited. It can be either Client Context or Local Station.
- When a mimic is opened from PcVue, its context is Local Station.
- When a mimic is opened from WebVue, its context is Client Context.
- When a mimic is opened from another mimic, its context is the same as the one calling it.
- When a mimic is open by SCADA Basic, its context is that of the calling SCADA Basic function.