Troubleshooting
Why a simulated HMI shows hash marks, not PLC values
Short answer
Hash marks mean the simulated panel runtime is not receiving any displayable value, so treat it as a communication problem before anything else. In the Windows Control Panel of the configuration PC, set S7ONLINE (STEP 7) to TCP/IP on the adapter that reaches the S7-1200, or to PLCSIM when the PLC is simulated too. Then confirm each tag's data type, widen any format pattern the value outgrows, and prove the route with a safe write.
On this page
Hash marks in a simulated panel's numeric fields mean the simulation received no displayable value, not that the values in the controller are wrong. In the reported case, a KTP1000 simulated in TIA Portal V12 SP1 against a physical S7-1200 showed #### in every numeric field while the PLC read correctly online. The simulated runtime had lost its communication route, and the fix was in the PG/PC interface of the configuration PC, not in the project. Point the S7ONLINE (STEP 7) access point at TCP/IP on the adapter that reaches the controller, or at PLCSIM when the PLC side is simulated too. Then confirm each tag's data type against the field's format pattern, and finish with a safe write from an input/output field.
What the hash marks are telling you #
Read the display before changing anything:
####in every numeric I/O field while the online values look correct is a communication fault. The simulated runtime has no working route to a value, so fix the route below before touching tags or formats.- Zeros where real values used to be mean the route now delivers something. That clears the communication fault but does not by itself prove the screen is right.
####in a single field while its neighbors display correctly is a display-format fault. That one value needs more digit places than the field's pattern reserves, which the worked example below quantifies.
Set the route the simulation actually uses #
Going online in TIA Portal proves that the engineering station reaches the controller, but the simulated panel runtime does not follow that connection. It follows the S7ONLINE (STEP 7) access point, which is why a project can look online and still show #### on the simulated screen at the same time.
- On the configuration PC, open the Windows Control Panel and open
Set PG/PC interface. - Under
Application access, select the entryS7ONLINE (STEP 7). - With a physical controller on Ethernet, set the access point to
TCP/IPand select the adapter that reaches the PLC — the card on the same subnet as the controller's IP address, not whichever adapter happens to be online. - If the PLC side of the project runs in PLCSIM, point the access point at PLCSIM instead, because a simulated controller is not reached through any network adapter. When both sides are simulated, Why HMI simulation cannot talk to a simulated PLC covers that pairing.
- Stop the panel simulation and start it again, so the runtime loads the reselected route.
The access point is a setting of the configuration PC, not data inside the project. A new network adapter, a changed PC address or a reinstall of the engineering software can leave it aimed at hardware that is no longer there — which is how a project that displayed correctly months ago starts showing hash marks today.
Check the tag data type and the field format #
With the route working, at least one numeric field will display. If fields still fail, or fail one at a time, the tags and their field formats are next:
- Confirm each HMI tag still points at the intended PLC address with the data type the program actually uses. The reported project carried a UInt in a data block and a Real at %MD20; recheck both instead of assuming the original configuration survived.
- Read each I/O field's format pattern. The reported fields used DECIMAL 999999 on the counter tag and DECIMAL 9999 on the Real. A pattern of 9s reserves one digit place per 9, and a value that needs more places than the pattern supplies is shown as
####. - Note each field's access mode while you are there. A field set to output only can display a value but cannot write one, which the closing test depends on.
Worked example: a Real at %MD20 against a 9999 pattern #
The inputs, each with its source:
- Tag: a Real at %MD20, as configured in the reported project.
- Field format: DECIMAL 9999 on the I/O field — four 9s, four digit places — as reported.
- Value: 12345.6, the value the online monitor shows at that address for this example.
The rule: a decimal pattern displays a number only when the number's digits fit the digit places the pattern reserves. Count the 9s in the pattern, then count the digits the value needs.
The arithmetic: 12345.6 has five integer digits (1, 2, 3, 4 and 5). The pattern supplies four places. Five needed against four supplied leaves the display one place short — 5 - 4 = 1 — so the field cannot render the number and shows ####.
The result and the decision: communication is not at fault here, because every other field displays and the route is proven; this value has simply outgrown its format. The threshold is the count of 9s — more value digits than 9s means hash marks. Widen the pattern by one 9 per missing digit: 99999 covers five integer digits, and the 999999 pattern already on the counter field covers six. A fraction you also want to see costs its own place, so a pattern of four 9s, a dot and one more 9 holds four integer digits and one decimal digit.
Prove the route with a safe write #
A display proves only the read direction. Pick a field whose access mode is input and output, attach it to a tag that is safe to change — a spare word in a data block, never a command that moves the machine — enter a test value on the simulated panel, and watch the online value in the PLC follow it. Set the value back and confirm both readings again. When the displayed value and the online value agree in both directions, the simulation's path is verified end to end; an output-only field cannot run this test. The same sequence against a real controller on the bench is laid out in Testing HMI Simulation Against a Live PLC.
Questions asked
Is the PG/PC interface route stored inside the project archive?
No. The S7ONLINE (STEP 7) assignment belongs to the configuration PC, so archiving a project and restoring it on another PC does not carry the route along. Reopen Set PG/PC interface on that PC and reselect TCP/IP or PLCSIM there before starting the panel simulation.
Does a field showing zeros prove communication is fixed?
No. Zeros mean the simulated runtime now receives values, but not that it receives the right ones. Compare the displayed number with the online value in the PLC. If the PLC holds a real count and the field shows 0, check the tag's address and data type before trusting the screen, then test a write from an input/output field.
What is PLCSIM, and when should the route point at it?
PLCSIM is the Siemens simulator for S7 PLCs: it runs the PLC program on the configuration PC instead of in a physical controller. Choose it in the access-point setting only when the PLC side of the project is being simulated as well. With a physical S7-1200 on the network, keep the route on TCP/IP with the adapter that reaches the controller's IP address.
The route points at the right adapter and the fields still show hash marks — what then?
Confirm the PC can actually reach the controller over that adapter: the adapter and the controller's IP address must sit on the same subnet, and a firewall on the configuration PC must not block the traffic. If the network checks out, stop the simulation once and start it again so the runtime reloads the route, then check the tag list.