trying edit post for 5axismaker

trying edit post for 5axismaker

Anonymous
Not applicable
22,178 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,179 Views
62 Replies
Replies (62)
Message 2 of 63

bob.schultz
Alumni
Alumni
Accepted solution

The offset parameter in the createAxis command is not currently supported in HSM nor does it properly adjust points for rotary heads (tables only), so you will need to add logic to your post to  adjust the output XYZ coordinates to match your machine configuration.  For this style of machine you will also have to enable TCP mode so that the tool center point is available to the post.

 

    optimizeMachineAngles2(0); // TCP mode - we compensate below

 

The Generic 5-Axis Thermwood  post contains logic that will adjust the points for a rotary head with a common pivot point.  You can look at the following sections of code in the post to see how it is done.

 

var pivotDistance = toPreciseUnit(10.291 + 2.5, IN); // 2.5in is assumed for the tool length
headOffset = /*tool.bodyLength +*/ pivotDistance; // control will compensate for tool length
    var displacement = machineConfiguration.getDirection(new Vector(_a, _b, _c));
    // var displacement = currentSection.workPlane.forward;
    displacement.multiply(headOffset);
    displacement = Vector.diff(displacement, new Vector(0, 0, headOffset));
    xOutput.offset = displacement.x;
    yOutput.offset = displacement.y;
    zOutput.offset = displacement.z;

For your machine you will also have to adjust the XYZ coordinates for the C-axis center of rotation, since it is offset from the B-axis center of rotation.  You will need to create a new vector accounting for the C-axis rotation for the displacement vector in this case and perform the same operation as above using the offset value for the C-axis.  For example:

    displacement = new Vector(Math.cos(_c), Math.sin(_c), 0);

Make sure that the signs of the C-axis displacement vector are correct for the orientation of the C-axis on your machine.



Bob Schultz
Sr. Post Processor Developer

Message 3 of 63

Anonymous
Not applicable
Accepted solution
Thanks a lot!!
I will study harder to figure out of this!!
0 Likes
Message 4 of 63

bayramW2A6L
Contributor
Contributor
Accepted solution
displacement = new Vector(Math.cos(_c), Math.sin(_c), 0);

What will I write this line. 

 

thank you now.

0 Likes
Message 5 of 63

Anonymous
Not applicable
This help me a lot thanks, especially the attachment photo, thanks!
0 Likes
Message 6 of 63

bayramW2A6L
Contributor
Contributor

hi fitztu;

 

I could not do it. Did you do it.

displacement = new Vector(Math.cos(_c), Math.sin(_c), 0);

Where to do it.

0 Likes
Message 7 of 63

bayramW2A6L
Contributor
Contributor

hi bob;

 

I could not do it.

displacement = new Vector(Math.cos(_c), Math.sin(_c), 0);

Where this line will be written.

 

0 Likes
Message 8 of 63

Anonymous
Not applicable
Hi i write here
0 Likes
Message 9 of 63

bayramW2A6L
Contributor
Contributor
hi Fitstu;
Sorry. I could not do it. There is an error but I could not find it. I'm happy if you help me.
my post file thermwoo.cps
0 Likes
Message 10 of 63

Anonymous
Not applicable

I think you have to show more information about your machine.

Because edit a post is not like this just put some section in then will work.

0 Likes
Message 11 of 63

bayramW2A6L
Contributor
Contributor

h i Fitztu;

thank you very much

Machine information in the attachment file.
 my machine mazak integrex years of 2002 model.

Iso is not calculating in programming.

pivot distance 200mm

pivot distance+tool lenght.

best regards

0 Likes
Message 12 of 63

Anonymous
Not applicable

Hi bayramW2A6L

 

I saw your machine's structure.

I think you don't have to use this math formula

displacement = new Vector(Math.cos(_c), Math.sin(_c), 0);

 

And I have read your cps file, your machine is AB structure but in your cps file you set with BC structure.

this line

displacement = new Vector(Math.cos(_c), Math.sin(_c), 0);

 

is for C axis, there is no C axis on your machine.

 

you can just simply set to AB axis then i think it will be work.

0 Likes
Message 13 of 63

bayramW2A6L
Contributor
Contributor

Axis B-C is set.

Tool length calculated.

Pivot calculated.

But in the intermediate angles the x-axis and the y-axis change.

my machine config: 

 

<?xml version="1.0"?>
<machine xmlns="http://www.hsmworks.com/xml/2009/machine" version="1.0">
<description>Generic 5-axis AC (table-table)</description>
<machining milling="yes" turning="no" wire="no"/>
<tooling toolChanger="yes" toolPreload="yes" numberOfTools="100" maximumToolLength="0mm" maximumToolDiameter="0mm" maximumToolWeight="0kg"/>
<machiningTime ratio="1" toolChangeTime="15s"/>
<coolant options="FLOOD MIST THROUGH_TOOL AIR AIR_THROUGH_TOOL SUCTION FLOOD_MIST FLOOD_THROUGH_TOOL"/>
<home x="0mm" y="0mm" z="0mm"/>
<capabilities workOffsets="100"/>
<spindle axis="0 0 1"/>
<post/>
<simulation wcs="0mm 0mm 0mm" retractOnIndexing="yes" shortestAngularRotation="yes"/>
<axis id="Y" link="head"/>
<axis id="X" link="head"/>
<axis id="Z" link="head"/>
<axis id="U" actuator="rotational" axis="0 1 0" coordinate="Y" link="head"/>
<axis id="V" actuator="rotational" axis="0 0 1" coordinate="Z" link="table"/>
</machine>

0 Likes
Message 14 of 63

AchimN
Community Manager
Community Manager

Have a look in getWorkPlaneMachineABC() for this line:

 

  var tcp = true;

and change it to this:

  var tcp = false;


Achim.N
Principal Technology Consultant
0 Likes
Message 15 of 63

bayramW2A6L
Contributor
Contributor

 

 

var tcp = false; is nothing

 

 

 

POS-1.jpg

 

0 Likes
Message 16 of 63

AchimN
Community Manager
Community Manager

Ahaaa, noticed that you did not enable your machine configuration for BC axis, it is set to false.

 

Pleas search for this line in onOpen()

  if (false) { // note: setup your machine here

 

and change it to true, otherwise your BC axis setup will be ignored by the post.



Achim.N
Principal Technology Consultant
0 Likes
Message 17 of 63

bayramW2A6L
Contributor
Contributor

Hi AchimN;

my machine is integrex 2002 model b/c axis. b axis angle not calculate.

 

function onOpen() {

if (true) { // note: setup your machine here
var bAxis = createAxis({coordinate:1, table:false, axis:[0, 1, 0], range:[-110, 110], preference:1});
var cAxis = createAxis({coordinate:2, table:false, axis:[0, 0, 1], range:[0, 360], preference:1});
machineConfiguration = new MachineConfiguration(bAxis, cAxis);

setMachineConfiguration(machineConfiguration);
optimizeMachineAngles2(0); // map tip mode
}

if (!machineConfiguration.isMachineCoordinate(0)) {
aOutput.disable();
}
if (!machineConfiguration.isMachineCoordinate(1)) {
bOutput.disable();
}
if (!machineConfiguration.isMachineCoordinate(2)) {
cOutput.disable();
}

if (!properties.separateWordsWithSpace) {
setWordSeparator("");
}

 

my nc code


G90 G94 G40
M5
G0 Z0.

(**** TRUE ****)
M5
T1
S5000 M3
M8
G0 B45. C-180.
G17
G0 X30.607 Y0.
Z20.607
X23.536 Z13.536
G1 X20.707 Z10.707 F333.3
X10. Z0.
X30. Z-20. F1000.
G0 X50.607 Z0.607
G25C
Z0.

(**** FALSE ****)
T1
S5000 M3
M8
G0 B45. C-135.
X21.642 Y21.642
Z20.607
X16.642 Y16.642 Z13.536
G1 X14.642 Y14.642 Z10.707 F333.3
X7.071 Y7.071 Z0.
X21.213 Y21.213 Z-20. F1000.
G0 X35.784 Y35.784 Z0.607
G25C
Z0.

(**** HALF TRUE ****)
T1
S5000 M3
M8
G0 B45. C-90.
X0. Y30.607                               (Y0)
Z20.607
Y23.536 Z13.536
G1 Y20.707 Z10.707 F333.3
Y10. Z0.                                     (X10)
Y30. Z-20. F1000.                      (X30)
G0 Y50.607 Z0.607
G25C
Z0.

(**** FALSE ****)
T1
S5000 M3
M8
G0 B45. C-45.
X-21.642 Y21.642
Z20.607
X-16.642 Y16.642 Z13.536
G1 X-14.642 Y14.642 Z10.707 F333.3
X-7.071 Y7.071 Z0.
X-21.213 Y21.213 Z-20. F1000.
G0 X-35.784 Y35.784 Z0.607
G25C
Z0.

(**** TRUE ****)
T1
S5000 M3
M8
G0 B45. C0.
X-30.607 Y0.
Z20.607
X-23.536 Z13.536
G1 X-20.707 Z10.707 F333.3
X-10. Z0.
X-30. Z-20. F1000.
G0 X-50.607 Z0.607
G25C
Z0.

(**** FALSE ****)
T1
S5000 M3
M8
G0 B45. C45.
X-21.642 Y-21.642
Z20.607
X-16.642 Y-16.642 Z13.536
G1 X-14.642 Y-14.642 Z10.707 F333.3
X-7.071 Y-7.071 Z0.
X-21.213 Y-21.213 Z-20. F1000.
G0 X-35.784 Y-35.784 Z0.607
G25C
Z0.

(**** HALF TRUE ****)
T1
S5000 M3
M8
G0 B45. C90.
X0. Y-30.607
Z20.607
Y-23.536 Z13.536                    (Y0)
G1 Y-20.707 Z10.707 F333.3
Y-10. Z0.                                   X-10
Y-30. Z-20. F1000.                     X-30
G0 Y-50.607 Z0.607
G25C
Z0.

(**** FALSE ****)
T1
S5000 M3
M8
G0 B45. C135.
X21.642 Y-21.642
Z20.607
X16.642 Y-16.642 Z13.536
G1 X14.642 Y-14.642 Z10.707 F333.3
X7.071 Y-7.071 Z0.
X21.213 Y-21.213 Z-20. F1000.
G0 X35.784 Y-35.784 Z0.607
G25C

M5
Z0.
B0. C0.
X0. Y0.
M30

0 Likes
Message 18 of 63

Sverhu
Advocate
Advocate

Привет! Включил все как написано выше, у меня проблема, не получается точной обработки по траектории, плавная линия обработки почему-то идет зигзагами. Примеры на скриншотах. Не могу найти ошибку в постпроцессоре

0 Likes
Message 19 of 63

Sverhu
Advocate
Advocate

picture of the machine

0 Likes
Message 20 of 63

bob.schultz
Alumni
Alumni

Hello @Sverhu,

 

I've looked at your post processer and while the output has some issues the post processor seems to be correct.  The main issue is that the B and C-axes will reverse directions in the affected areas.  This is coming from the Fusion side.  The reason for this is that you are using a loose tolerance for the operation.  I changed the tolerance from .1mm to .001mm and the output looks much smoother.

 

You should note that the backplot is actually showing the machine axes and not the tool end point, so the tool end point should still track fine, but the finish may be a bit rough with the axes reversing directions.

 

bobschultz_0-1638985173434.png     bobschultz_1-1638985240804.png

 

On a side note, you may want to look into basing your post processor on the RS274 Multi-Axis post processor, which uses the latest logic for adjusting the output coordinates in the post processor engine, instead of having to do it inside of the post processor.  This post processor also supports machine simulation, though you will have to use a property to enable/disable TCP, since machine simulation requires TCP to be active, but your machine does not support this.

 

You would need to enable TCP when running the machine simulation and then disable it when post processing.

 

 



Bob Schultz
Sr. Post Processor Developer

0 Likes