_lock (Locking)

This config allows you to assign configs of data point elements "write protection". A config thus locked can only be modified by authorized users.

Double-clicking on the "_lock" config opens the "Data point locks" panel. All configs of the respective data point element and its current status are displayed in the column "locked". The appropriate attributes can be found in the Appendix.

When you copy a data point, the _lock config will be copied. The settings of the config will, however, not be copied.

Figure 1. Data point locks panel

Data point lock panel

  • The combo box at the top contains the data point name and its description or alias.

  • In order to lock a config click on the column Locked on No for the respective config, the entry changes to Yes and the other columns in the line are filled in.

  • The name of the manager that ordered the lock (Manager ), its number (Man Num ), and the ID and name of the user who asked for the lock are automatically filled in.

  • To complete configuration, press Close.

If a config is locked, only the locking manager may write to its attributes, while any manager may still read them. If a manager is stopped, all its locks are cancelled. Locks are not stored in the database and cannot be inherited in the data point. The _lock config cannot be deleted.

Example

You can also set a lock using a dpSet() The config to be locked is specified as the Detail:

dpSet("dp.:_lock.Detail._locked",1)

To cancel the lock:

dpSet("dp.:_lock.Detail._locked",0)

Detail is the name of the config which shall be locked or unlocked. For example:

dpSet("dp.:_lock._original._locked", 0);

dpSet("dp.:_lock._corr._locked", 0);

The _lock config exists if you create a data point and must not be created manually.

In case of redundant systems, please note that if e.g. WCCOActrl -num 1 locks a config on the first host, WCCOActrl -num 2 cannot unlock the config on the other host.