CDRFLEx.enable_alter_motion
Features
enable_alter_motion() and alter_motion() functions enable to alter motion trajectory.
This function sets the configurations for altering function and allows the input quantity of alter_motion() to be applied to motion trajectory. The unit cycle time of generating alter motion is 100msec. Cycle time(iCycleTime*100msec) can be changed through input parameter n. This function provide 2 modes(Accumulation mode, Increment mode). Input quantity of alter_motion() can be applied to motion trajectory in two ways as accumulated value or increment value. In accumulation mode, the input quantity means absolute altering amount(dX,dY,dZ,dRX,dRY,dRZ) from current motion trajectory.
On the contrary in increment mode, the quantity means increment value from the previous absolute altering amount. The reference coordinate can be changed through input parameter ref. Limitations of accumulation amout and increment amount can be set through input paramet fLimitDpos (accumulated limit) and fLimitDposPer(increment input limit during 1 cycle). The actual alter amount is limited to these limits.
This function is only available in M2.4 version or higher.
Parameter
Parameter Name | Data Type | Default Value | Description |
iCycleTime | int | - | Cycle time number |
ePathMode | ePathMode | - | Refer to the Definition of Constant and Enumeration Type |
eTargetRef | eTargetRef | - | Refer to the Definition of Constant and Enumeration Type |
fLimitDpos | float[2] | - | First value : limitation of position[mm] Second value : limitation of orientation[deg] |
fLimitDposPer | float[2] | - | First value : limitation of position[mm] Second value : limitation of orientation[deg] |
Note
- alter_motion can be executed only in user thread.
- Accumulation amount or increment amout isn’t be limited if limit_dPOS or limit_dPOS_per is None.
Return
Value | Description |
0 | Failed |
1 | Success |
Example
float limit_dPOS[2] = {50, 90};
float limit_dPOS_per[2] = {50, 50};
Drfl.enable_alter_motion(5, PATH_MODE_DPOS, COORDINATE_SYSTEM_BASE, limit_dPOS, limit_dPOS_per);