Siemens S7/TIA v16: WinCC: How do I display a real number?...

Mas01

Member
Join Date
Oct 2020
Location
Leicester, England
Posts
1,109
I'm trying to display on a SIMULATED HMI, the value of 2 PLC tags (see pics).
When I start the simulation, all I see is ##### instead of the value (which should be a distance in mm). Here's some screenshots of the HMI tag properties.
Anyone know what I'm doing wrong?
Happy to attach more screenshots if needed.
Thanks

HMI tags and PLC tags.png Values to be displayed on HMI.jpg RT Sim screen.png
 
Last edited:
Two possible reasons:

1. The HMI is not online with the PLC. Tip: Configure a message view that shows also system messages. You can then open the view and see the message that otherwise only appears for a short moment on the screen. You can then see the messages "station connected" or "station disconnected".
As to the reason why the simulated HMI is not online with the simulated PLC. Open the 'Communication Settings' in the Windows Control Panel. Make sure that the access point S7ONLINE is set to 'PLCSIM'.

2. The size of the output field cannot display the numbers of characters that are configured for the output field. Adjust the size, the font or the no of characters to display.
 
As to the reason why the simulated HMI is not online with the simulated PLC. Open the 'Communication Settings' in the Windows Control Panel. Make sure that the access point S7ONLINE is set to 'PLCSIM'.

Thanks for the reply. This field just seems to be text that you type into, i.e. not a drop-down list. Should I type 'PLCSIM' in there?
What does PLCSIM mean? Because the PLC is not simulated - only the HMI is simulated. I'm confused, but I'll keep fishing around.

s7 ONLINE.jpg
 
It's probably the display size/parameters of the display box.

Highlight the box and then in properties you can select whether to display values as signed/unsigned and decimal place positions. Maybe try 99.99 and see what it does.

Also until you're happy with things drag from the corner of the box and make it way bigger than it needs to be.
 
This field just seems to be text that you type into, i.e. not a drop-down list. Should I type 'PLCSIM' in there?
No, dont change this. Keep the S7ONLINE.

What does PLCSIM mean? Because the PLC is not simulated - only the HMI is simulated. I'm confused, but I'll keep fishing around.
Ok, if the PLC is real not simulated, then S7ONLINE must be set to the actual Ethernet adapter you are using to connect to the PLC.

As I said before:
Open the 'Communication Settings' in the Windows Control Panel. Make sure that the access point S7ONLINE is set to 'PLCSIM'.
If this is new to you, then it is highly likely that this is your problem.
edit: You may have to set Windows Control Panel to 'display small icons', for the 'Communication Settings' to appear.

Sidenote: It is confusing that TIA doesn't figure out that you are using the same network interface for TIA WinCC RT and TIA STEP7.
That is how it is. You have to set S7ONLINE manually.

edit: Pre-empting the usual pitfall. When selecting the adapter for S7ONLINE, do not set it to "(adapter name).TCPIP(auto)".
Set it to "(adapter name).TCPIP", without the "(auto)" bit.
 
Last edited:
It's probably the display size/parameters of the display box.

Highlight the box and then in properties you can select whether to display values as signed/unsigned and decimal place positions. Maybe try 99.99 and see what it does.

Also until you're happy with things drag from the corner of the box and make it way bigger than it needs to be.

Cheers bb76,
I'm sure this is easy but it's doing my head in.
When I chose format "99.99" , I get ####, which I guess is one hash for each digit position. I dunno, I'm going round in circles here, cheers anyway.

with two d-p.png tags with 2dp.png
 
Cheers bb76,
I'm sure this is easy but it's doing my head in.
When I chose format "99.99" , I get ####, which I guess is one hash for each digit position. I dunno, I'm going round in circles here, cheers anyway.

You will also get the hash-marks when the value is bigger than what can be displayed.
-99.99 cannot be displayed because the sign also counts.
199.00 cannot be displayed.
But 22.9949 will be rounded and displayed as 23.0, so should fit in the 99.9 format pattern you have selected. So this points to that it is not the problem.

Anyway, always specify a plenty long format so you don't get the problem. specify 99999.99 even if you only think you need 2 digits before the sign. Just be sure that it can fit in the output field. The HMI will only show the necessary digits at runtime.
 
You will also get the hash-marks when the value is bigger than what can be displayed.
-99.99 cannot be displayed because the sign also counts.
199.00 cannot be displayed.
But 22.9949 will be rounded and displayed as 23.0, so should fit in the 99.9 format pattern you have selected. So this points to that it is not the problem.

Anyway, always specify a plenty long format so you don't get the problem. specify 99999.99 even if you only think you need 2 digits before the sign. Just be sure that it can fit in the output field. The HMI will only show the necessary digits at runtime.

cheers Jesper.
I tried it with field length 10, which should be big enough, but now I just get 10 #s in a line. I give up for now, gonna make a cup of tea...

5 dp.png field length 10.jpg 10 hashes.png
 
cheers Jesper.
I tried it with field length 10, which should be big enough, but now I just get 10 #s in a line. I give up for now, gonna make a cup of tea...
As I said, this is probably not your problem.
For the 3rd (and last) time, use 'Communication Settings' to set S7ONLINE to '(adapter name).TCPIP'.
 
And, just set the format to 99999.99.
You dont want the 's'. It will force a plus-sign for positive values.
And you dont want the 'e'. It is possible to specify exponential notation, but I have never seen anyone using exponential notation for a real life application.
 

Similar Topics

In OB1, I'm monitoring some values (first pic). The values are what I expect. At the same time, I'm monitoring the same values in the DB where...
Replies
1
Views
666
Siemens S7/TIA v16: "Overwrite if object exists online?" HMI loading message... Thus far, I've just been ticking this box, just to get the HMI...
Replies
4
Views
784
I'm having a bad day. Daft question coming up...Anyone know why I can't add anything into this DB? Add button is greyed-out. Thanks
Replies
14
Views
1,623
I imported a customised shape into the project, but I don't know how to actually add into on to a specific HMI screen. Do I use the Graphics menu...
Replies
2
Views
671
Hi I'm trying to display a value on the HMI. In monitor mode on the code, I can see that value, but on the HMI , after downloading, it is...
Replies
10
Views
964
Back
Top Bottom