Overview: STEP 7 Basic, WinCC Basic, and the S7-1200 HMI Stack
STEP 7 Basic is the engineering component of the Siemens TIA Portal that covers the SIMATIC S7-1200 controller and the SIMATIC Basic Panel HMI family. Panels such as the KTP400 Basic, KTP600 Basic, KTP700 Basic, KTP900 Basic, and KTP1200 Basic are configured inside the same TIA Portal project as the PLC and run the WinCC Basic runtime image. Because WinCC Basic is the entry-level HMI runtime, its feature set is intentionally restricted compared with WinCC Comfort/Advanced/Professional, and that is the root reason the scripting question arises so often.
This reference consolidates the two recurring engineering questions on this stack:
- What scripting capability does a Basic Panel actually expose, and what is the closest substitute for a C or VBS script?
- What is the maximum cable distance between an S7-1200 CPU and a Basic Panel, and how is that distance extended?
Scripting in WinCC Basic: What Exists and What Does Not
The WinCC Basic runtime (loaded on KTP Basic panels) does not include a VBScript or ANSI-C interpreter. There is no project node analogous to the "Scripts" folder that WinCC flexible, WinCC Comfort/Advanced, or WinCC Professional expose. If the application genuinely requires procedural scripting, the project must be migrated to a Comfort Panel (WinCC Comfort) or a PC-based runtime (WinCC Runtime Advanced / Professional). Both Comfort Panels and WinCC Runtime Advanced execute full VBScript with a documented object model (HmiRuntime, Tags, Screens, SmartTags); WinCC Runtime Professional additionally supports C scripts.
Available Substitution Mechanisms on Basic Panels
Basic Panels replace scripts with three engineering constructs that, combined, cover the majority of what a WinCC flexible user would have scripted:
| Mechanism | Where Configured | Typical Use | Example |
|---|---|---|---|
| System functions | Event of a button, value change, screen change, scheduled task | Bit operations, screen navigation, user logon/logoff, logging |
SetBit, ResetBit, ActivateScreen, LogOff, IncreaseTag
|
| PLC-tag-driven events | Property of an HMI tag | Reaction to PLC state changes without a button | Set value event → SetBit("DB1.DBX0.0")
|
| Local scripts are NOT available | — | Replace with logic in the S7-1200 CPU | Use SCL or ladder in the PLC, expose result to a tag |
Mapping Common WinCC flexible VBS Patterns to STEP 7 Basic Equivalents
| WinCC flexible VBS Pattern | Basic Panel Equivalent |
|---|---|
SmartTags("Tag1") = 1 |
Use a button's "Press" event with system function SetTag or directly set a PLC tag |
HmiRuntime.ActiveScreen = "Screen_2" |
System function ActivateScreen("Screen_2", 0)
|
HmiRuntime.Logoff |
System function LogOff
|
| User-defined calculation in script | Write an SCL function block on the S7-1200; expose the result tag |
| Scheduled VBS trigger | Scheduled task (Basic Panels support a small set of recurring tasks) calling system functions |
Confirming the Feature Set of Your Specific Panel
The feature matrix changes between TIA Portal versions and panel firmware revisions. Before commissioning, always cross-check the HMI features list published by Siemens for the exact panel order number (e.g., 6AV2 123-2DB03-0AX0 for a KTP700 Basic). The legacy reference list is the FAQ entry ID 40227286 in the Siemens Industry Online Support. Treat this document as the authoritative source, since feature availability such as number of tags, number of screens, alarms, and logging changes between Basic Panel generations.
When You Truly Need Scripts: Upgrade Path
If a project requires VBScript or ANSI-C, the most economical migration path is to replace the Basic Panel with a Comfort Panel that uses WinCC Comfort, which is a separate installation step in the TIA Portal setup. The wire-level connection to the S7-1200 is unchanged: the Comfort Panel still talks PROFINET over the same industrial Ethernet cable. Configuration of screens, tags, and alarms is largely preserved, with Comfort panels exposing a richer property tree and the "Scripts" editor that the project requires.
The alternative is to upgrade the runtime tier entirely to WinCC Runtime Advanced on a PC, which preserves the entire script object model and adds support for OPC UA and additional drivers.
PROFINET Cable Length Between S7-1200 and a Basic Panel
The S7-1200 PROFINET interface and every Basic Panel PROFINET interface are 100 Mbit/s copper Ethernet ports compliant with IEEE 802.3 100BASE-TX. The physical layer is therefore governed by the same rules as any industrial Ethernet segment.
Maximum Length per Copper Segment
| Parameter | Value | Notes |
|---|---|---|
| Maximum copper segment length (device to device) | 100 m | Applies when both devices share the same equipotential bonding (earth) plane |
| Cable category | Cat 5e / Cat 6 / Cat 6A | PROFINET cable types A, B, and C cover industrial variants |
| Recommended cable for fixed installation | PROFINET Type C (FC) | Solid conductor, max 100 m, no movement |
| Recommended cable for flexible installation (drag chain) | PROFINET Type C (flex) | Verified for continuous flex, still max 100 m |
| Maximum number of devices per segment | 2 (point-to-point) when using the standard 100 m rule | Switches add segments |
Why Exactly 100 m
The 100 m limit is not a Siemens-specific number; it is the IEEE 802.3 100BASE-TX reach, derived from worst-case signal attenuation (24 dB insertion loss budget), round-trip propagation delay, and timing jitter. PROFINET Type C cable is engineered so that 100 m of horizontal run between two devices leaves margin for two patch cords (typically 5 m each) within the channel. Exceeding 100 m on copper violates the standard and produces bit errors, retransmits, and intermittent PROFINET alarms that are very hard to diagnose.
Shared Earth Requirement
The 100 m figure assumes both endpoints are tied to the same equipotential bonding network. If the panel and the PLC are in different building sections with separate ground rods, you must add an equipotential bonding conductor or use fiber. Otherwise, ground potential differences inject common-mode noise that destroys Ethernet signaling well before 100 m, and the link will fail or report excessive CRC errors.
Extending the Distance: Switches and Optical Fiber
The PROFINET specification explicitly supports the use of switches as infrastructure elements. Each switch port restarts the 100 m counter, so a panel can sit on the far side of a managed PROFINET switch located anywhere in the topology. Two practical extensions are common:
- Copper cascaded switches: place an unmanaged or PROFINET-conformant managed switch every 100 m. Total copper distance can reach several hundred metres, but each additional switch adds roughly 10 µs of latency. With a 1 ms PROFINET update time this is normally irrelevant; with isochronous (IRT) applications it must be budgeted.
- Optical fiber media conversion: a copper-to-fiber media converter at each end turns the run into a 100BASE-FX or 1000BASE-SX/LX link. Distances of 2 km (multimode) to 10 km or more (singlemode) become feasible with matching SFPs. For long factory runs, this is the only robust solution.
Wiring and Electrical Checks Before Power-On
- Verify the panel order number matches the TIA Portal configuration; the same physical KTP700 can ship as Basic, Comfort, or DP variants.
- Use shielded PROFINET cable with the drain wire bonded to the metallic D-sub or M12 connector shell at both ends.
- Confirm 24 VDC power supply is within the panel's specified range (typically 19.2 V to 28.8 V) and that the supply can deliver the panel's inrush current (often 2× nominal for a few milliseconds).
- Configure the panel's PROFINET device name and IP address to be on the same subnet as the S7-1200 CPU. Use the TIA Portal "Devices & Networks" editor and the "Online > Accessible devices" function to validate.
- Assign the panel as a PROFINET IO device on the S7-1200's PROFINET interface; the panel becomes a node under the S7-1200 IO controller.
Step-by-Step: Building a "Script Substitute" in a Basic Panel Project
The following procedure shows how to implement behaviour that a WinCC flexible developer would normally write in VBS, using only the tools available in STEP 7 Basic. The example starts a motor from a button and writes a derived runtime tag back to the PLC.
- Open the TIA Portal project and add the S7-1200 station.
- Add the Basic Panel to the project and assign it to the same PROFINET subnet as the CPU.
- In the PLC, create two tags in a global DB:
"Motor_Cmd"(Bool, output to HMI) and"Motor_RunTimeSec"(DInt, input from HMI). - In the HMI tag table, expose the same two tags as HMI tags.
- Add a button on the HMI screen. In its "Click" event, drop the system function
SetBiton the tag"Motor_Cmd". - Add a second button for stop, using
ResetBit. - On the same screen, add an IO field bound to
"Motor_RunTimeSec". The runtime value is computed entirely in the S7-1200 (e.g., in an SCL FB that increments the timer whenMotor_Cmdis true). - Compile the HMI and the PLC; download both to their devices.
- From the panel, click the button and verify the PLC tag toggles and the runtime counter advances.
This pattern illustrates the cardinal rule: scripts live in the PLC; the HMI is the dashboard. Trying to keep logic in the HMI on a Basic Panel is the most common cause of projects that hit a hard wall.
Verification Checklist After Commissioning
| Check | Tool | Expected Result |
|---|---|---|
| PROFINET link LED on both devices | Visual inspection | Solid green / steady link indication |
| Accessible devices in TIA Portal | Online → Accessible devices | Panel visible with configured IP and PROFINET name |
| Diagnostics buffer of S7-1200 | Online → Diagnostics | No PROFINET station failure entries |
| HMI diagnostics window on the panel | System → System information | Connected to PLC, no alarms |
| Tag live value test | HMI screen with a connected tag indicator | Tag value updates within 1 update cycle |
| Round-trip time for a forced bit | Watch table in TIA Portal + button event | Visible within the configured PROFINET update time |
Troubleshooting Matrix
| Symptom | Likely Cause | Remediation |
|---|---|---|
| Panel reports "Connection to PLC interrupted" | PROFINET name mismatch, IP subnet mismatch, or cable > 100 m on copper | Re-assign PROFINET device name; verify IP/subnet; reduce cable run or insert a switch |
| Link LED on the panel is off | Cable damage, swapped pairs, or panel not powered | Re-terminate using T-568B; verify 24 VDC at the panel terminals |
| Intermittent communication, CRC error counters rising | EMC interference or equipotential bonding issue | Bond shield at both ends; verify common earth; reroute away from VFD output cables |
| Cannot find "Scripts" folder in the HMI node | Basic Panel does not support scripts | Replace with Comfort Panel or move logic into the S7-1200 |
| Button event has no effect on a PLC tag | Tag mapping is one-way or read-only on the PLC side | Mark the PLC tag as accessible from HMI (PUT/GET or absolute addressing) |
| Project compiled fine but panel shows old screens | HMI image not transferred after download | Mark "Overwrite all" or "Reset and transfer all" during HMI download |
Field-Proven Caveats
- The 100 m copper limit is the segment limit, not the total plant distance. A panel 350 m away is fine if you use two managed switches with fiber between them, but it is not fine on a single 350 m copper run.
- Basic Panel firmware revisions are tied to specific TIA Portal versions. Upgrading TIA Portal may require upgrading the panel firmware; check the TIA Portal release notes before changing the engineering environment.
- PROFINET is deterministic by configuration, not by default. If the panel must update at a guaranteed cycle, set the PROFINET update time on the IO device properties of the panel rather than leaving it at automatic.
- When migrating from a working WinCC flexible project on an older panel, the conversion to TIA Portal may lose scripts silently. Always audit the converted project for empty or converted script nodes before commissioning.
Summary
STEP 7 Basic and WinCC Basic intentionally omit user-defined scripting to keep the runtime small and deterministic. Replace VBS logic with a combination of system functions, tag events, and PLC-resident logic in the S7-1200. If scripting is unavoidable, move up to WinCC Comfort on a Comfort Panel or WinCC Runtime Advanced on a PC. For physical reach, the S7-1200 and Basic Panel together observe the standard 100 m copper PROFINET segment limit, which can be extended through additional switches and optical fiber media converters without changing the panel runtime or the engineering workflow.
Does STEP 7 Basic support VBScript or C scripts on a Basic Panel?
No. The WinCC Basic runtime on KTP Basic panels does not include a VBScript or C interpreter. Replace scripts with system functions (such as SetBit, ActivateScreen, LogOff) and PLC logic on the S7-1200. Use a Comfort Panel with WinCC Comfort or a PC runtime if scripting is required.
What is the maximum Ethernet cable length between an S7-1200 and a Basic Panel?
100 m per copper segment when both devices share the same equipotential bonding. PROFINET Type C cable is the standard choice. Beyond 100 m, insert a managed switch to start a new segment or use a copper-to-fiber media converter for runs of kilometres.
Can I use WinCC flexible to program a Basic Panel connected to an S7-1200?
No. WinCC flexible does not configure the Basic Panel line; Basic Panels are configured exclusively in TIA Portal with WinCC Basic. For an S7-1200 with a non-Basic HMI, use a Comfort Panel configured with WinCC Comfort in TIA Portal.
Why does my panel drop the connection intermittently on a long cable run?
The most common causes are a copper run over 100 m without a switch, missing equipotential bonding between the panel and the PLC cabinet, or EMC interference from a VFD output cable routed in parallel. Re-measure the run, install a switch or fiber media converter, and verify the shield is bonded at both ends.
How do I confirm which features a specific Basic Panel supports?
Cross-check the HMI feature matrix in the Siemens Industry Online Support FAQ ID 40227286 and the manual for the exact panel order number. Feature counts (tags, screens, alarms) and firmware capabilities vary between Basic Panel generations and TIA Portal versions.