ID : 3643
EncMotionAllow
Function
With Move @E, to change the "Allowable angle in stop state" of each axis for robot axis used for stop judgement.
Syntax
EncMotionAllow True/False, allowable angle[, Mode = mode value]
Guaranteed Entry
- True/False
- Enable/Disable the servo lock by an integer type data.
To enable this command, enter True or an integer other than 0.
To disable this command, enter False or 0.
In case of True, it is changed to the designated allowable angle. - Allowable angle
- Designate an allowable angle by single precision real number type data.
In case of "False," no designation is needed. - Mode value
- When Mode=0 is designated, the allowable angle is designated by angle [deg]/distance [mm]. When Mode=1 is designated, the allowable angle is designated by pulse width. In case of "True," it can be omitted. This should be Mode=0 if this is omitted. In case of "False," no designation is needed.
Description
- Move @E judges whether the current position calculated based on an encoder value has reached to the target position. Allowable angle used for the judgement can be changed.
- Designating A [deg]/[mm] for allowable angle in Mode=0, it is judged that all axes have reached to the target position if the linear motion axis is positioned within A [mm] of the target position and if the rotation axis is positioned within A [deg] of the target position.
In case of Mode=1, if the all axes are positioned within A [pulse], it is judged that they have reached to the target position. - If False is designated, it will return to the default (initial value).
- To execute this statement, the task must acquire axis control of the robot axis.
Related Terms
Attention
- This function will start working after the command position reaches to the target position. Therefore, if you set the allowable angle to the value above a certain level, it is regarded that "@[0]" is designated for pass start displacement.
- Due to the detection/operation period of the encoder value in the system, there may be an error caused by the use condition. Take this designated value as just a suggestion.
Example
'!TITLE "Setting of Allowable Angle in Stop State for Robot Axis"
' True/False of allowable angle in stop state for robot axis
Sub Sample_EncMotionAllow
Dim aaa As Joint
Dim bbb As Joint
Dim ccc As Joint
Dim ddd As Integer
TakeArm Keep = 1
aaa = J( 0, 0, 90, 0, 0, 0 )
bbb = J( 45, 0, 90, 0, 0, 0 )
ccc = J( 90, 0, 90, 0, 0, 0 )
Motor True
' Set the external speed to 20
ExtSpeed 20
Move P, @0 aaa
' Set allowable angle to 200 degrees of pulse width
EncMotionAllow True, 200, Mode = 1
Move P, @E bbb
Move P, @0 ccc
' Set allowable angle to be disabled
EncMotionAllow False
End Sub
ID : 3643