trying edit post for 5axismaker

trying edit post for 5axismaker

Anonymous
Not applicable
22,188 Views
62 Replies
Message 1 of 63

trying edit post for 5axismaker

Anonymous
Not applicable

I am trying to edit post processor for 5axismaker which is controlled by mach3.

This machine is head-head machine the B, C axis with axis offset.( see attachment)

 

So, I try to setup the axis of machine from  post processor

 

I test these two settings to generate gcode, but all of them are the same, seems setting offset for axis is no difference.

 

1.

if (true) {
var bAxis = createAxis({coordinate:1, table:false, axis:[0, 1, 0], offset: [0, 30.44, 0], range:[-190,190], preference:0});
var cAxis = createAxis({coordinate:2, table:false, axis:[0, 0, 1], offset: [0, 0, 57.1], range:[-360,360], preference:0 ,cyclic: properties._cyclic});
machineConfiguration = new MachineConfiguration(bAxis, cAxis);

 

2.

if (true) {
var bAxis = createAxis({coordinate:1, table:false, axis:[0, 1, 0], offset: [0, 0, 0], range:[-190,190], preference:0});
var cAxis = createAxis({coordinate:2, table:false, axis:[0, 0, 1], offset: [0, 0, 0], range:[-360,360], preference:0 ,cyclic: properties._cyclic});
machineConfiguration = new MachineConfiguration(bAxis, cAxis);

 

what did I do wrong?

0 Likes
Accepted solutions (3)
22,189 Views
62 Replies
Replies (62)
Message 41 of 63

Sverhu
Advocate
Advocate

How do I add offset compensation to the postprocessor or is there another way to fix it?

0 Likes
Message 42 of 63

bob.schultz
Alumni
Alumni

You can assign the distance between the A-axis and C-axis rotational vectors by setting the following variable in the post.

 

// fixed settings
var pivotDistance = toPreciseUnit(237.61, MM); 
var cAxisOffset = toPreciseUnit(0, MM); // <<< DEFINE THE C-AXIS OFFSET HERE


Bob Schultz
Sr. Post Processor Developer

Message 43 of 63

Sverhu
Advocate
Advocate

 I'll try your version in the morning.

 

0 Likes
Message 44 of 63

Sverhu
Advocate
Advocate
var cAxisOffset = toPreciseUnit(0, MM); // <<< DEFINE THE C-AXIS OFFSET HERE

Great! It works the way it should. Is there any method of calibration of the kinematic scheme
of machines with a rotating head? I am particularly interested in my case with the C axis .
Thank you so much for helping with the postprocessor, I hope my sleepless nights on setting up the program will end soon)))

0 Likes
Message 45 of 63

bob.schultz
Alumni
Alumni

By calibration, do you mean physically calculating the C-axis offset distance on the machine?



Bob Schultz
Sr. Post Processor Developer

0 Likes
Message 46 of 63

Sverhu
Advocate
Advocate

Yes, it is about this option.

0 Likes
Message 47 of 63

bob.schultz
Alumni
Alumni

I don't think I quite understand what you are asking here if you already have instructions in the manual to calibrate the C-axis.

 

The basic approach is to rotate the C-axis at least 180 degrees and measure the distance from the cut side to the other cut side.  You could even hand program the C-axis to rotate 360 degrees when it is inside of the part and measure the circular boss that is cut.  The C-axis offset will be the radius of the boss plus the radius of the cutter.



Bob Schultz
Sr. Post Processor Developer

0 Likes
Message 48 of 63

Sverhu
Advocate
Advocate

Это метод, который вы описали, я правильно вас понял?

 

0 Likes
Message 49 of 63

bob.schultz
Alumni
Alumni

No, to calculate the C-axis offset the tool will need to be vertical and no axes should move except for the C-axis.  Depending on the physical offset of the C-axis centerline to the A-axis centerline and cutter diameter used you may not get a boss in the center of the cut, but rather a circular hole, which you can still measure to determine the C-axis offset.



Bob Schultz
Sr. Post Processor Developer

0 Likes
Message 50 of 63

Sverhu
Advocate
Advocate

Thank you all, I've solved everything

Message 51 of 63

Sverhu
Advocate
Advocate

He's back again.
When processing a part from different sides, an offset of about 5 mm appears. Compensation of the tool var c Axis Offset = to Precise Unit(0.5, MM); it does not affect it in any way, there is a parallel offset of processing. Changes in the line //displacement = Vector.diff(displacement, new Vector(c Axis Offset, 0, 0)); lead to a shift in the positive or negative side of processing, a gap between the axes appears about 5mm.

tell me what to pay attention to, where it can be changed?

4511.JPG

when turning to these positions of the axes G0A90. C90. and G0 A-90. C-90. there is a physical displacement between them by 5 mm, I no longer know how to overcome this problem

цаца.JPG

 

 

0 Likes
Message 52 of 63

bob.schultz
Alumni
Alumni

There are a couple of important things you need to consider for the C-axis offset.

  1. The difference between the cuts with the C-axis at 0 and 180 degree cuts will be double the difference of  the misalignment of the C-axis.  For example, if the cut difference is .5mm, then the difference in cAxisOffset will be .25mm.
  2. This post is based off of the 5AxisMaker post, whose C-axis offset is in the X-axis direction.  Your machine rotates around the Y-axis, so I am assuming that the C-axis needs to be offset in the Y-axis direction instead.

The following code in getOptimizedHeads calculates the offset for the C-axis.  You commented out a section of the code, which should not be commented out.  You can also change the adjustment of the C-axis from the X-axis to the Y-axis here if needed.

 

    // adjust point for C-axis offset

    // <<< Adjusts for the C-axis along the X-axis.  Change to (sin, cos, 0) to adjust along the Y-axis
    // <<< You may have to play with the '-' values to get the correct offset
    displacement = new Vector(-Math.cos(_c), Math.sin(_c), 0);

    displacement.multiply(cAxisOffset); // control will compensate for tool length
    if (!getProperty("setupAtCenterOfCAxis")) {

      // <<< Do not comment out the following line
      // <<< It places the output coordinate back in line with the spindle axis
      //displacement = Vector.diff(displacement, new Vector(cAxisOffset, 0, 0));
    }

 



Bob Schultz
Sr. Post Processor Developer

Message 53 of 63

Sverhu
Advocate
Advocate

You think that changing the axis of rotation from X to Y will work, I will check tomorrow. Thank you in advance

 

 

 

      // adjust point for C-axis offset
    displacement = new Vector( Math.sin(_c)-Math.cos(_c), 0);
    displacement.multiply(cAxisOffset); // control will compensate for tool length
    if (!getProperty("setupAtCenterOfCAxis")) {
      displacement = Vector.diff(displacement, new Vector(0,cAxisOffset, 0));
    }

 

// <<< You may have to play with the '-' values to get the correct offset- I will definitely check it out

 

 

 




 

0 Likes
Message 54 of 63

Sverhu
Advocate
Advocate

Hi,bob.schultz. After much testing, a new problem arose. The problem occurs when I perform each of the two procedures separately,
the desired offset of the C axis does not occur, this can be seen in the figure. But when combining two procedures into one program, the C axis is shifted correctly, as expected.
Where do I need to fix this in the post processor?

123123.JPG

0 Likes
Message 55 of 63

bob.schultz
Alumni
Alumni

On this machine there are always 2 possible solutions for the rotary axes position.  In you test case, A-90 C-180 has the same tool orientation as A90 C0, so both are correct.  In your post the solution chosen by the post is arbitrary, meaning there is no guarantee which solution will be selected.

 

There are different ways to control the solution.  For example, if you prefer that the A-axis always be negative, then make the following change to the definition of the A-axis in the onOpen function.

 

  if (true) {
    var aAxis = createAxis({coordinate:0, table:false, axis:[0, -1, 0], range:[-120.00, 120.00], preference:-1}); // <<< ADD 'preference:-1'
    var cAxis = createAxis({coordinate:2, table:false, axis:[0, 0, 1], offset:[0, cAxisOffset, 0], range:[-360.00, 360.00], cyclic:false});

 



Bob Schultz
Sr. Post Processor Developer

0 Likes
Message 56 of 63

Sverhu
Advocate
Advocate

It is strange why then the postprocessor does not take into account the set value by which the offset of the C axis will be in the line var cAxisOffset = toPreciseUnit(2.6, M);
Thanks for the advice, I will test tomorrow

0 Likes
Message 57 of 63

Sverhu
Advocate
Advocate

Hi! I want to express my great gratitude for the help provided in creating a postprocessor. Everything worked out and works! Thank you very much!

Message 58 of 63

Sverhu
Advocate
Advocate
Hello, I have a problem with axis offsets. The bottom line is that there is a negative offset on the C axis, I can't set it in the postprocessor, which I just didn't do because I didn't change the value, nothing helps. Tell me where in the postprocessor I need to set this offset. In the pictures , I tried to indicate the problem.
When the C axis rotates, the tool is displaced, these displacements are indicated in the figure
 I added offsets to displacement = Vector.diff(displacement, new Vector( 0,cAxisOffset , 0)); nothing comes out, processing is shifted, in the figure how the offset is indicated in blue
1xx.png
axis.png
btbtt.JPG
0 Likes
Message 59 of 63

bob.schultz
Alumni
Alumni

Hello @Sverhu

 

The post you are working with is using very old logic, the ability to calculate offset axes has been supported for quite some time in the post processor engine.

 

My recommendation is to start with the RS-274 Multi-axis post processor and read Chapter 7 in the Post Processor Training Guide, especially focusing on Section 7.3 Adjusting the Points for Offset Rotary Axes.  The definition of the rotary axes is handled in the defineMachine function and you can specify offsets in both the X and Y directions.



Bob Schultz
Sr. Post Processor Developer

0 Likes
Message 60 of 63

Sverhu
Advocate
Advocate

Hi! And there is, as an example, an already working postprocessor based on this multi-axis RS-274 processor, I would like to see? I'm still just learning and I don't know many subtleties

0 Likes