10-23-2018, 02:21 PM
The functionRunInstruction(or RunCodeCustom which is the old naming) allows you to generate a program call at a given point in your program.
This will provoke a new line in your generated code.
You should make sure that the name of your program matches the specific function that drives your gripper. For example, if you use the Universal_Robots_RobotiQ post processor, it includes the functions to drive a 2 finger gripper. In that case, you need to callRQ_2FG_CloseandRQ_2FG_Open. Example:
robot.RunInstruction('RQ_2FG_Open', INSTRUCTION_CALL_PROGRAM)
robot.MoveJ(target1)
robot.MoveL(target2)
robot.RunInstruction('RQ_2FG_Close', INSTRUCTION_CALL_PROGRAM)
robot.MoveL(target1)
To help you better integrate your RobotiQ gripper:
What gripper do you have?
Are you currently using a specific function to drive the gripper?
It may be better to open a new thread so that we can have a multipurpose post processor to support RobotiQ grippers and Force Control.
This will provoke a new line in your generated code.
You should make sure that the name of your program matches the specific function that drives your gripper. For example, if you use the Universal_Robots_RobotiQ post processor, it includes the functions to drive a 2 finger gripper. In that case, you need to callRQ_2FG_CloseandRQ_2FG_Open. Example:
robot.RunInstruction('RQ_2FG_Open', INSTRUCTION_CALL_PROGRAM)
robot.MoveJ(target1)
robot.MoveL(target2)
robot.RunInstruction('RQ_2FG_Close', INSTRUCTION_CALL_PROGRAM)
robot.MoveL(target1)
To help you better integrate your RobotiQ gripper:
What gripper do you have?
Are you currently using a specific function to drive the gripper?
It may be better to open a new thread so that we can have a multipurpose post processor to support RobotiQ grippers and Force Control.