Author Topic: RoboDK g-code import  (Read 204 times)

0 Members and 1 Guest are viewing this topic.

Offline deff0

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
RoboDK g-code import
« on: October 25, 2017, 03:52:16 PM »
Hi guys!
I'm new to this forum but looks like it's the only one to discuss topics on RoboDK. RoboDK is a quite nice software, but user support is poor. Forum at robodk.com is dead, new user accounts have not been activated for several month.

Now back to the main subject. I've created a cell with ABB IRB140 and IRBP and I'm learning to program it by writing G-code. Let's image there is a cylinder attached to IRBP flange. I want IRB140 to draw a helix on cylindrical surface (like threading operation).
Code: [Select]
G01
G64 G91 G94
F 5000.
A 12600 X 700 (where A 12600 is 35 full turns and X 700 is pen moving along cylindrical surface)

Offline Albert

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 1
  • Posts: 35
Re: RoboDK g-code import
« Reply #1 on: October 28, 2017, 09:27:04 PM »
It is better if you generate a generic 5 axis milling toolpath without information about the positionner (just X,Y,Z and A,B,C or i,j,k for the tool axis).
Then, in RoboDK you'll have to build your synchronized system:
    1- Place the turntable with respect to the robot the same way you defined on your controller (I assume you measured the real setup)
    2- Select Utilities-Synchronize external axes, then, select OK (the synchronized system will be automatically selected)
    3- If you have a turntable you'll see a box in the robot machining section that allows you to keep the position or the tool orientation as constant as possible (image attached).
If you have a 2 axis turntable you can set your 1st axis (first blue case), provide your preferred start point for the 2nd axis (second blue case) and this option will move the second axis automatically when you select Update/Simulate. You can also provide an offset with respect to the default value. The following video will give you an idea:


Alternatively, you can use the RoboDK API to generate a program, this will allow you to provide XYZWPR and external axis position for each point.
The following section might give you some hints if you are familiar with Python:
https://robodk.com/doc/en/PythonAPI/examples.html#move-through-points

Thank you for your feedback regarding RoboDK's forum. We receive a lot of spam through that forum and we only activate accounts that don't look like bots so if you have a company or university account you have more chances of getting your account properly activated. Let us know if this is not the case.
For fastest help I recommend you to post on this forum and send us an email at info@robodk.com, I'll get back to you as soon as possible.

By the way, we have recently improved our online help section:
https://robodk.com/doc/en/

Offline deff0

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
Re: RoboDK g-code import
« Reply #2 on: October 29, 2017, 06:10:18 PM »
Albert, thank you for your reply.
The sample g-code from my first post was exported from some sort of CAM software. I'm looking for an approach to import it to RoboDK. Looks like I need to reconstruct toolpath to 1 of following languages: g-code, APT, Python. What I like about g-code and APT is that I have that useful "Machining/welding project" window. Python is my plan B.
Now I'm looking for a suitable g-code patterns that RoboDK will understand. I'll use that patterns in my CAM-to-RoboDK converter. And I'm basically stuck now. I can't find a way to draw a helix toolpath using generic g-code.

Code: [Select]
G21
G90
G64
G00 X0 Y50 Z0.125
F5000
M06 T0
M03
G02 X50 Y0 I0 J-50 Z20
G02 X0 Y-50 I-50 J0 Z20
G02 X-50 Y0 I0 J50 Z20
G02 X0 Y50 I50 J0 Z20
M05
M30

RoboDK doen't like G02 strings, an error pops up. What is strange that it does helix movement for first G02 call, but all other Z-movements are ignored (see attached picture). And drawing a helix is the simplest toolpath I have...
Looking forward any usefull suggestions.

Offline Albert

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 1
  • Posts: 35
Re: RoboDK g-code import
« Reply #3 on: November 10, 2017, 11:02:24 PM »
It looks like you are using absolute coordinates and your Z coordinate remains at 20.
The Z20 is meant to keep your circles at that height.

Also, the warnings that pop up warn you that the center of the arc is not at equal distance from the start and end points.

Do you have a more complete example and a screenshot of the toolpath?
What CAM software are you using?

Offline deff0

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
Re: RoboDK g-code import
« Reply #4 on: November 11, 2017, 01:21:56 PM »
Yep, it was my mistake. I should increment Z axis for every arc.
But if I input the g-code
Code: [Select]
G21
G90
G64
G00 X0 Y50 Z0.125
F5000
M06 T0
M03
G02 X50 Y0 I0 J-50 Z20
G02 X0 Y-50 I-50 J0 Z40
G02 X-50 Y0 I0 J50 Z60
G02 X0 Y50 I50 J0 Z80
M05
M30

The path looks like a set of non-tangent arcs. If I input this code to ncviewer (ncviewer.com) I get a nice looking helix.

Still not sure if g-code is a good way to convert programs for RoboDK.
I've sent you a PM for a sample program and toolpath.
« Last Edit: November 11, 2017, 01:25:09 PM by deff0 »