Access \ protection for multi-client operations

Due to the fact that it is possible to connect multiple visualization clients to one PLC (Target- and Web-Visualization), multiple clients might access data in the PLC at the same time. If this is not desired, an access protection can be defined by certain INTERn commands, so that always only one client can write the data on the PLC.

The following INTERN commands are available for restricting the write access to one client:

REQUESTWRITEACCESS

The client requests write access on the visualization.

Using the system variable CurrentWriteAccessClientId the client then can check whether it has got write access. This implicit variable stores the identification (ID) of the client which currently has write access. Each client has an unique ID “CurrentClientID”.Thus the following expression can be used to allow a certain input on a visualization:

CurrentWriteAccessClientId = CurrentClientId

Example: The expression could be used in the configuration of an element  to define its visibility : If the expression is TRUE, i.e. the client has write access, then the element is visible, i.e. allows input.

The Web-Server will check at each write request, whether the requesting client currently has write access.

RELEASEWRITEACCESS The client deallocates its write access.
GLOBALRELEASEWRITEACCESS The write access is deallocated client-independently.

Automatic \ deallocation of write access:

If during monitoring it is detected that the client which has currently write access is not connected to the PLC any longer, variable CurrentWriteAccessClientId will be set to “-1”, which means, that no client at all has write access. This also can be done via the application.