You may now proceed to modify the movement and its trajectory.
The MoveImmedInterpo function can be used to position the master on the trajectory using the maximum permissible speed based on the various segments of which it consists.
On each segment, the module tries to achieve the maximum speed between the speed required and the speed permitted on the segment, observing the acceleration and deceleration rates set on the master.
The MoveImmedInterpo function is executed:
-
On channel 0 of the module
-
With the following parameter settings:
-
%MWr.m.c.26 (ACTION_CMD) = 905
-
%MDr.m.c.27 (param_cmd_1) = Axis group ID (601 to 604)
-
%MDr.m.c.29 (param_cmd_2) = 10 if absolute speed (param_cmd_4), any other value indicates that the speed in param_cmd_4 is a percentage of the maximum speed calculated
-
%MDr.m.c.31 (param_cmd_3) = Target position
-
%MDr.m.c.33 (param_cmd_4) = Speed required, either absolute or relative (0 for 0% to 10000 for 100%) based on the value of param_cmd_2
-
The WRITE_CMD instruction assigned to channel 0 of the module
NOTE: To obtain the axis ID, use the GetAxisID function (code 523) and the WRITE_CMD instruction.
The diagram below illustrates an example trajectory:
Example of Non-Modulated Movement
The diagram below illustrates an example of non-modulated movement (param_cmd_2 = 10) based on the example trajectory above:
Example of Modulated Movement
The diagram below illustrates an example of modulated movement (param_cmd_2 other than 10, param_cmd_4 at 0 for 0% to 10000 for 100%) based on the example trajectory above:
NOTE: On this illustration, note that the master varies its speed based on the segments (decelerating on tight segments). When the speed is modulated, movement is performed in full. However, when the speed is not modulated (see diagram above), the axes may switch to fault mode as the speed is too great for the dynamics of the movement.
When this type of function is used, the error codes that can be returned in word %MWr.m.c.3 are as follows:
Code
|
Description
|
7001
|
For type 1, 2 and 10 interpolation, one of the parameters ParF1 or ParF2 has been linked to 0.
|
7002
|
Q_stop is outside the points of the trajectory.
|
7003
|
The motion is not controlled correctly.
|
7004
|
The active movement has been stopped.
|
7038
|
The specified group (ID) is not configured.
|
7046
|
The trajectory of the selected group has not been calculated.
|
9015
|
The module version does not support this function.
|