Value rounding in a Numeric Text Field

Working with a numeric Text Field. PLC is giving me a value of 255 but I need to display 25.5, but I am displaying 25. Value is being rounded. This is my settings.
image

You're showing the tag configuration.

Have a look in the Numeric Text Field properties in the Vision Property Editor | Data section. I suspect you have selected Number Type = Integer when it should be Float.

I tried float, but no change

Have you put the tag binding on the Data | Value | Float property (rather than on the Integer property)?

(Another check is to confirm that it has scaled correctly to 25.5 in the tag browser.)

I tried the tag as a float, but no change,
With the settings as
image

Not the tag, the binding on the Numeric Text Field. Read my previous post again.

I tried the tag as a float, but no change,
With the settings as
image

In the Vision Property Editor for the Numeric Text Field - not the Tag Browser | Property Editor.

Tag float

2 Likes

image

actual value is 32.7

OK. There's something else wrong. If your binding is correct then there's some mix-up between the data type of the tag and the property configuration. It's time for bed for me.

no problem, thanks for taking a look. I will continue to look

Try changing the 'Number Type' to float as well.

Tried that last night, still no luck

Remove any scaling and other things you've added to the tag config so we know that the tag system isn't modifying the value.

Show your binding on the numeric text field's Value(Float) property.

There has to be a reason why value is being rounded/truncated to an unexpected value.

In my Tag browser for that tag with scaling , I get
image
Which is what I want displayed, but am getting 30.0
If I remove the scaling in the tag with my min set at 0 and my max set at 30, i get
image
The are with the number type set as float on both tag properties and Property editor

How is your binding configured?

What I suspect might be happening is that you're value is being limited by the max you have set, just trying to figure out why.

Also, setting the tag properties to float, doesn't matter if the actual value in the controller is an integer, which I expect it is. You'll just get a .0 added to the end of the value.

Also, rather than a tag with scaling, you might consider using a derived tag.