AdvancedHMI Software

General Category => Open Discussion => Topic started by: razm on March 20, 2025, 06:02:27 AM

Title: How to set a basic label to show float variable?
Post by: razm on March 20, 2025, 06:02:27 AM
I read a parameter from a Siemens PLC that is a float number.
How can I show it on the screen? Where can I configure the label to be a float and not an integer?
Title: Re: How to set a basic label to show float variable?
Post by: Archie on March 20, 2025, 06:19:11 AM
What driver are you using? The generic drivers such as Modbus must be explicitly told it is a float by using address modifiers.

The BasicLabel automatically knows how to show as a float value. You can format the value by using the NumericFormat property. For example, set NumericFormat to 0.0 for one decimal place.
Title: Re: How to set a basic label to show float variable?
Post by: razm on March 20, 2025, 06:29:07 AM
I use the Siemens driver (SiemensCom)
Title: Re: How to set a basic label to show float variable?
Post by: Archie on March 20, 2025, 07:17:28 AM
The Siemens driver was developed by another user, so I don't know much about how it handles different data types. You may have to find the original post on it to see if the developer can provide any help.