Connect Command Starts communication with ROBOTIQ Gripper.
Example – Connect
#Include "Robotiq.pcs"
Sub Main
Dim Opt(5) As Integer
Call Robotiq("Connect", opt) 'Connect to Gripper
'Activation Completed
End Sub
Disconnect Command Stops communication with ROBOTIQ Gripper.
Example – Disconnect
#Include "Robotiq.pcs"
Sub Main
Dim Opt(5) As Integer
Call Robotiq("Disconnect", opt) 'Disconnect from Gripper
'Gripper Disconnected
End Sub
Move Command Move to a position with a set speed and force. Input Values - Option variable array
Option(0) Input: Sets the target position for the Grippers Fingers. Option(1) Input: Sets the Gripper closing or opening speed in real time, however, setting a speed will
not initiate motion.
Option(2) Input: Defines the final gripping force for the Gripper. The force will fix maximum current sent
to the motor while in motion. If the current limit is exceeded, the fingers stops and trigger an object
detection notification.
*Option(3) and Option(4) are not used on the move function. Please ignore values if any.
Example - Move
#Include "Robotiq.pcs"
Sub Main
Dim Opt(5) As Integer
Opt(0) = &hFF 'Close Position
Opt(1) = &hFF 'Full Speed
Opt(2) = &hFF 'Max Force
Call Robotiq("Move", opt) 'Move Gripper
End Sub
GripperStatus Command
Obtains Gripper Status, Position Request Echo, and Finger Current Bytes.
Return Values - Option variable array
Option(0) Output: Gripper Status Byte
Option(1) Output: Reserved
Option(2) Output: Fault Status
Option(3) Output: Position Request Echo
Option(4) Output: Position
Option(5) Output: Finger Current
Example - Get Activation Status
#Include "Robotiq.pcs"
Sub Main
Dim opt(5) As Integer
Dim var As Integer
Call Robotiq("Disconnect", opt) 'Disconnect from Gripper
Do While(1)
Call Robotiq("GripperStatus", opt) 'Get Gripper Status
'Check that Gripper Has been set for activation gACT == 0x1
If (opt(0) AND &b000000001) = 1 Then
'Check That Activation Has been completed gSTA != 0x03
If (opt(0) AND &b00110000) <> 1 Then
Exit Do 'Exit Loop
End If
Else
Call Robotiq("Connect", opt) 'Connect Gripper
End If
Loop
End Sub
gACT Command
Returns only the value of the Initialization status.
Return Values - Option variable array
Option(0) Output: Initialization Status
Example - Get Initialization Status
#Include "Robotiq.pcs"
Sub Main
Dim Opt(5) As Integer
Call Robotiq("gACT", Opt)
If (Opt(0) = &b0) Then
PrintMsg "Gripper Not Active"
Else
PrintMsg "Gripper Active"
End If
End Sub
gGTO Command
Returns if the robot is stopped or if is currently moving to a point.
Return Values - Option variable array
Option(0) Output: Action Status
Example – Get Activation Status
#Include "Robotiq.pcs"
Sub Main
Dim Opt(5) As Integer
Call Robotiq("gGTO", opt)
If (Opt(0) = &b0) Then
PrintMsg "Gripper Stopped"
Else
PrintMsg "Gripper Moving to Position"
End If
End Sub
gSTA Command
Returns the current motion status of the gripper.
Return Values - Option variable array
Option(0) Output: Motion Status
Example – Get Motion Status
#Include "Robotiq.pcs"
Sub Main
Dim Opt(5) As Integer
Call Robotiq("gSTA", opt)
Select Case Opt(0)
Case &b00
PrintMsg "Gripper is in Reset"
Case &b01
PrintMsg "Activation in Progress"
Case &b11
PrintMsg "Activation is Completed"
End Select
End Sub
gOBJ Command
Returns the object detection status. The Object detection status is a built-in feature that provides
information on possible object pick-up ignore if gGTO == 0.
Option(0) Output: Object detection status.
Example – Get Object Detection Status
#Include "Robotiq.pcs"
Sub Main
Dim Opt(5) As Integer
Opt(0) = &hFF 'Close Position
Opt(1) = &h0F 'Slower speed (so gripper can detect when there
'isn’t a part and when it reached the end
'position)
Opt(2) = &hFF 'Max Force
Call Robotiq("Move", opt) 'Move Gripper
Do While(1)
'Get Object Detection Status While
'Gripper is closing
Call Robotiq("gOBJ", opt)
Select Case Opt(0)
Case &b11
PrintMsg "Gripper Fully Close. No Object Found"
Exit Do
Case &b01
PrintMsg "Object Found"
Exit Do
End Select
Loop
End Sub
gFLT Command
Returns Fault status general error messages which are useful for troubleshooting. Fault LED (red) is
present on the Gripper chassis; LED can be blue, red or both and be solid or blinking.
Option (0) Output: General error messages that is useful for troubleshooting. gPR Command Echo of Request position of the Gripper.
Option(0) Output: Value of target position.
gPO Command
Current position of Gripper obtained via encoders.
Output(0) Output: Actual position of the Gripper obtained via the encoder.
gCU Command
Instantaneous current read from the motor drive, value between &b00000000 and &b11111111,
approximate current equivalent is 10 * value read in mA.
There you go! For an example of application, click here.
Hey there,
Connect CommandSo here are some command reference and example so that you can program your Robotiq 2-Finger gripper on a Denso RC8 controller.
Starts communication with ROBOTIQ Gripper.
Example – Connect
Disconnect Command
Stops communication with ROBOTIQ Gripper.
Example – Disconnect
Move Command
Move to a position with a set speed and force.
Input Values - Option variable array
Option(0) Input: Sets the target position for the Grippers Fingers.
Option(1) Input: Sets the Gripper closing or opening speed in real time, however, setting a speed will not initiate motion.
Option(2) Input: Defines the final gripping force for the Gripper. The force will fix maximum current sent to the motor while in motion. If the current limit is exceeded, the fingers stops and trigger an object detection notification.
*Option(3) and Option(4) are not used on the move function. Please ignore values if any.
Example - Move
GripperStatus Command
Obtains Gripper Status, Position Request Echo, and Finger Current Bytes.
Return Values - Option variable array
Option(0) Output: Gripper Status Byte
Option(1) Output: Reserved
Option(2) Output: Fault Status
Option(3) Output: Position Request Echo
Option(4) Output: Position
Option(5) Output: Finger Current
Example - Get Activation Status
gACT Command
Returns only the value of the Initialization status.
Return Values - Option variable array
Option(0) Output: Initialization Status
gGTO Command
Returns if the robot is stopped or if is currently moving to a point.
Return Values - Option variable array
Option(0) Output: Action Status
Example – Get Activation Status
gSTA Command
Returns the current motion status of the gripper.
Return Values - Option variable array
Option(0) Output: Motion Status
Example – Get Motion Status
gOBJ Command
Returns the object detection status. The Object detection status is a built-in feature that provides information on possible object pick-up ignore if gGTO == 0.
Option(0) Output: Object detection status.
Example – Get Object Detection Status
gFLT Command
Returns Fault status general error messages which are useful for troubleshooting. Fault LED (red) is present on the Gripper chassis; LED can be blue, red or both and be solid or blinking.
Option (0) Output: General error messages that is useful for troubleshooting.
gPR Command
Echo of Request position of the Gripper.
Option(0) Output: Value of target position.
gPO Command
Current position of Gripper obtained via encoders.
Output(0) Output: Actual position of the Gripper obtained via the encoder.
gCU Command
Instantaneous current read from the motor drive, value between &b00000000 and &b11111111, approximate current equivalent is 10 * value read in mA.
There you go!
For an example of application, click here.