Siemens S7/TIA v16: WinCC: trying to display value on HMI.....

Mas01

Member
Join Date
Oct 2020
Location
Leicester, England
Posts
1,109
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 "0.000"

It is a real number, I don't know what I'm doing wrong.
Anyone know?
Thanks

value to be displayed on HMI.jpg tag properties.jpg IMG_20230706_165000.jpg
 
Last edited:
In the first picture you are writing to an M address, then you show the indicator linked to an HMI tag which is synchronized to a DB tag. Separate memory locations.
 
It looks like on the HMI it is in format 9.999
I think you need to change it to format 99.999
Is Laser 2 working? Maybe copy the field from Laser 2 so you can copy the format
 
YES!!!!!!!!
At last, it's working thanks to your help!
Yes, sorry @LD_AR2...I used the M-references because I was following an online tutorial and the presenter was using M-references.
I am a newbie at S7 to please excuse my ignorance.

Anyway, I updated the code as per the picture attached, recompiled, and it's working now.
Great help on this forum.

DB refere ce.jpg
 
Next time from the db just drag the tag onto the hmi page. The link will automatically be created and an io field created
 
Well where are you getting the values from? no need to write %md and then to the db registers. can use the Direct input registers from the sensors. Unless you want to manipulate the read value
 
Well where are you getting the values from? no need to write %md and then to the db registers. can use the Direct input registers from the sensors. Unless you want to manipulate the read value

Sorry I don't understand this comment due to my lack of S7 experience. However, to add info, md8 is the result of reading the raw value analogue input, then norm_x and scale_x, resulting in a laser distance measurement in millimetres.
 
Yes define them in DB, you could also move the raw value into a DB location.

Also you might consider putting a P_Trig (One shot) instruction after the save value, as right now you overwrite the save value every scan the input from the HMI is true.
 

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
650
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
769
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,597
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
661
I want to draw a shape on a screen page in TIA/WinCC. It's roughly the shape of a canal boat hull -see picture. I couldn't find any "free-form"...
Replies
9
Views
1,552
Back
Top Bottom