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

Variables in NC code with RoboDK

#1
Hello, asking for help with NC files to use with RoboDK

Goal is to make machinings with robot, NC files are from customer, and they are built for certain CNC machines. With much little editing as possible I should get those files to function with RoboDK. I can build some python formatter that formats the code, but biggest issue is using variables in NC code with RoboDK. Is this possible and how I should format them? I don't know original machines code prosessing before executing.

Example code:

Code:
R7=100 (Width of the piece)
R6=2000 (Length of the piece)
R4=100 (Thickness of the piece)
R30=R7-59.5
R2=R6/2
R31=0
N170 G2 X=R2-222-R31 Y=R30-14 B11
#2
It is currently not possible to define variables in NC files. At least RoboDK won't understand these parameters and formulas.

What software are you using to generate these NC files?
Is it possible for you to output APT files?
#3
(04-20-2023, 11:39 PM)Albert Wrote: It is currently not possible to define variables in NC files. At least RoboDK won't understand these parameters and formulas.

What software are you using to generate these NC files?
Is it possible for you to output APT files?

I am receiving the NC files from customers ERP system where the files are made for CNC-machines so I think honest answer for this is no, not possible.

I need to edit the NC-file pretty much anyhow, for example remove equal marks on axis positions, change radius command (for example B11 -> R11). Change G0 to G00. (This changed the function for me), etc. 

So it seems to be coming together so that I make the robot programs with manually edited NC-file and RoboDK for each part they want to be done with the robot. I use zero values at piece dimensions on NC-code and then move the used frame and possibly individual points at the start of the robot program according to work piece dimensions got from the upper system.

Other question for NC-files. Can there be calculations without variables on axis position commands? For example G01 X[100-2]. Trying to find out if I can replace parameters to be zero on the calculations, or do I have to make the calculations for the movements to file before giving code to RoboDK?
  




Users browsing this thread:
1 Guest(s)