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?
Solved! Go to Solution.
Solved by bayramW2A6L. Go to Solution.
Solved by bob.schultz. Go to Solution.
Thanks for the help, everything seems to be ready. The postprocessor you have a link to didn't start for me.
One more question: what code should I add to the message so that at the end of processing, the A and C axes move to the working position 0 in the same way as the XYZ axes?
The rotary axes are already moved to B0 C0 at the end of the program if they are not already at 0 degrees. The following call to setWorkPlane in onClose outputs this move.
You can force out the B0 C0 block even if the rotaries are already at 0,0 by calling forceWorkPlane prior to setWorkPlane.
forceWorkPlane();
setWorkPlane(new Vector(0, 0, 0)); // reset working plane
I do notice a problem with the positioning in Z in that it moves to Z0 at the end of the program. You will want to change this to move to the safe Z-height of the machine.
zOutput.reset();
writeBlock(gAbsIncModal.format(90), gMotionModal.format(0), zOutput.format(0)); // retract <<< CHANGE 0 TO A SAFE Z-HEIGHT
zOutput.reset();
Извините, но я случайно вставил не тот постпроцессор. Во вложении тот который работает но с проблемой возврата в рабочее положение
You can use the same method as described above in this post processor also. Just uncomment out the call to setWorkPlane in onClose.
writeRetract(Z);
setWorkPlane(new Vector(0, 0, 0)); // reset working plane
writeRetract(X, Y);
It sounds like you want to measure the tools on the machine and use the calculated tool lengths in the post processor, rather than setting the tools on the machine to the lengths defined in Fusion. Is this correct? If so, does the machine have a tool changer? Are you going to use multiple tools in the same program?
Google translated by community manager:
You understood me correctly, I want to measure the tool on the machine, my machine has an automatic tool change and a measuring probe. I would love to use several tools in one program.
This is a homemade car
Вы меня правильно поняли, я хочу измерить инструмент на станке, на моем станке есть автоматическая смена инструмента и измерительный датчик. Очень хотелось бы использовать несколько инструментов в одной программе.
Is it possible then to create a data file from the tool measurement macro on the machine that can be sent to your computer? If so, then logic can be added to the post to read this file and set the tool lengths using this data. For example, the file could have the following format.
T1 = 75.123
T2 = 88.234
T3 = 50.002
You would not have to manually edit the tool lengths in Fusion, just simply post process again after the file is created.
The other option you have is to set the tool lengths on the machine to match what you program in Fusion. For example, you could position the tool above the measurement sensor by exactly the length programmed for each tool in Fusion and then "drop" the tool so that it touches the sensor, thereby setting the exact tool length used in Fusion.
that's not the point, the length of the spindle rotation axis 189.3 is set in the postprocessor, I install the tool holder in the spindle, the size of the holder changes from how the tool changes, the thread will twist more or less, while its size changes. and I manually add the length of the holder to the postprocessor (example var pivotDistance = toPreciseUnit(189.395+48, MM); // 48mm is assumed for the tool length)
Google translated by Community manager:
is it possible for this dimension to be taken into account automatically after measurement on the machine?
возможно, чтобы этот размер учитывался автоматически после измерения на станке?
It may be possible to dynamically adjust the coordinates for the measured tool lengths based on the capabilities of your control. The output from the post would look something like the following, using the input coordinates and parameters stored within the control (#xxxx).
#2001 = 189.395 (Fixed pivot length)
#2002 = #2001 + #3001 (#3001 = Measured tool length)
(Tool end point = 1.0, 2.0, 3.0)
(Tool axis = 0.5, 0.0, 0.866)
G00 X[1.0 + (#2002 * 0.5)] Y[2.0 + (#2002 * 0.0)], Z[(3.0 + (#2002 * 0.866) - #2002]
By the way, your English is just fine.
Machine control system based on mach3.
I didn't have such problems with the axis offset and measurements, I did the control programs in PowerMILL
Can I tell you more about this?
#2001 = 189.395 (Fixed pivot length) #2002 = #2001 + #3001 (#3001 = Measured tool length) (Tool end point = 1.0, 2.0, 3.0) (Tool axis = 0.5, 0.0, 0.866) G00 X[1.0 + (#2002 * 0.5)] Y[2.0 + (#2002 * 0.0)], Z[(3.0 + (#2002 * 0.866) - #2002]
#2001 = 189.395 (Fixed pivot length)
Assigns the fixed distance to parameter 2001 in the control. This line is output in the onOpen function.
#2002 = #2001 + #3001 (#3001 = Measured tool length)
Adds the measured tool length to the fixed pivot length. This is the total length that the coordinates will be adjusted by. The parameter 3001 needs to be based on the tool number, meaning the tool lengths measured on the machine will store each length in a separate register, such as T1 = 3001, T2 = 3002, etc. This line is output in the onSection function when there is a tool change.
(Tool end point = 1.0, 2.0, 3.0)
(Tool axis = 0.5, 0.0, 0.866)
G00 X[1.0 + (#2002 * 0.5)] Y[2.0 + (#2002 * 0.0)], Z[(3.0 + (#2002 * 0.866) - #2002]
This line is output in all functions that output a motion block; onRapid, onLinear5D, onCycle, etc. It includes the calculation to translate the tool end point coordinates to the pivot point and back down to the virtual tool tip. It would be best to create a special function to output this motion block that can be called from the motion functions.
function writeMotion(x, y, z, i, j, k, feed)
First you will need to determine the correct syntax for each of these blocks for your control. You could hand edit a simple program that goes to a single location to test on the machine. Once you determine the correct output syntax the post can be modified to output this code.
The size of the tool holder in Fusion360 somehow affects the calculation of the control program or is it just for stimulation?
The size of the tool holder can affect collision checking during the calculation of the toolpath. We usually use the overall body length of the tool to use as the tool length for offset heads in the post processor.
function getBodyLength(tool) {
for (var i = 0; i < getNumberOfSections(); ++i) {
var section = getSection(i);
if (tool.number == section.getTool().number) {
return section.getParameter("operation:tool_overallLength", tool.bodyLength + tool.holderLength);
}
}
return tool.bodyLength + tool.holderLength;
}
I haven't been setting up a postprocessor for machine modeling, so I can't perform collision checking when calculating the trajectory. I noticed that when calculating control programs, the size of the holder is not taken into account, and as I already wrote, I just add this size manually to this line var pivotDistance = toPreciseUnit(189.395+48, MM);
the red indicates the size of the holder that I add manually, if I do not add this, then the machine does not take into account this size (holder) with the axis of rotation
You should use the Overall Length of the tool instead of programming a fixed value for the holder length. The Overall Length is not used in Fusion and is for the purpose of passing the tool length to the post processor. If you include the getBodyLength function into your program your code will look like this.
var pivotDistance = toPreciseUnit(189.395, MM) + getBodyLength(currentSection.getTool());
Can't find what you're looking for? Ask the community or share your knowledge.