Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Pick & place variable pick postions / place offset

#1
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?
#2
If you want to get user input from the teach pendant it requires a custom integration with code. For example, you may need to create a distance variable proportional to the distance read by the sensor, then adjust an offset based on that distance.

Another option is to integrate your sensor with your computer and create a script that automatically adjusts your code on the fly and you generate new code using Python and based on sensor input.
#3
Thanks for your reply.

I should have clarified, I do not intend to run RoboDK online with a PC connected to the robot. I intend to use RoboDK for offline programming, generate the robot program and download that to the robot. I do not intent to leave a PC permanently connected to the robot.

I also do not intend to prompt the user for input with the teach pendant.

The question should have been: Is it possible to generate a program that calculates target positions (when the program is in the robot, and the PC is disconnected) based on analog inputs or variables?

Ideally it would look like this (or something similar):

Somewhere in a .dat file I would manually type this (or perhaps also automated with RoboDK if possible?):

DECL E6POS PickPos{X100.0, Y100.0, Z500.0, A0.0, B0.0, C0.0}
REAL OffsetX = 0.0
REAL OffsetY = 0.0

And then the .src file generated by RoboDK should look something like this:

; Init speeds, set advance pointer, PTP$Axis_act, etc.....
; move to the pick positioin
LIN{PickPos}
; Measure the offset
OffsetX = aiSensorX / Scale
OffsetY = aiSensorY / Sclae
PickPos .X = PickPos.X + OffsetX
PickPos .Y = PickPos .Y + OffsetY
; Move to the corrected position
LIN{PickPos}

This is of course simplified, but you get the point

Is something like this posible?
#4
This is not possible by using the UI or the Python API unless you output custom code such as the code snipped you mentioned.
  




Users browsing this thread:
1 Guest(s)