Troubleshooting
How to identify an MP377 panel in WinCC Flexible 2008 runtime
Short answer
On an MP377 running XP Embedded you can read the Windows computer name at startup with WScript.Shell and ExpandEnvironmentString. On CE Embedded there is no shell access, so give each panel a distinct Project ID or UserVersion area pointer and hold restrictive behavior until that value is valid.
On this page
- How do you tell which MP377 is running a common project?
- Can you read the computer name on an XP Embedded MP377?
- Why can't you read the panel name on CE Embedded?
- How do the Project ID and UserVersion area pointers identify a panel?
- How do you configure a distinct identity per panel?
- What happens when the identity is unknown or not yet valid?
- How do you verify the identity works after a restart?
- Questions asked
The method depends on the MP377's operating system: on XP Embedded, read the Windows computer name at startup with WScript.Shell; on CE Embedded, that lookup does not exist, so identify the panel through a controller-supplied Project ID or UserVersion area pointer, one distinct value per panel. WinCC Flexible 2008 SP1 documents both area pointers in chapter 2.4.1.6 of the runtime manual. This article gives the script for the XP branch, the area-pointer design for the CE branch, and the checks that prove either one selects the right panel profile.
How do you tell which MP377 is running a common project? #
A common project cannot know which physical terminal it is on from the screens alone, so you must feed it an identity source that differs between panels and survives a restart. On XP Embedded that source is the Windows computer name; on CE Embedded it is a value the controller writes. Pick the branch from the panel's installed operating system, never from the project name or the label on the bezel.
Panel identity here means a stable value the application uses to select panel-specific behavior such as visible screens or enabled buttons. It is not operator identity and must never grant user permissions or substitute for controller interlocks.
Can you read the computer name on an XP Embedded MP377? #
Yes. Windows Script Host is available on the XP Embedded branch, so a runtime script can create a WScript.Shell object and call ExpandEnvironmentString("%COMPUTERNAME%") to get the configured Windows computer name. Run it in the event that initializes the application or the initial screen, copy the result into an internal string tag, and show that tag on a diagnostic screen so the raw value is always visible.
For the XP Embedded branch, place this in the startup event:
Dim object
Dim computerName
Set object = CreateObject("WScript.Shell")
computerName = object.ExpandEnvironmentString("%COMPUTERNAME%")
Then compare computerName against an explicit list of approved computer names, normalizing letter case before the comparison if your project conventions do not enforce one. Before you build the mapping, check every panel for duplicate computer names: two panels with the same name cannot be told apart, no matter how the project is written. Enable panel-specific visibility or operation flags only after a recognized match, and route a blank value, an object-creation error or an unknown name to the restrictive default instead of silently assigning the first panel profile.
Why can't you read the panel name on CE Embedded? #
Because Windows CE gives the runtime no shell access, the XP script fails at the object-creation stage rather than returning a dependable identifier. Reusing the computer-name lookup on a CE Embedded MP377 produces an error, not a panel name, so treat the operating system as the first decision in the design and never run the XP branch on CE.
The CE branch takes its identity from project or controller data instead. WinCC Flexible 2008 SP1 supports the Project ID and UserVersion area pointers for exactly this kind of exchange, with their configuration described in chapter 2.4.1.6 of the runtime manual. An area pointer exchanges defined information between the HMI project and controller data, which is what makes it a usable identity source on CE.
How do the Project ID and UserVersion area pointers identify a panel? #
They work only when each terminal has its own value: a single shared Project ID or UserVersion identifies the application or controller context, not the physical panel. Allocate a distinct value, or a distinct controller data location, for every panel that needs different behavior. If every terminal would read the same number, the mechanism cannot distinguish them and the design is wrong before any code runs.
Decide which pointer fits your architecture before configuring it. The Project ID identifies the project configuration the runtime carries, while UserVersion lets you carry a version or identification value through controller data; chapter 2.4.1.6 documents what each one does. If your architecture instead assigns each terminal its own controller address, a plain controller tag holding the panel number works the same way and is often simpler to service.
How do you configure a distinct identity per panel? #
Give each panel a fixed number in the controller, read that number into an internal identity tag, and map it to the same panel-profile flags the XP branch uses. As a worked example, take three MP377 panels sharing one PLC program with an integer tag Panel_ID in the controller: panel A holds 1, panel B holds 2, panel C holds 3, and the runtime reads Panel_ID through the configured area pointer into an internal tag PanelIdentity.
Set the internal tag's default to 0, which maps to no panel profile. Configure the project so that a value of 1 enables panel A's functions, 2 enables panel B's and 3 enables panel C's, and any other value — including the default 0 — enables none of them. Both branches then write into the same profile tags, so the screens, buttons and restrictions behave identically no matter which branch selected the panel.
Trace when the value becomes valid before you trust it. Controller-supplied identity is generally not available during the first scan of the initial screen while communication is still starting, so the tag can hold its default for a noticeable time after power-up. That timing, not the value itself, is what the next section handles.
What happens when the identity is unknown or not yet valid? #
Every panel-specific function stays in its least-permissive state until a recognized identity arrives. Define three states explicitly — recognized, unrecognized and unavailable — and permit panel-specific behavior only in the recognized state. A panel that reports blank, stale or unmapped data must look and behave like no known panel, never like a privileged one.
Keep the raw diagnostic value visible on a maintenance screen so a technician can see whether the tag is still 0, carries an unmapped number, or arrived but failed the comparison. One safety note belongs here: this mechanism selects convenience functions only; machine interlocks and any safety logic live in the controller and are never relaxed or bypassed because of a panel value.
How do you verify the identity works after a restart? #
Five checks, run on the bench before the panels go back on the machine:
- On the XP Embedded branch, expect the internal tag to equal the computer name configured on that panel — never empty, and never the literal text
%COMPUTERNAME%, which means the expansion failed. - Expect a different accepted identity on every panel that uses a different profile.
- On the CE branch, expect the identity tag to stay at its default and every panel-specific control to stay restricted until controller communication delivers the configured value, then change to the intended profile.
- Substitute an unmapped value — for example force the controller tag to 9 — and expect every panel-specific function this mechanism controls to remain unavailable.
- Restart the runtime and expect the same profile to be selected without operator entry, then repeat the restart with the controller cable disconnected and expect the restrictive state to hold until valid identity data arrives.
Checks 3 and 5 catch the classic failure: testing identity only while communications are healthy, then having startup pick an unintended profile from blank or stale data on a real power-up.
If the terminal itself is aging and the repair path is a replacement project on other hardware, the same identity principle carries over — confirm what a running terminal actually executes before you rebuild its logic.
Summary of the decision #
Use WScript.Shell with %COMPUTERNAME% on XP Embedded MP377 panels, and use a distinct Project ID or UserVersion value per panel on CE Embedded, holding restrictive behavior until the identity is valid in both cases.
Questions asked
Why does my computer-name script fail on a CE Embedded MP377?
Windows CE gives the WinCC Flexible 2008 runtime no shell to talk to, so CreateObject("WScript.Shell") fails at the object-creation step instead of returning a name. The script is not wrong; the operating system simply does not offer that lookup. On CE, switch to a controller-supplied identity such as the Project ID or UserVersion area pointer.
Can panel identity replace user login and access rights?
No. The panel identity only tells the application which physical terminal is running so it can show or hide panel-specific functions. Operator authorization stays in the WinCC Flexible user administration, and machine interlocks and any safety logic stay in the controller. A renamed, replaced or misconfigured panel must never gain permissions because of where it is mounted.
What value should the identity tag have before communication starts?
Give it an invalid default, such as 0 in the worked example, that maps to no panel profile. Every panel-specific button, screen or restriction stays in its least-permissive state until the controller delivers a value that matches a configured entry. If the value never becomes valid, the panel shows the diagnostic value so a technician can see why.
Do both MP377 operating systems need different project logic?
Yes, and the operating system is the first branch in the design. The XP Embedded branch reads the Windows computer name with a script; the CE Embedded branch evaluates a controller tag through an area pointer. Both branches can write into the same internal profile tags, so the rest of the project behaves identically whichever branch selects the panel.