Mazak HCN-6000 CCW rotary indexing

Mazak HCN-6000 CCW rotary indexing

dandersonF79KU
Explorer Explorer
230 Views
2 Replies
Message 1 of 3

Mazak HCN-6000 CCW rotary indexing

dandersonF79KU
Explorer
Explorer

Hi all, 

 

I have a Mazak HCN-6000 that I'm posting programs using a modified version of the generic Mazak milling post (v44104), and have a slight nuisance I was hoping somebody may have a solution for. 

 

The indexing rotary on this machine uses 1x1000 degrees for the rotary units, which I've been able to modify the post for; but this machine indexes in the clockwise direction by default, unless an M42 command is given with the rotary position. Example: rotating from 270° to 260° would index in the clockwise direction all the way around, without the M42 code. 

 

Is there any way to modify the post to get the previous op's rotary position, compare to the position to be indexed; and then if the difference is negative add M42 before the rotary position to force counter-clockwise indexing?

 

Thanks in advance!

0 Likes
231 Views
2 Replies
Replies (2)
Message 2 of 3

serge.quiblier
Autodesk
Autodesk

Hi @dandersonF79KU 

 

let's suppose you want to implement this functionnality in the inLinear5D function

It is possible to interrogate the previous value of an output variable before we set something different inside.

function onLinear5D(_x, _y, _z, _a, _b, _c, feed, feedMode) {
  if (!currentSection.isOptimizedForMachine()) {
    error(localize("This post configuration has not been customized for 5-axis simultaneous toolpath."));
    return;
  }
  // at least one axis is required
  if (pendingRadiusCompensation >= 0) {
    error(localize("Radius compensation cannot be activated/deactivated for 5-axis move."));
    return;
  }
  var oldCValue = cOutput.getCurrent();
  if (_c >= oldCValue) {
    writeln("Growing");
  } else {
    writeln("Diminishing");
  }
  var x = xOutput.format(_x);
  var y = yOutput.format(_y);
  var z = zOutput.format(_z);
  var a = aOutput.format(_a);
  var b = bOutput.format(_b);
  var c = cOutput.format(_c);

 

In my example, line 11 I am grabbing the value of the axis, before it is updated in line 22.

Both value, the _c and the oldCvalue will be expressed as radian unit, not degree.

My initial test is very simple, and assume that both values will be positive.

 

In fact we should compare the values in three differents scenarios.

Both values positives, both negative, and the mix one positive, the other negative, to implement a more reliable check.

Ax you may have to use it in different location in the post, it will probably be better to create a function isCRotationCW, and passing the old and new values to the function.

 

Regards.

 


______________________________________________________________

If my post answers your question, please click the "Accept Solution" button. This helps everyone find answers more quickly!

 



Serge.Q
Technical Consultant
cam.autodesk.com
Message 3 of 3

dandersonF79KU
Explorer
Explorer

Thanks Serge! I'll give this a try the next time I post for this machine.

0 Likes