Explainer
Why a Comfort Panel shows only VB scripts, not C scripts
Short answer
There is no setting to enable C scripts on a Comfort Panel. The configured target decides: a Comfort Panel supports VB scripts only, while C scripts execute in WinCC Runtime Professional, the PC-based SCADA runtime. If C-script logic is required, run that part on a Professional Runtime PC target or rewrite it in VB for the panel.
On this page
A Comfort Panel shows only VB scripts because VBScript is the only runtime script language its target class supports. There is no setting, option package or firmware level that switches C scripting on for a panel. C scripts belong to WinCC Runtime Professional, the PC-based SCADA runtime that the WinCC Professional package adds, so buying WinCC Professional does not put C scripts on a Comfort Panel; it gives you a different runtime target where they do run. This article sets out which target runs which script language, what each of the four WinCC packages covers, and the decision for logic that was written in C.
The runtime target decides the script language #
In TIA Portal the Scripts editor offers what the configured HMI device can execute, not what the engineering package contains. When the device under the Scripts node is a Comfort Panel, that editor lists VB scripts only. That is the documented scripting scope for the panel class: the runtime scripting section that covers panels, Comfort Panels, RT Advanced and RT Professional lists VBScript as the runtime script language for those targets, while the C script functions and the Runtime API are documented in the online help for WinCC Runtime Professional.
Nothing on the panel counterparts that scope. No runtime settings checkbox, no license transfer and no panel firmware level turns a Comfort Panel into a C-script runtime, and the same documentation notes that local scripts are not supported on RT Advanced and panel targets. If the C script option is what you are looking for, stop searching the panel settings and read the project's device list instead: the question is which runtime target the logic is attached to.
The runtime target decides more than scripting. When the question is whether a non-panel touchscreen can serve the machine at all, Third-party touchscreen panels and the runtime target that decides applies the same target-first rule to the display hardware.
The four WinCC packages and what each covers #
The four packages line up like this:
| Package | Targets it configures | C scripts |
|---|---|---|
| WinCC Basic | Basic Panels only | No |
| WinCC Comfort | All panels | No |
| WinCC Advanced | All panels, plus Runtime Advanced on PCs and IPCs | No |
| WinCC Professional | Everything Advanced covers, plus WinCC Runtime Professional (the SCADA system) | Yes, in the Professional Runtime target only |
Every package that configures panels configures them with VBScript; C scripting enters only where the target list includes WinCC Runtime Professional. That is why installing WinCC Professional SP1 on the engineering station leaves the panel unchanged: the package adds the Professional Runtime target type to the project tree, and the panel's own runtime stays VBScript-only.
What the Comfort Panel runtime provides #
A Comfort Panel executes VB scripts attached to events: a button press, a screen load, a value change on a tag. Within those scripts you read and write tags, do arithmetic and string handling, drive screens and call the system functions the panel runtime exposes.
Two things matter when porting logic into that environment. First, scope the language before writing: What Visual Basic can and cannot do inside a WinCC project sets out the practical limits of VB scripting in WinCC projects. Second, watch tag access: SmartTags returns the cached value in a Comfort panel script whenever the acquisition mode allows it, so a read that behaved one way on a PC runtime can return a different value on the panel.
Where C scripts actually run #
C scripts execute in WinCC Runtime Professional on a PC station. Their callable functions are the API functions documented in that runtime's online help, so a C script is tied both to the Professional Runtime target and to the version of the runtime software it was written against.
The PC target type alone is not enough. A station configured as WinCC Runtime Advanced sits in the same documented scripting scope as the panels and offers VBScript, not C scripts. The C option appears in the editor only when the device is the Professional Runtime.
Splitting one machine between a panel and a PC runtime is a normal arrangement. When the direction is the other way and a PC runtime project is being consolidated onto a panel, Migrating a WinCC PC runtime project to a Comfort panel covers the move.
Worked example: twelve C scripts and one Comfort Panel #
Example, labeled as illustrative: a WinCC Professional project contains two HMI devices, one Comfort Panel and one PC station configured as WinCC Runtime Professional, and twelve C scripts arrived from an older SCADA project.
- C scripts executable on the Comfort Panel target: 0, because the panel runtime provides VBScript only.
- C scripts executable on the Professional Runtime PC station: 12, unchanged.
- Settings that enable C scripts on the panel: 0, because no such setting exists.
The arithmetic: 12 project C scripts - 0 executable on the panel = 12 scripts that must stay on the PC station or be rewritten. If a review finds six of the twelve convert cleanly to VB scripts, then 12 - 6 = 6 C scripts remain on the Professional Runtime station and the panel takes over the other six as VB scripts. No configuration step reduces those numbers; only the target assignment does.
The decision for each case #
Decision 1: the logic can stay in C. Keep it on a WinCC Runtime Professional station and leave the panel as a panel. This is the lowest-risk answer when the C code calls API functions with no VB equivalent, because nothing is rewritten and the runtime that documents those functions is the one executing them.
Decision 2: the logic must run on the panel. Rewrite it in VBScript. Map each C function to its VB equivalent or to a panel system function before writing code, keep the tag acquisition behavior above in mind, and bench-test the result before it controls the line: exercise every write on an isolated setup with verified test tags first. Scripts follow the target, so the test has to run on the panel target, not on a PC.
Bottom line: a Comfort Panel will never show the C script option, and that is documented behavior rather than a fault. Give the panel VB scripts, give a Professional Runtime PC station the C scripts, and assign every piece of logic to a target that can execute it.
Questions asked
Do the panel and the PC runtime share their tags in a mixed project?
No. Each HMI device in a WinCC project carries its own tags and its own configured connection to the controller, so a Comfort Panel and a Professional Runtime PC station both read the PLC independently. When you split logic between the two targets, either duplicate the needed tags on both devices or keep each tag on the target whose scripts use it.
Do Basic Panels lack C scripts as well?
Yes. WinCC Basic exists for Basic Panels, and the documented runtime scripting scope for panel targets lists VBScript as its script language, while C scripting is documented only for WinCC Runtime Professional. A Basic Panel target therefore behaves like a Comfort Panel here: the Scripts editor offers VB scripts, and no setting changes that.
What are the C scripts written in, and where are their functions listed?
C scripts use C syntax and call the API functions documented in the online help for WinCC Runtime Professional. That documentation lists the configuration and runtime API functions a C script can call, so before re-creating any part of a C script as a VB script on a panel, check each called function against that list to find the VB equivalent or a matching system function.
Could a service pack or firmware update ever add C scripts to a Comfort Panel?
No. Scripting support is defined by the target class, not by a version you can update. A service pack such as the SP1 release of WinCC Professional changes the engineering software on the PC, and a panel firmware update stays within the panel's documented scope. At any version, a Comfort Panel target offers VB scripts and not C scripts.