4-21
168542-1CD
168542-1CD
MLX200 Software and
Operations
4 MLX200 Programming Guide
4.4 Programming Pitfalls and Best Practices
Fig. 4-26: Motion Queue Full Error
4.4.3 Reused Control Variables
Another potential problem comes from reusing the control variables for an
AOI. For example, if you are triggering an MLxRobotMoveAxisAbsolute
using the control variable moveAbs[0], this variable cannot be used
anywhere else even if it is on a rung that is never active. The reason for
this is that every AOI has a special “Enable False” condition that allows it
reset its state whenever it is not enabled to be prepared for the next time it
is called. If you use the same control variable twice, it will be attempting to
execute the instruction in one location and attempting to reset the
instruction in the other. This will lead to unresponsive behavior from the
system. If an instruction is misbehaving, a quick check can be done by
right-clicking on the control variable and selecting “Cross Reference” to
see if the variable is reused anywhere else.
Fig. 4-27: Cross-Reference Variable Use
A control variable can be reused in an UNSCHEDULED
program as long as the two programs will never be
scheduled at the same time.