IMDTouchKnowledge BaseShop main store

How-to

Connecting a WinCC flexible 2005 Tag to STEP 7 PLCSIM

HMI and touchscreens Published 7 min read By IMDTouch engineering team

Short answer

The order you used is correct: STEP 7 5.3 first, WinCC flexible 2005 second, and SP3 for STEP 7 5.3 last, so no reinstall is needed. Define MD 4 as an external tag on the connection to the simulated controller, marker memory, byte offset 4, 4-byte integer, then force a value in PLCSIM and confirm the HMI follows it.

On this page
  1. The install order rule, and what your list already got right
  2. Build the connection to the simulated controller
  3. Define MD 4 as an external tag
  4. Proving MD 4 with 1000 decimal forced in PLCSIM
  5. When the value arrives but reads wrong
  6. Questions asked

Your install order is already the correct one: STEP 7 5.3 first, WinCC flexible 2005 second, and SP3 for STEP 7 5.3 last. Nothing needs reinstalling. What blocks this link is almost never the sequence; it is the connection and the tag. Create a connection entry for the simulated controller in the HMI project, define MD 4 as an external tag on that connection — marker memory, start address byte 4, 4 bytes wide, integer type — and prove it by forcing a value into the double word from STEP 7 and watching the HMI follow it. A display that shows the number once is not proof; a forced change the HMI tracks is. The sections below give the install-order rule and its reason, the connection steps, the tag settings, a worked example on the simulated CPU, and the two fault branches when a value arrives but reads wrong.

The install order rule, and what your list already got right #

The sequence for this generation is fixed: controller tool first, HMI engineering tool second, controller service pack last. Here that reads STEP 7 5.3, then WinCC flexible 2005, then SP3 for STEP 7 5.3, which is exactly the order already on the machine. The reason sits in what the pack does: SP3 refreshes the components the two products share, and it can only refresh components that are already installed. Applied before the HMI tool, the shared components it touches are not there yet; applied after, both products finish on one service level.

Before testing anything, read the versions back off the machine. The engineering tool should identify itself as WinCC flexible 2005 and the controller tool as STEP 7 5.3 with the service pack applied. If the machine shows a different service level, bring it to the baseline the simulation documentation for these releases assumes before the tag is touched. Decision: the install list is right, so close the installer and spend the time on the connection and the tag instead — reinstalling in the same order changes nothing.

Build the connection to the simulated controller #

PLCSIM exists for exactly this job: it simulates a PLC so the HMI device can be tested without the real controller, and the HMI connects to it the way it would connect to hardware. Build the path in this order:

  1. Open the controller project in STEP 7, download it to PLCSIM, and leave the simulated CPU in RUN.
  2. Go online from STEP 7 and monitor MD 4 before the HMI is involved. If online monitoring shows nothing, the engineering-to-simulator path is the fault, and no HMI setting will repair it.
  3. In WinCC flexible 2005, create the connection entry for the simulated controller and select the controller family that matches the project loaded in the simulator. A connection defined for a different family acquires nothing, however correct the tag address is.
  4. Point that connection at the simulated CPU over the same route the engineering station uses for its own online link, and make it the only connection in the test project so a stray second connection cannot take the tags.

Connection mechanics moved between product generations. Classic WinCC reaches PLCSIM through the S7Online access point, which is the route described in Connecting WinCC to PLCSIM Through the S7Online Access Point. The WinCC flexible 2008 SP3 generation changed the steps again, and its own path is covered in How to Simulate a PLC Behind WinCC Flexible 2008 SP3. The principle carries over; the concrete fields do not, so keep the flexible 2005 documentation open while the connection is defined.

Define MD 4 as an external tag #

MD 4 names a marker double word: the M selects marker memory, the D makes the operand four bytes wide, and the 4 is the number of its first byte, not a count of bytes. The external tag must mirror that on the HMI side, and the runtime tag status will confirm or refute each setting in the table:

Setting Required for this test What a mismatch does
Connection the simulated-controller connection from the steps above an internal tag never reaches controller memory
Memory area marker a different area returns unrelated data or an access error
Start address byte 4 a different offset selects different or overlapping bytes
Width 4 bytes a narrower tag reads only part of the double word
Data type the type the program stores, for example a signed 32-bit integer the same bits decode as a different number

Set the data type from what the program stores, not from the letters in the operand: a signed 32-bit integer and a 32-bit floating-point value fill the same four bytes and decode them into different numbers. Enter the address through the fields the installed connection driver offers, because the controller-side operand notation is not necessarily a complete HMI address entry. An external tag is also the general mechanism for carrying panel-side data into controller memory, and the S7-400 external tag walkthrough shows the same write path against a data block.

Proving MD 4 with 1000 decimal forced in PLCSIM #

The tag simulator built into the engineering tool does not belong in this proof: it invents values on the panel side and never opens the connection to the simulated CPU, so a screen that passes under it proves nothing about the marker double word. Run the runtime simulation on the engineering PC with PLCSIM holding the downloaded project, so the tag acquisition actually crosses the connection driver.

Inputs for the example:

  • Operand MD 4, the tag from the question.
  • Width 4 bytes, one marker double word covering bytes 4 through 7.
  • Test value 1000 decimal, an example value chosen only because the test program leaves it alone; substitute anything your program does not overwrite.
  • Tag type signed 32-bit integer, displayed in plain decimal without scaling.

The rule: a marker double word spans the four consecutive marker bytes its name begins at, and the proof is a forced change inside that span crossing the connection into the HMI. The arithmetic: the span ends at byte 4 + 4 - 1 = 7, so MD 4 covers MB 4, MB 5, MB 6 and MB 7; 1000 decimal is hexadecimal 03E8, and big-endian byte order splits it as MB 4 = 00, MB 5 = 00, MB 6 = 03, MB 7 = E8, which checks out as 3 × 256 + 232 = 768 + 232 = 1000.

  1. From STEP 7 online, write 1000 into MD 4 through a monitor and modify table on the simulated CPU.
  2. Watch the HMI display reach the written value within its acquisition cycle, then write a second value and watch the display follow it.
  3. Leave both running for a minute: a value that changes on its own has a cyclic writer in the program, not a connection fault.

Result: the display reads the forced value and follows every later change, which shows the bytes the STEP 7 monitor sees and the bytes the tag reads are the same storage. Decision: the link is proven, and it stays proven while the simulated CPU runs. One safety note: do this on a bench copy of both projects, because writing marker memory from a connected runtime on a running machine writes to live outputs.

When the value arrives but reads wrong #

Read the runtime tag status before touching any setting, because it splits the fault in two. No connection, or a tag that never becomes valid, points at the transport: the connection definition, the simulator state, the route. A valid tag showing the wrong number points at interpretation, and it hides in four places:

  • Data type first. Integer bytes read through a floating-point tag show a number near zero instead of the forced value, so fix the type before the address.
  • Address overlap second. Any operand reaching into marker bytes 4 through 7 writes the same storage as MD 4: MW 4 and MW 6 sit inside the span, as do the single markers MB 4 to MB 7. A forced value that moves by itself has a cyclic writer, which is project logic and not a communication fault.
  • Execution state third. The simulated CPU must be in RUN for program-driven changes; a stopped program leaves memory readable but frozen.
  • Display format fourth. Number format, decimal places and scaling live on the screen object as well as on the tag, so a correct tag can still show a wrong-looking number.

Confirm as well that runtime is executing the latest compiled HMI project, since a stale runtime reproduces yesterday's fault exactly. The data-type failure has a documented cousin in why an HMI writes the wrong PLC value above 9. Decision rule for every case: invalid tag or no connection, repair the connection; valid tag with a wrong number, work through type, overlap, execution state and display format, in that order.

Questions asked

Does SP3 for STEP 7 5.3 go on before or after WinCC flexible 2005?

After. The service pack refreshes the components the controller tool and the HMI engineering tool share, so the sequence is STEP 7 5.3, then WinCC flexible 2005, then SP3. That is the sequence already on the machine in the question, so nothing needs a reinstall. On a machine where the pack landed before the HMI tool, follow the pack's installation notes for putting the shared components back on one service level.

Why does the HMI show a different number from the marker double word in STEP 7?

Almost always the data type. The four bytes 00, 00, 03, E8 decode as 1000 when the tag is a signed 32-bit integer and about 1.4E-42 when the tag is 32-bit floating point. Set the tag type to match what the program stores, keep the start address at byte 4, and leave the screen object on plain decimal with no scaling.

Does the same tag definition work against the physical PLC after the simulation passes?

The address, area and type stay the same; the tag is reassigned to the connection that points at the physical CPU. Re-run the forced-value proof on a bench before the panel goes near the machine, and confirm the runtime license covers the connection type the physical link uses. The tag settings do not move; the connection and the runtime environment do.

Which operands overwrite MD 4 in the simulated CPU?

Anything that reaches marker bytes 4 through 7: the single markers MB 4 to MB 7, the words MW 4 and MW 6, and any other double word whose span crosses the range, such as MD 2, MD 3 or MD 5. A forced value that changes on its own means one of these is written cyclically by the program, which disqualifies the operand as a stable test address.

What does PLCSIM provide that a real PLC would not in this test?

It runs the controller program so the HMI has live memory to read and write, but it does not wire real sensors and actuators to it: values driven by physical inputs stay at whatever the program or your writes leave them. Cycle timing can also differ from hardware, so acquisition timing measured here is indicative. The tag-level proof carries over; hardware-dependent behavior does not.

Keep reading

  • How-to

    How to Configure WinCC 7.0 PLC Connections With STEP 7

    No. WinCC 7.0 and STEP 7 5.4 never connect to each other; each one talks to the PLC, so configure two separate paths: the S7Online access point for STEP 7, and in WinCC Tag Management the MPI channel's Logical device name set to MPI (PLSIM for simulation). Acceptance is one known PLC value displayed live with valid status.

    HMI and touchscreens

  • How-to

    Connecting WinCC to PLCSIM Through the S7Online Access Point

    WinCC exchanges external tags with an S7-300 program in PLCSIM through the MPI channel of SIMATIC S7 Protocol Suite with logical device name S7Online, station address 2 and slot number 2. The deciding point is the complete access-point route to the simulated CPU; setting PG/PC to None is installation-dependent, not a required step.

    HMI and touchscreens

  • Troubleshooting

    Why STEP 7 symbols are missing in WinCC Flexible tag lists

    New DB symbols stay out of WinCC Flexible's tag selection because the integrated project serves stale stored symbol data; rebuild, reconnect and compile do not refresh it. Save the STEP 7 project with File > Save as and the With reorganization (slow) option, open the renamed copy, and recompile the HMI configuration before any download.

    HMI and touchscreens