Configuring Location-Based Operation and Client Machine Verification in PCS 7 WinCC

Configuring Location-Based Operation and Client Machine Verification in PCS 7 WinCC

In SIMATIC PCS 7 WinCC, configuring location-based operation to restrict process control actions to specific physical consoles is implemented by binding client machine identities into runtime permission scripts. While role-based security in WinCC User Administrator verifies who is logged in, location verification confirms where the operator is standing. By evaluating the local system tag @LocalMachineName or calling GetComputerName() in C-scripts, the graphic runtime compares the client's hostname against an authorized station registry tag. If the client name matches, control commands are enabled; if the client is unauthorized, actions are suppressed, and the interface displays an informative lockout message.

Table of Contents

Executive Summary

Multi-client control room environments often feature both central supervisory consoles and distributed local field operator stations. To prevent remote operators from accidentally starting equipment under local maintenance or manipulating critical valves outside their visual perimeter, plant safety policies frequently dictate that certain graphic controls must only operate from specific physical computers. Because standard WinCC permissions follow the user account rather than the computer hardware, an operator logged into any client would otherwise possess universal command authority. This article details the architecture of location-based operation in WinCC, explains the centralization of station name registers, and presents a scalable template for multi-client deployment.

Architecture and Fundamental Mechanics

Station Identity Architecture, Local vs Server Tags, and Centralized Station Authorization Registries:

  • Architecture of Local Client System Tags:
  • In a distributed PCS 7 multi-client architecture (OS Clients connected to redundant OS Servers), tags with the @ prefix possess specialized scoping rules.
  • While standard process tags are shared globally across all clients via the OS Server, @LocalMachineName is a client-local tag: each OS Client maintains its own isolated memory instance containing its physical Windows computer name.
  • This provides an unforgeable, hardware-bound identifier for the client executing the visual runtime.

  • Centralized Station Registry vs Hardcoded Scripts:

  • Hardcoding computer names (e.g. if (strcmp(szName, "RC_F3") == 0)) directly into hundreds of graphic buttons creates high maintenance overhead if a workstation is renamed or replaced.
  • The Scalable Registry Pattern:

    1. Create an internal text tag on the OS Server (e.g. Area1_Authorized_Station).
    2. On the Engineering Station or via a password-protected supervisor screen, populate Area1_Authorized_Station with the target hostname (e.g. RC_F3).
    3. In Graphics Designer, the graphic button script reads both @LocalMachineName and Area1_Authorized_Station.
    4. If @LocalMachineName == Area1_Authorized_Station, execution proceeds.
    5. If a hardware failure requires swapping the physical PC, an administrator updates Area1_Authorized_Station on the supervisor screen without recompiling or modifying graphic pictures.
  • APL Integration via Area Authorization:

  • In PCS 7 Advanced Process Library (APL), location-based control can also be reinforced using Area Authorization: assigning specific plant hierarchy areas to specific OS Clients in WinCC User Administrator, ensuring that clients outside an area cannot operate block icons within that unit.

Step-by-Step Implementation Procedure

  1. Establish Centralized Station Authorization Tags:
    * In WinCC Explorer on the Engineering Station, open Tag Management.
    * Create an internal tag:

    • Name: Station_Auth_LocalConsole
    • Data Type: Text tag 8-bit character set
    • Value: Set default value to the authorized client hostname (e.g. RC_F3).
  2. Create a Scalable C-Script Authorization Function:
    * In WinCC Explorer, open the C-Editor (Project Functions).
    * Create a new project function named CheckStationPermission.fct:
    c BOOL CheckStationPermission(char* szRequiredStationTag, int nRequiredUserLevel) { char szLocalPC[64]; char szAllowedPC[64]; GetTagChar("@LocalMachineName", szLocalPC); GetTagChar(szRequiredStationTag, szAllowedPC); // Check if local machine matches authorized station if (strcmp(szLocalPC, szAllowedPC) == 0) { // Check if user has required authorization level (e.g. Level 5) if (PASSCheckLevelPermission(nRequiredUserLevel)) return TRUE; } return FALSE; }
    * Save and compile the function.

  3. Apply Function to Graphic Buttons in Graphics Designer:
    * Open the process graphic (.pdl) in Graphics Designer.
    * Select the target control button; open Object Properties.
    * In the Miscellaneous > Operator Control Enable property, attach a dynamic C-action:
    c #include "apdefap.h" BOOL _main(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName) { return CheckStationPermission("Station_Auth_LocalConsole", 5); }
    * Set the trigger to cyclic (2 s) or tag trigger on @LocalMachineName.

  4. Provide Informative Operator Feedback on Mouse Click:
    * In the button's Mouse Click event, call CheckStationPermission.
    * If it returns FALSE, execute SSMShowMessage(lpszPictureName, "Command allowed only from assigned local station!").

  5. Save and Download Changes:
    * Save the picture and project functions.
    * Perform an OS Changes download from SIMATIC Manager.

Verification

  1. Launch WinCC Runtime across multiple OS Client stations.
  2. On non-designated client stations, observe that the button remains visually grayed out and operator input is blocked.
  3. On the designated station (RC_F3), verify that the button is active and operator clicks execute successfully.
  4. Change the value of Station_Auth_LocalConsole to a different client; confirm that authorization shifts immediately without runtime restart.

Limitations and Operational Precautions

Computer name strings are case-sensitive in ANSI C string comparisons (strcmp). Ensure that the hostname entered in the authorization tag exactly matches the case returned by the Windows operating system.

Engineer FAQ

Why should I use a tag instead of hardcoding the computer name in scripts?

Using an internal tag allows administrators to reassign authorized consoles dynamically without editing and recompiling process graphic files.

Are Windows computer names case-sensitive in WinCC scripts?

Yes, strcmp is case-sensitive. Use stricmp or ensure consistent uppercase naming across Windows and WinCC tags.

Can station-based control work together with SIMATIC Logon?

Yes. The function verifies both the physical workstation identity via @LocalMachineName and the user permission level via PASSCheckLevelPermission.

Does @LocalMachineName work over WebNavigator?

On WebNavigator clients, @LocalMachineName returns the hostname of the web client PC or terminal server session.

How do I prevent operators from modifying the authorized station tag?

Restrict editing of the internal configuration tag to supervisor screens requiring Authorization Level 6 or higher.

Technical References

Related Articles

Related Tags

  • Location-Based Operation
  • @LocalMachineName
  • Station Authorization
  • WinCC C-Script
  • PASSCheckLevelPermission
  • OS Client
  • Access Security
  • PCS 7 V9.0
20 respuestas