Understanding how to use the scope

The concept of configuration item scope, referred to as scope, mainly addresses the increasing use of web based applications. The scope of an item defines to whom its value is accessible (among users or 3rd party applications), and how its dynamic properties are shared (distributed) between stations. The scope covers the following requirements:

  • The ability to share I/O variables among stations according to the client and server lists,
  • The ability to isolate the value of a variable to a given user context so that it cannot be accessible to other users; and the ability for a given variable to have different values in different user contexts at the same time.

A property, named Scope, is used to define the behavior of configuration items that this affects: Variables, events, cyclics...

By application, we mean PcVue or any of its client applications such as WebVue, TouchVue, the Application Explorer, an authenticated OPC client, 3rd party application etc.

In all cases, user rights apply and a configuration item may not be accessible due to the user having insufficient privileges.

Available scopes

The following table lists the available scopes and behaviors. The pictures illustrate the behavior using a variable as an example.

Scope Life cycle Accessibility Value

Shared

ClosedShow picture

 PcVue instance start / stop An item's value is available to all sessions on all stations (and applications) as controlled by the client and server station lists. This was the behavior of variables configured with a server list and a client list up to version 12 (and still is). Same value in all contexts and distributed across stations.

Local station

ClosedShow picture

 PcVue instance start / stop An item’s value is managed locally on each PcVue instance and is persistent even after a user log off. Available locally to all user sessions but not distributed across stations. This was the behavior of an internal variable with no server list and no client list up to version 12. Same value in all contexts but not distributed across stations.

Session context

ClosedShow picture

Session open / close (user log in / log out) An item’s value only exists in the current session. These items are created when a user session is opened and deleted when it is closed. For example, the @USER system variable is of scope Session context and its value is different in each session. Different values for each sessions.

Client context

ClosedShow picture

Client context open / close An item’s value exists in the current client context (attached to a session). These items are created when a client context is created and deleted when the client context is deleted. For example, each tab in a web browser may have its own client context, all tabs of a given web browser instance being handled within a single session.

Different values for each client contexts even if they belong to the same session.





See the topic Configuration items affected by scope for more information and the list of item types affected by the scope.