Plasma/Laser post issue; "forceXYZ not defined"

Plasma/Laser post issue; "forceXYZ not defined"

edkorn
Explorer Explorer
377 Views
3 Replies
Message 1 of 4

Plasma/Laser post issue; "forceXYZ not defined"

edkorn
Explorer
Explorer

Using the XY post with bojans additional code and get an error message when trying to create the G-code file: Error: ReferenceError: forceXYZ is not defined Does anyone have a hint what is or where to look for forceXYZ?

 

0 Likes
378 Views
3 Replies
Replies (3)
Message 2 of 4

seth.madore
Community Manager
Community Manager

Could you share your post processor here and a sample Fusion file that we can use for testing purposes?

File > Export > Save to local folder, return to thread and attach the .f3d file in your reply

 

 

(and yes, we split this thread off from the original one you replied to, as the topics started diverging from the original post)


Seth Madore
Customer Advocacy Manager - Manufacturing


0 Likes
Message 3 of 4

serge.quiblier
Autodesk
Autodesk

Hello @edkorn 

 

I don't know if you have used a post modified by another user, or tried to copy his changes into your post.

But the error message simply is telling, I want to call a function called forceXYZ, and it is not defined in the post.

So, you can add this short function, here is the code needed.

/** Force output of X, Y, and Z. */
function forceXYZ() {
  xOutput.reset();
  yOutput.reset();
  zOutput.reset();
}

 

Regards.


______________________________________________________________

If my post answers your question, please click the "Accept Solution" button. This helps everyone find answers more quickly!



Serge.Q
Technical Consultant
cam.autodesk.com
Message 4 of 4

edkorn
Explorer
Explorer

@serge.quiblier and @seth.madore  thanks for the replies. My question was about  message 29 in https://forums.autodesk.com/t5/fusion-360-manufacture/fusion-360-cam-marking-plasma-laser/td-p/10513... That is a thread about making a spot or dimple or mark or small hole with a laser or plasma cutter. Currently Fusion requires that a line or circle has to be cut, there is no way to just drill a hole without moving the laser or plasma. The solution offered in message 29 is:

 

One of the solutions we just made for the customer is to create two different setups, one for milling and second for plasma cutting. In the milling setup, we program the drilling on holes faces or points on sketch and then use the custom PP to create a G-code for marking. For base PP we used a simple XY post ( https://cam.autodesk.com/posts/post.php?name=xy  ) and we added the onCyclePoint () function which give us the coordinates for marking.  

 

The code to be added is:

function onCyclePoint(x, y) {
  if (isFirstCyclePoint()) {
    forceXYZ();
  }
    writeBlock(gFormat.format(0), xOutput.format(x), yOutput.format(y));
    markiraj(); 
}

function markiraj() {
  writeBlock("M20", "(* HEAD DOWN *)"); 
  writeBlock("M24", "(* MARK *)");
  writeBlock("M21", "(* PARK *)");

I downloaded the XY post from https://cam.autodesk.com/hsmposts and added the suggested code to the post. The error message I get is forceXYZ is not defined when I use the modified XY post. I've attached the modified post.

0 Likes