So, maybe I'm missing something, but I did a quick check at RoboDK docs, and didn't find anything about this particular topic.
Is there a way to import a existing robot program on RoboDK?
So, maybe I'm missing something, but I did a quick check at RoboDK docs, and didn't find anything about this particular topic.
Is there a way to import a existing robot program on RoboDK?
Hi there,
Importing "hand-written" program is not an officially supported feature.
Therefore, we cannot guarantee any result.
I still recommend you to give it a try.
Start by building your station with the same robot and tool(s) as in your program.
You can then drag and drop the program in RoboDK's window.
If things turn out well, you can retrieve the movements and the target.
If only the movements appear, select the movements (one or many at the same time) -> "right click" -> "Select Targets".
If you are importing from KUKA, we also have a dedicated script to import .src files.
"Main menu" -> "Tools" -> "Run Script" -> "Import_KUKA_SRC_Program"
Hope it helps.
Have a great day.
Jeremy
Nice!
I will try this.
Thanks, Jeremy.
Do all the points have to be defined in the SRC file? I mean that is the DAT file ignored?
RoboDK example program for importing works fine.
DEF ExampleProgram( )
$BASE = {FRAME: X 0.000,Y -1000.000,Z 0.000,A 0.000,B 0.000,C 0.000}
$TOOL = {FRAME: X 466.604,Y -4.165,Z 109.636,A -0.000,B 90.000,C 0.000}
$VEL.CP = 1.00000
PTP {A1 107.78457,A2 -44.95260,A3 141.64681,A4 107.66839,A5 -87.93467,A6 6.37710}
LIN {X -0.000,Y -0.000,Z 6.350,A -180.000,B 0.000,C -180.000}
$VEL.CP = 0.02117
LIN {X 276.225,Y 0.000,Z 6.350,A 180.000,B 0.000,C -180.000}
LIN {X 276.225,Y 323.850,Z 6.350,A -160.000,B 0.000,C 180.000}
LIN {X -0.000,Y 323.850,Z 6.350,A -180.000,B -0.000,C -180.000}
LIN {X -0.000,Y -0.000,Z 6.350,A -180.000,B 0.000,C -180.000}
$VEL.CP = 1.00000
LIN {X -0.000,Y -0.000,Z 106.350,A -180.000,B 0.000,C -180.000}
END
Display More
But if I have handwritten logic, loops, counters, calculations ... it will not work.
If I would like to try out some behavior like that I have to write it in Python ?
Hi Koppel,
It's better if the points were part of the SRC file as DAT file can't be loaded.
As said before, you may need to use the "Select targets" option to retrieve the position.
For logics, loops, counter, etc. you need to use the Python API.
Mode details in this link.
Have a great day.
Jeremy
Hi,
I don't understand what is supposed to happen when I choose "Select target"
What I have done:
... I guess I understand what is supposed to happen... but I don't understand how this is useful?
Seems like just another way to import targets...
What I would like to have is a trick that would enable me to kind of use the points in a SRC file in the format of "PTP Point1"... "PTP Point2" ... etc.
Where the coordinates are in a DAT file.
I wondered if I already had a TARGET named "Point1" and I then import the SRC file... that it would somehow pick up the relationship but it didn't.
I tested another way.
I was expecting to exchange the failed points with my previously imported targets and then at least make the sequence of the movements work.
I guess I have to manually recreate my program in RoboDK by importing all the points in my DAT file and then create new program and adding "Set reference frame instruction" between the points when nessessary
Hi Koppel,
As mention, this feature is not official.
We are just giving you access to a piece of development we did some times ago and never became a full blown feature for 1 main reasons, we support about 30 different brands, if we do it for one... we need to do it for at lease 10-12 brands... That's a big can of worms for us.
End that's not considering the different "flavor" of code each brand has. Example: .src, .src + .dat, .src + .csv
If you really need this, developing just one specific solution for your specific needs is not such a huge thing and if you have a bit of a coding background, you should be able to pull it of. In the end, you just need to "read" the .src and .dat file and extract the information.
Using Python you can easily crawl through your .dat file, fine a point, retrieve Name, Position, Joints and use something like:
There's already a small example of that in the local library you installed with RoboDK.
C:/RoboDK/Library/Script -> Import_KUKA_SRC_Program
You can find more info regarding our API here: API Documentation
Jeremy