KSS 8.5.8 KR6 900 KRC4
I've made a probing cycle that measures the height of a stack of parts to be picked. The probe result is a position and I want to divide this number by the thickness of each part to get the number of cycles the robot should run in order to go through the stack.
DECL INT CYCLE_COUNT
PROBE_HIT = $POS_RET
CYCLE_COUNT = PROBE_HIT.Z / 2.5
1. What happens if the value of CYCLE_COUNT is 7.9 in REAL? Will the INTEGER be 7 or 8? And if it is 7 how can I get it to round up to 8 for values above 7.5?
2. I get this message in WV " When using a value of type 'REAL' for a parameter of type 'INT' some values may not be initialized correctly". How can I do a better conversion to INT and at the same time get rid of this warning?