Community

RSIEventTypeLIMIT_SW_POS has wrong motion ID

RSI version 8.1.6
I’m not sure if this is a bug or a misunderstanding on my part.
We have a motion with a Positive Software Limit set during the motion. When the motions happens I capture the following events:
event 11: Motion Start for motion ID 8 on axis 0
event 9: Positive Software Overtravel for motion ID 2072 on axis 0
event 18: Axis at Target for motion ID 8 on axis 0
event 10: Motion Done for motion ID 8 on axis 0

Why is the motion ID 2072 for event 9?

Based on the very light documentation for InterruptMotionIdGet(), it claims the ID is only valid when the interrupt type is MOTION_DONE. Upon further review of source code, the MotionID is also valid for any interrupt related to motion.

The interrupt Motion ID is invalid for the positive software overtravel, because that type of interrupt is not (internally) directly related to the command motion trajectory.

Internally, the interrupt data is stored in a large union, so the value 2072 is unrelated to an actual MotionID.

If you like, we can modify InterruptMotionIdGet to throw an exception if you attempt to read it for an EventType which does not support. Let us know.