01-21-2024, 06:47 PM
(This post was last modified: 01-21-2024, 07:18 PM by sloopkogel.)
Hello all,
Relatively new to RoboDK, just exploring the posibilities with the trial version. Verry impressed so far! But I have a question:
I have a project where I intend to use a Kuka KR700 PA robot with a KRC2 controller for a pick and place application. I have made a simulation using the Python API and then exported the program, this works great for creating a defined set of targets in the physical robot, but what I need to do is: move the robot to the pick position, stop and wait when the robot is in position, measure the actual position of the product with one laser sensor for the X offset and another laser sensor for the Y offset, move the robot to the corrected position, pick the product, move the robot to the place position, repeat for the next products untill the pallet is empty.
I know you can prompt a user to enter a number that you can then use in your python code with the 'mbox' command, this will be great for the simulation, but in the real world I will use 2 laser sensor connected to analog inputs to measure the offset and move the gripper accordingly.
Is there a way to export the program to use the analog input to either move to a position or perhaps shift the base around? So far I have only been able to export the program to create a defined set of static coordinates. Do I have to create a custom post processor to add some custom commands?
Edit: I have found the python instruction 'RunInstruction()'. I think I can make my program work by implementing this to read the analog value, write the result to variables, and then inserting a PTP command to move to the X and Y coordinates based on the variable values... This is probably a valid workaround, or does anyone have any other ideas? Is something similar perhaps already implemented in RoboDK?
Relatively new to RoboDK, just exploring the posibilities with the trial version. Verry impressed so far! But I have a question:
I have a project where I intend to use a Kuka KR700 PA robot with a KRC2 controller for a pick and place application. I have made a simulation using the Python API and then exported the program, this works great for creating a defined set of targets in the physical robot, but what I need to do is: move the robot to the pick position, stop and wait when the robot is in position, measure the actual position of the product with one laser sensor for the X offset and another laser sensor for the Y offset, move the robot to the corrected position, pick the product, move the robot to the place position, repeat for the next products untill the pallet is empty.
I know you can prompt a user to enter a number that you can then use in your python code with the 'mbox' command, this will be great for the simulation, but in the real world I will use 2 laser sensor connected to analog inputs to measure the offset and move the gripper accordingly.
Is there a way to export the program to use the analog input to either move to a position or perhaps shift the base around? So far I have only been able to export the program to create a defined set of static coordinates. Do I have to create a custom post processor to add some custom commands?
Edit: I have found the python instruction 'RunInstruction()'. I think I can make my program work by implementing this to read the analog value, write the result to variables, and then inserting a PTP command to move to the X and Y coordinates based on the variable values... This is probably a valid workaround, or does anyone have any other ideas? Is something similar perhaps already implemented in RoboDK?