ID : 652
Hand[n].InposState / SelectHand[m,n].InposState
Function
To return the INPOS status (whether or not in the target position) by integer type data. Use "SelectHand[m,n].InposState" when an electric gripper and the cooperative control function are used together.
Syntax
Hand[n].InposState
For the combination use of an electric gripper and the cooperative control function
SelectHand[m,n].InposState
Return Value
Return the INPOS status (whether or not in the target position) by integer type data.
Description
The INPOS status (whether or not in the target position) is returned by integer type data.
The target reference position range is determined by the parameter "positioning complete distance."
Only Get is enabled. Put is not available.
Return value | Hand status |
---|---|
-1(True) | Within the target position range after origin return and positioning motion. |
0(False) | Out of range. |
Related Terms
Electric Gripper Status, How to Use an Electric Gripper in Cooperative Control Function
Attention
-
Example
tmp = Hand0.InposState
Example
'!TITLE "Acquire the value of INPOS state"
' Acquire INPOS state and display it on the message output display
Sub Sample_HandInposState
Dim aaa As Integer
Dim bbb As Integer
' Turn the motor power of an electric gripper ON
Hand[0].Motor On
' Origin return of an electric gripper 0
Hand[0].Org
' Perform asynchronous motion of electric gripper 0 with speed 20[%], gripping force 30[%]
Hand[0].MoveH 20, 30, True, Next
' Stop the motion 0.1sec
Delay 100
' Assign INPOS state to aaa
aaa = Hand[0].InposState
' Wait till an electric gripper 0 finish the motion
Wait Hand[0].BusyState = 0
' Assign INPOS state to bbb
bbb = Hand[0].InposState
' Display the value "0" which means that gripper is out of INPOS range
PrintDbg aaa
' Display the value "-1" which means that gripper is within INPOS range
PrintDbg bbb
End Sub
ID : 652