
PouchesInc (Customer) asked a question.
In Excel, if I need to round a number to the nearest 0.5 for example I can use: MROUND(cell, 0.5). It would be extremely helpful to be able to use these sorts of things in both Productivity and Do-More. Maybe you already can in Do-More, IDK but it wouldn't surprise me. lol. I gave it a quick attempt there and the Math told me it doesn't recognize them so I'm just guessing I can't there.
Anyway, it would be nice to be able to do this in Productivity Math:
FLOOR(tag, 0.25) = round down to the nearest .25 value
CEILING(tag, 0.5) = round up to the nearest .5
MROUND(tag, 0.5) = round up or down to the nearest .5
example:
Got the 3 functions in MATH (FLOOR, CEILING, MROUND).
Got identical results as you except for the MROUND(4.15, 0.1). The PLC 32 bit float is not as precise as the 64 bit double precision in the PC, so the PLC ended up with 4.1, not 4.2.
The Memory View below is laid out the same as your Excel Results table: