Hello
I have a Numeric Text Field that should write a speed set points to my PLC.
The tag is Floating points type. I did set the numeric text field number type to Float ant i did bind the value(float) to the Tag. I set the decimal format to 0.# cause i want only one digit decimal.
The PLC is an Allen-Bradley 1756-L72S v31.
The Problem is the number i write from ignition is showing in exponential in the PLC.
So if i write 24.2 in ignition the number in the PLC is 3.36311631e-044
Does the problem only occur when you write from Ignition, or is it both ways? If you write the value from the PLC end, does it show the value you wrote in the PLC as expected in Ignition?
Regarding display format in Ignition: if you want one decimal to show at all times, you want decimal format 0.0 (0.# will only show the first decimal if the decimal value is not zero).
Thats something like that! It started to work when i drag the tag from the tag browser to the NumericTextfield Value property. Prior to that, i was binding the properties using the binding icon. I don’t understand why, but Ignition seem acting differently when you drag the tag then when you use the binding icon… That is not the first time i experience problems with one or the other method.
Glad you got it working! Chances are the default binding created on tag drop is slightly different than the one you manually created. If you want to figure out the difference, you could do one your way, another copy by dragging, and then inspect the bindings.
If you cast 24.2 to an integer (so 24), its binary representation is 00000000000000000000000000011000
if you interpret that as a float, it’s indeed 3.36311631E-44
So I guess somewhere down the road, it gets cast to an int, and interpreted again as a 32-bit float. Warning: if you bind it to a numeric text field, the type you use for binding also matters.
If I may do a wild guess, is it possible you have two bindings on the numeric text field? They can influence each other.