3 Developing with MLX200
3.3 Programming Introduction
3-9
168542-1CD
168542-1CD
MLX200 Software and
Operations
3.3 Programming Introduction
This section goes into more detail about the method of programming using
MLX200. First, the status bits and execution life cycle of the MLX200
instructions are detailed. Then, a simple programming structure that can
be used to build applications is described. The basic motion parameters
common to the motion instructions are described here as well.
3.3.1 Task Scheduling
Fig. 3-8: Task Scheduling
Any MLX200 Application code should be
placed inside the MLX_Task function and
not inside the MainTask (Fig.3-8 "Task
Scheduling"). This will allow for
synchronization between the MLX
Communications Task and the Application
Code. Failure to place the application
code inside the MLX_Task could lead to
unexpected behavior such as skipped
motions or motion being out or order after
a Hold/Restart scenario.
3.3.2 Instruction Execution and Status Bits
Each MLX200 instruction has several status bits that will update while the
instruction is executing and provide information that can be used to control
the application logic. The state management (e.g. MLxAbort, MLxEnable)
instructions and configuration (e.g. MLxAxisReadProperties,
MLxRobotSetBasePose) instructions have three status bits:
• Sts_EN - Turns on when the instruction rung is enabled
• Sts_DN - Turns on when the instruction has finished executing
• Sts_ER - Turns on if the instruction causes an error
The motion instructions have additional bits that will report the status of a
motion throughout its processing and execution (i.e. movement).
• Sts_EN - Turns on when the instruction rung is enabled
• Sts_DN - Turns on when the MLX200 Robot Control Module has
acknowledged the motion command and motion has been queued
• Sts_IP - Turns on and stays on during motion processing and
execution
Failure to place MLX200 application code inside the MLX_Task could
lead to unexpected behavior such as skipped motions or motions being
out or order after a Hold/Restart scenario.
For these status bits to report correctly the motion AOI rung
should be enabled throughout the entire motion execution.