Force position before cycle

Force position before cycle

jas.okon
Enthusiast Enthusiast
491 Views
1 Reply
Message 1 of 2

Force position before cycle

jas.okon
Enthusiast
Enthusiast

Helo,

I'm creating post processor for a horizontal mill with old Sinnumerik 810M controller. Everything works ok, except drilling cycles. 

in my CNC code I need the tool to be repositioned to first point's X and Y, and then line with G81 execute the drilling. 

So my question is: How can I get access to the first point's coordinate inside onCycle function?

Thanks for help!

0 Likes
Accepted solutions (1)
492 Views
1 Reply
Reply (1)
Message 2 of 2

jas.okon
Enthusiast
Enthusiast
Accepted solution

Well, I have found it out by myself after a while of trying.

If someone else is interested you need to use this code to make sure machine is at first drill cycle point before starting cycle:

 

var pos1=getCyclePoint(0); 
  xOutput.reset();
  yOutput.reset();
  writeBlock(gMotionModal.format(0),xOutput.format(pos1.x),yOutput.format(pos1.y));

 

0 Likes