Error: ReferenceError: tapping is not defined

Error: ReferenceError: tapping is not defined

kevinw8GL25
Participant Participant
782 Views
9 Replies
Message 1 of 10

Error: ReferenceError: tapping is not defined

kevinw8GL25
Participant
Participant
Hello,
 
After some editing, I had a working Prototrak post processor, but my machine needs a one line G76 threading cycle, and this post was outputting two line format. 
 
I took the HAAS turning post (which uses a single line G76) and did my best to copy everything related to threading into my post. When I post inside the debugger for visual studio code, I get this error: 
 
"Error: The turning thread cycle is machine specific and must always be handled in the post configuration.
Error in operation: 'Turning Thread1 with cycle'
!DEBUG: 1 prototrak turning- g76 1 line TEST.cps:1082
Failed while processing onCycle() for record 319."
When I post the code through fusion 360 from my actual part file this is the error I recieve:
"Error: ReferenceError: tapping is not defined
Error at line: 1069
Error in operation: 'Thread1' "
 
Can someone please look at my post and help me resolve this issue. I have attached my test post file as well as the Haas turning post. Thank you so much for the assistance!
 
_Kevin
0 Likes
783 Views
9 Replies
Replies (9)
Message 2 of 10

KrupalVala
Autodesk
Autodesk

HI @kevinw8GL25 ,

 

Does you controller support G138 Cycle format? If yes, Please use the latest ProtoTRAK Turning Post processor.

 

Thanks,



Krupal Vala
Senior Technology Consultant - Post Processor & Machine Simulation
0 Likes
Message 3 of 10

kevinw8GL25
Participant
Participant

@KrupalVala  When running this machine with a G code program, it only accepts G76 for threading. I had it working with a two line G76 code and all the parameters were coming out correct, problem is that this machine only takes a one line G76 code.

 

Can you look at the post and try to edit it to post a one line G76? Thank you

 

-Kevin

0 Likes
Message 4 of 10

KrupalVala
Autodesk
Autodesk

Hi @kevinw8GL25 ,

 

Please add missing variable, correct the post properties format, and update the logic.

 

Step :1, Add Variable

var integerFormat = createFormat({decimals:0, forceDecimal:false, trim:true});

 

Step : 2 Change the properties from this to

if (getProperty("useSimpleThread")) {

this

if (properties.useSimpleThread) {

 

Step 3 : Remove the following irrelevant logic( from the function onCyclePoint(x, y, z)

  if (!getProperty("useCycles") || currentSection.isMultiAxis()) {
    if (tapping) {
      error(localize("Tapping cycles cannot be expanded."));
      return;
    }
    expandCyclePoint(x, y, z);
    return;
  }

 Save the post modification and test the code.

 

Thanks,



Krupal Vala
Senior Technology Consultant - Post Processor & Machine Simulation
0 Likes
Message 5 of 10

kevinw8GL25
Participant
Participant

@KrupalVala  Thank you.  I will give it a try and report back if it is successful.

 

-Kevin

0 Likes
Message 6 of 10

kevinw8GL25
Participant
Participant

@KrupalVala  This is what I get after making the changes you recommend. If I debug and use the sample threading cycle in Visual studio code it outputs the thread correctly, but does not when posting the code through fusion360 with my actual part. I've attached the updated post with all current changes.

 

Please advise on what to do. Thanks again!

 

-Kevin

 

###############################################################################
Error: ReferenceError: tapping is not defined
Error at line: 1069
Error in operation: 'Thread1'

Stack dump:
onCyclePoint(0.05914998336101141,0,-0.14350000328905)@C:\Users\admin\AppData\Roaming\Autodesk\Fusion 360 CAM\Posts\prototrak turning- g76 1 line TEST.cps:1068
Failed while processing onCycle() for record 1572.
###############################################################################

Error: Failed to execute configuration.
Stop time: Wednesday, February 16, 2022 4:10:07 PM
Post processing failed.
0 Likes
Message 7 of 10

KrupalVala
Autodesk
Autodesk

HI @kevinw8GL25 ,

 

Could you please share you CAM project? I'm getting expected output in turning thread canned cycle.

 

Thanks,



Krupal Vala
Senior Technology Consultant - Post Processor & Machine Simulation
0 Likes
Message 8 of 10

kevinw8GL25
Participant
Participant

@KrupalVala  Here is a link to the part file. If I use the built in threading cycle on visual studio code I have no issues. Threading cycle posts out ok. But if I use my part file and post the code through fusion 360, it errors out. 

 

EDIT: after loading up a few different projects that have threads, it turns out the code posts fine. I am confused why the other file I linked to will not post the threading code, but at this point I am just happy it works, and it must just be a unique issue with that file causing the threading to malfunction.

 

Thanks again for all the help! I really appreciate it.

 

-Kevin

 

https://a360.co/3I1l5Up

0 Likes
Message 9 of 10

kevinw8GL25
Participant
Participant

@KrupalVala  turns out something is up with the drilling cycle. That is what is causing the errors. If I post with a deep drilling cycle it will not compute the code and it errors out. Without drilling, the code comes out great...

 

I have made many other changes to this post to make it work excellent with the Prototrak TRL1630RX lathe with 8 position turret. After this one problem is resolved I will have a rock-solid post with absolutely zero hand editing of code! It has been a mission, but worth the trouble...

 

-Kevin

0 Likes
Message 10 of 10

KrupalVala
Autodesk
Autodesk

Hi @kevinw8GL25 ,

 

We have released many updates in these 4 years so I would recommend you to use the latest ProtoTRAK Turning post-processor and change the threading cycle depending on your controller configuration. 

 

Thanks,

 

 



Krupal Vala
Senior Technology Consultant - Post Processor & Machine Simulation
0 Likes