CDRFLEx.check_position_condition
Features
This function checks the status of the given position. This condition can be repeated with the while or if statement. Axis and pos of input paramets are based on the ref coordinate(eTargetRef).
In case of eForceReference = COORDINATE_SYSTEM_TOOL, pos(fTargetPos) should be defined in BASE coordinate.
If eMode is MOVE_MODE_RELATIVE, check_position_condition_rel is called, and if MOVE_MODE_ABSOLUTE, check_position_condition_abs is called.
Parameter
Parameter Name | Data Type | Default Value | Description |
eForceAxis | enum.FORCE_AXIS | - | Refer to the Definition of Constant and Enumeration Type |
fTargetMin | float | - | Minimum value |
fTargetMax | float | - | Maximum value |
fTargetPos | float[6] | - | Target task location for six axes |
eMode | enum.MOVE_MODE | MOVE_MODE_ABSOLUTE | Refer to the Definition of Constant and Enumeration Type |
eForceReference | COORDINATE_SYSTEM | COORDINATE_SYSTEM_TOOL | Refer to the Definition of Constant and Enumeration Type |
Return
Value | Description |
1 | The condition is True |
0 | The condition is False |
Example
float posx1[6] = {400, 500, 800, 0, 180, 0};
bool CON7 = Drfl.check_position_condition(FORCE_AXIS_Z, -10, -5, posx1, MOVE_MODE_ABSOLUTE);