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

Program Events From Apt File

I am using RoboDK for our UR10e, we will be sanding parts with it. The UR is not in our building at this time as it is at our OEM getting the cell for the sanding constructed. I want to output the linear inches of my path to help and set a global variable on the UR, my OEM says that this is possible but has not given me the format of what that need to look like coming out of the UR post processor. I am outputting an apt file from Siemens NX. i have figured out how to change the apt file to output the linear inches of the tool path and i can change it to look how i want but as of now it is just like this, just because i copied the AUXFUN for now


i have read thru some of the help threads but i am still unsure of how to get RoboDk to read this and output it to what i need it to be. Again, i don't know how it will need to look in the script file but for now if i could understand how to get RoboDk to read something from the apt file and output it how i need it to be would be great

Hi there,

Even if it's not exactly the same subject, some interesting information can be found in this thread :

You can catch some specific code from your G-Code to trigger specific behavior from RoboDK.

Have a great day.
Hi John,

With APT files you can use the commands CALL to provoke a program call and CODE to output any code. The main difference is that when you use CALL, the post processor takes care of generating the code syntax, when you use CODE, you need to provide the full syntax the robot controlller needs.

For example, on a Motoman robot:
CALL Program1 will output CALL JOB:Program1
CODE Program1 will output Program1

Other than the GOTO commands you can use the commands provided in this example:

$$ This line is a comment

$$ Fast move to X,Y,Z (uses RoboDK rapid speed, 1000 mm/s by default, you can change it in Program Events)
GOTO 0 0 100

$$ Define the cutter:
$$ CUTTER/ Diameter (D), Radius (Rc), (ignored), (ignored),  (ignored),  (ignored),  Length
$$ RoboDK will automatically create a cutter if you activate:
$$ Tools-Options-CAM-Automatically create cutters
CUTTER/ 4,  1,  3,  2,  0,  0, 20

$$ Provoke a tool change event such as SetTool(2) (default event settings)
$$ RoboDK will automatically split to one program per tool if you activate:
$$ Tools-Options-CAM-Automatically set one project per tool

$$ set the TCP speed:

$$ move to X,Y,Z,i,k,k
GOTO / 0 0 0 0 0 1

$$ move to X,Y,Z,i,k,k
GOTO / 100 0 0 0 0 1

$$ Next line is a program call
CALL ProgramCall

$$ Next line is a program passing parameters, for example, XYZ values
$$ The macro shows an example to simulate the movement: C:/RoboDK/Library/Macros/
$$ This file needs to be added to the RoboDK station
CALL CallNC(100,0,-25)

$$ move to X,Y,Z,i,k,k
GOTO / 100 0 0 0 0 1

$$ move to X,Y,Z,i,k,k
GOTO / 0 0 0 0 0 1

$$ Next line is a raw input line (supported with a new release next week)
CODE RawLine;

PPRINT Turning Digital Output 12 to ON

PPRINT Pause 5 seconds

PPRINT Turning Digital Output 12 to OFF

PPRINT Wait Digital Input 12 to turn OFF
$$ Inputs and outputs are simulated using station variables
$$ for example, using the API you can call:
$$ RDK.setParam('IO_12',1)

$$ You can also have a timed out wait:
Thanks Guys, I played around with this and it works good, i will just need to wait to see what the output will need to look like in the UR and change accordingly. Thanks again
Good morning,

My name is Henry Christian.

So I would like to know if there is someone who knows how to convert the G-code program to a Fanuc robot. Normally, I designed trajectory of the robot using a slicer and save it as Gcode, so I would like to know how I can use it for a Fanuc robot for additive manufacturing purposes.

Thank you

Users browsing this thread:
1 Guest(s)