Multiple Command Fusion360 - WinCNC

Multiple Command Fusion360 - WinCNC

Oneshop
Contributor Contributor
2,250 Views
10 Replies
Message 1 of 11

Multiple Command Fusion360 - WinCNC

Oneshop
Contributor
Contributor

Anytime I try a pocket toolpath I am getting a multiple command error. Happens at Line 13. I am guessing it is lack of a G1, G2, or G3 but have no idea. Anyone else having issues with 360 to WinCNC? I am using the NoTool No Spin post attached. Also can trace no problem.

 

[Trial NS]
[T20 D=0.25 CR=0.125 - ZMIN=-0.5 - bullnose end mill]
G90
G20
G53
[Pocket1]
M3
G0 X22.524 Y22.4846
Z0.6
Z0.0794
G1 Z0.067 F13.12
G3 X22.5244 Y22.4852 Z0.061 I-0.0272 J0.0154
X22.5253 Y22.4871 Z0.0554 I-0.0275 J0.0148

Accepted solutions (1)
2,251 Views
10 Replies
Replies (10)
Message 2 of 11

HughesTooling
Consultant
Consultant

I helped someone seeing the same problem a while ago. Part of the problem is WinCNC only does arcs in the XY plane, no sure if I needed to make the G2/G3 output modal as well but try the postprocessor in the post.

 

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.

EESignature


0 Likes
Message 3 of 11

Anonymous
Not applicable

Do you have anything in the offset number, or that could interfere with it. I havent done the math on the code., but that should be right. Do you have a sample of any working code?

 

0 Likes
Message 4 of 11

raycon2010
Contributor
Contributor
Accepted solution

Had the same issue. Without giving it to much thought I edited the post generator script (cps) so it generated what WinCNC was looking for. 

Some day I'll revisit this. I'm running an early version of WinCNC.  The newer WinCNC demo version handles this properly.

 

function onCircular(clockwise, cx, cy, cz, x, y, z, feed) {
  if (pendingRadiusCompensation >= 0) {
    error(localize("Radius compensation cannot be activated/deactivated for a circular move."));
    return;
  }

  var start = getCurrentPosition();

  if (isFullCircle()) {
    if (isHelical()) {
      linearize(tolerance);
      return;
    }
    switch (getCircularPlane()) {
    case PLANE_XY:
      writeBlock( gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), iOutput.format(cx - start.x, 0), jOutput.format(cy - start.y, 0), feedOutput.format(feed));
      gMotionModal.reset();//Added by Ray  If 2 successive lines were G2 or G3 the gMotionModal was dropped
      break;
    default:
      linearize(tolerance);
    }
  } else {
    switch (getCircularPlane()) {
    case PLANE_XY:
      writeBlock( gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), iOutput.format(cx - start.x, 0), jOutput.format(cy - start.y, 0), feedOutput.format(feed));
      gMotionModal.reset();//Added by Ray  If 2 successive lines were G2 or G3 the gMotionModal was dropped on 2nd and beyond. WinCNC threw multiple command error.
      break;
    default:
      linearize(tolerance);
    }
  }
}

Message 5 of 11

Oneshop
Contributor
Contributor

Mark, I cam across this post last night. I wasn't sure if it would solve my problem and gave it a try but didn't have any luck.

0 Likes
Message 6 of 11

Oneshop
Contributor
Contributor

Ray, please be patient with me. I am an architect and nothing more. I am using posts found here: http://www.wincnc.net/webfiles/Post%20Processors/AutoDeskFushion360/ I am not sure if this is new or old but its all i can find.

 

As far as "not too much thought" whatever you did is beyond me. So I can only assume what you posted is only a portion of the post processor that I need to correct? Thanks for the patience and responding!

0 Likes
Message 7 of 11

Oneshop
Contributor
Contributor

Thomas, I can upload working code after noon when I am in front of my machine. Really the only difference is that the toolpath is trace on the working and pocket on the one that doesn't. But I will upload the code for you to review the output. Thanks!

0 Likes
Message 8 of 11

raycon2010
Contributor
Contributor

I ran into the same error you received when I first tried to generate a post from Fusion 360 for an  older version of WinCNC.

 

I don't know if the error is  a bug in the older version of WinCNC or by  design. I edited a stock WinCNC.cps - that is the code snippet I posted above (edited stock  cps version).

 

The fix for me was/is. In the function onCircular(clockwise, cx, cy, cz, x, y, z, feed)  don't remove redundant  G2 or G3 . Accomplished  by adding  gMotionModal.reset(); on each call.

 

The result in your case would be a G3 is added to the second line of your circular move (redundant? I think so but I'm not  the wincnc interpreter)  If you're not familiar with cps  files its javascript.  Makes it wicked easy to format the g-code output. Fusion 360 has a post processor that'll output all the options if you want to tinker.   I've found  no Fusion 360 CPS API documentation yet but I've not looked to hard either. (I'm an ME - typical  CAD/CAM/CAE  c,c++,java background)

 

G1 Z0.067 F13.12
G3 X22.5244 Y22.4852 Z0.061 I-0.0272 J0.0154

[Adds the G3 that is currently considered redundant ]
G3 X22.5253 Y22.4871 Z0.0554 I-0.0275 J0.0148

 

As  test add the G3 to your snippet and clip your file length to end after this line. Run a simulation in wincnc and see if the error is removed.

 

 

 

 

 

 

 

 

Message 9 of 11

Oneshop
Contributor
Contributor

Ray, Your test passed. I added the G3 and it skipped to line 14. I replaced the below with what you posted and came back no errors!  Thank you very much. I will test this ASAP and post the results. I am sure you not only helped me but many people to come!

 

 

}

var start = getCurrentPosition();

if (isFullCircle()) {
if (isHelical()) {
linearize(tolerance);
return;
}
switch (getCircularPlane()) {
case PLANE_XY:
writeBlock(/*gPlaneModal.format(17),*/ gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), iOutput.format(cx - start.x, 0), jOutput.format(cy - start.y, 0), feedOutput.format(feed));
break;
default:
linearize(tolerance);
}
} else {
switch (getCircularPlane()) {
case PLANE_XY:
writeBlock(/*gPlaneModal.format(17),*/ gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), iOutput.format(cx - start.x, 0), jOutput.format(cy - start.y, 0), feedOutput.format(feed));
break;
default:
linearize(tolerance);
}
}
}

 

 

Simulate.PNG

0 Likes
Message 10 of 11

Oneshop
Contributor
Contributor

Thanks for the help everyone! Ray, your code is gold. We are up and running here. Thanks again!

0 Likes
Message 11 of 11

dylanTEV9W
Advocate
Advocate

I was having this same issue on my labs router table running an old version of WinCNC. Your modifications to the WinCNC post did the trick for me. 

Well done and thank you for sharing!

0 Likes