Exactly what I was looking for!
Thanks a lot!
Robotiq_Customer
Robotiq_Customer
Exactly what I was looking for!
Thanks a lot!
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.
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 SubGripperStatus CommandObtains 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(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 SubgACT Command
Returns only the value of the Initialization status.
Return Values - Option variable array
Option(0) Output: 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 SubgGTO CommandReturns if the robot is stopped or if is currently moving to a point.
Return Values - Option variable array
Option(0) Output: Action 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 CommandReturns the current motion status of the gripper.
Return Values - Option variable array
Option(0) Output: 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 CommandReturns 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 CommandReturns 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.
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.
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.