Where are my F-(Foating) variables?


Ok - So the manual seems to suggest that F32 and F64 floats exist. But I do not seem to have access to that as a datatype?
I have to take 2 byte CAN data and i need to scale it by 0.00390625 %/bit. I realize I could just do some rounding and multiply it by 39 and then divide it by 10,000. But I could loose a percent in rounding resolution there.
My other option is use the whole numbers in all my math and just keep the rounded low res for display. I hate doing that to future programmers. (I would then have 2 variables "VariableName" and "VariableNameDivide10K"

Any way to get access to the floats?
Is there a better way?

SJ Industries:
Maybe a direct route to a Structured text POU. ?? I haven't had to deal with floats as such but I do use POUs for more complex maths.

GUIDE doesn't support floats in the graphical environment at all.  As mentioned by SJ you'll have to just run the signal to a Structured Text POU wherein you can use the 'REAL' data type.


[0] Message Index

Go to full version