Hi All
Very new to CAD/CAM and returning to CNC after learning to use a sinumerik at 14 years of age (long story)
My problem is that the post for our 2005 CTX410 using a fanuc 21i and the 'fanuc turning.cps' generates a G17 code for the drilling process (using a udrill)
This cause the CNC to report a '028 ILLEGAL PLANE SELECT' at what I think is line N116.
I had to set the post type to B as type a gave an error for line N12 so the G50 became a G92.
I assume I have the model wrote.
Thanks
Mike
Solved! Go to Solution.
Solved by HughesTooling. Go to Solution.
Looking in the post there's this bit of code.
function onCyclePoint(x, y, z) { if (isSameDirection(currentSection.workPlane.forward, new Vector(0, 0, 1)) || isSameDirection(currentSection.workPlane.forward, new Vector(0, 0, -1))) { writeBlock(gPlaneModal.format(17)); // XY plane } else { expandCyclePoint(x, y, z); return; }
I don't know if it's just a bit of a typo but I changed it to use the XZ plane which makes more sense. @mike.mattera what do you think? The post is turn only not mill turn so I'm not sure why the plane needs resetting, G18 is output for each section for some reason.
function onCyclePoint(x, y, z) { if (isSameDirection(currentSection.workPlane.forward, new Vector(0, 0, 1)) || isSameDirection(currentSection.workPlane.forward, new Vector(0, 0, -1))) { writeBlock(gPlaneModal.format(18)); // XZ plane } else { expandCyclePoint(x, y, z); return; }
Post's attached, don't save it to the generic folder, save to local posts or the cloud.
Mark
Mark Hughes
Owner, Hughes Tooling
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
For the cloud take a look at this post. There's been an update to the dashboard, you now select A360 Drive from the option under Fusion top left of window.
Link to Dashboard.
Mark
Mark Hughes
Owner, Hughes Tooling
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
@mjoconr wrote:
Yes I think this is a bug in the post, as the comment indicates XZ plain but then uses a G17 which is incorrect as best as I can find.
Whats the process for reporting this as a bug ?
Well things change indeed when it's a mill-turn post. Because driven tools might need the G17 and stationary usually are in G18.
So this is kind of a bug indeed. Let's see what the Post team thinks of this. @bob.schultz and as a bonus @matthew.nichols
Laurens Wijnschenk
3DTechDraw
AutoDesk CAM user & Post editor.
René for Legend.
Not being an expert in all Fanuc models (there are many), it is possible that there is a model that accepts or requires a G17 code when drilling along the Z-axis. It is also possible that this code is left over from another stock post that requires this code. The new controls actually have different cycle G-codes when drilling from the Z-axis as compared to the X-axis, so it is hard to tell if it is a bug or not. I can discuss this with other developers here to see if they recall why the G17 is output. You consider the "bug" as being reported and the solution as reported by HughesTooling as being a valid solution for your machine.
Hi @bob.schultz it looks like commenting out the G17 line in the post makes all drill ops fail because it leaves the current plane as undefined. see this thread.
Mark
Mark Hughes
Owner, Hughes Tooling
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
@HughesTooling Thanks Mark, it is indeed a problem. The proper fix should be ...
if (isSameDirection(currentSection.workPlane.forward, new Vector(0, 0, 1)) ||
isSameDirection(currentSection.workPlane.forward, new Vector(0, 0, -1))) {
gPlaneModal.format(17); // 2-axis lathes typically don't use G17
} else {
expandCyclePoint(x, y, z);
return;
}
... so that the rest of the cycle logic works as it did previously and the G17 code is not output.
if (isSameDirection(currentSection.workPlane.forward, new Vector(0, 0, 1)) ||
isSameDirection(currentSection.workPlane.forward, new Vector(0, 0, -1))) {
gPlaneModal.format(17); // 2-axis lathes typically don't use G17
} else {
expandCyclePoint(x, y, z);
return;
}
Should I add this code to my post?
I get the same error on a drilling op, I added the Milling capabilities but it made no difference and the post would fail.
I modified my post using Marks example above and this allowed the post to complete.
And this is the code it produces,
(DRILL1)
M1
T1212
G54
M42
M9
G98
G97S2910M3
G0X0.Z15.
G18
G0
Z5.
G73X0.Z-51.504R2.5Q2.5F582.
G80
Z15.
G28U0.
My controller is a Fanuc 11te on a Nakamura tome superturn 2a 1986 model, I've only just bought the machine and haven't made a part yet, I'm just going through getting the post right for it.
Attached is my post so far.
Tried to run a drilling cycle today that had the G18 and the Fanuc 11te didn't like it, so I've made the post change like Bob Schutlz has it and I'll try it again tomorrow.
Hi, i do have a similar proglem with my siemens millturn post on a 2axis weiler DZ.
When drilling in spindlemode it always puts out g17 operations even though i have set it as a non-live tool. And even when using a live tool, i always try to avoid singularities, so i would drill the center first in mainspindlemode as a seperate operation. Can someone suggest a fix for my post, or help me along the way? I do not recognize similar code to fanuc as posted above
Hello @luketheeduke,
You can make the following change in the getPlane function to output a G18 instead of a G17 when axial center drilling on your machine.
function getPlane() {
if (getMachiningDirection(currentSection) == MACHINING_DIRECTION_AXIAL) { // axial
if (machineState.isTurningOperation || machineState.axialCenterDrilling) { // <<< CHANGE THIS LINE
return 18; // turning
Worked out fine, thanks for the help.
I think i am 99% there, running a 95 machine full auto over drip feed. Never thought this might be possible.
Cheers!
DN Solutins (Lynx with Y axis) also output G17 when drilling. Please tell me how to fix CPS.
Hello @ssssssp315,
The decision on which planar code to output for axial operations is in the following function.
function getG17Code() {
return (machineState.usePolarInterpolation || !gotYAxis) ? 18 : 17;
}
If you never want the G17 code to be output, then change 17 to 18 in the return line. If there are only certain operations that you don't need the G17 code, then you will need to test for these in the conditional part of the statement.
Hello,
I have a HYUNDAI-KIA machine with a C-Y axis and a Fanuc control unit. I created a contour program on the C-axis in the face plane. The machine is giving a PS0021 ILLEGAL PLANE SELECT error when the G18 plane is selected. Previously, I drilled four holes in the face plane using the G17 plane without any issues. However, in the contour program, the G18 plane is being selected. I tried posts from Nakamura, DMG NLX, Tsugami, and Jyoti, and they all selected the G17 plane. Why is the post I’m using switching to the G18 plane? I've attached example files. I would appreciate your help.
Can't find what you're looking for? Ask the community or share your knowledge.