Community
Fusion Manufacture
Talk shop with the Fusion (formerly Fusion 360) Manufacture Community. Share tool strategies, tips, get advice and solve problems together with the best minds in the industry.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Removing an user defined "enum" list from post processor - fanuc mill-turn lathe

2 REPLIES 2
Reply
Message 1 of 3
guillaume.grelaud
111 Views, 2 Replies

Removing an user defined "enum" list from post processor - fanuc mill-turn lathe

Hello,

 

I am looking to modify a post processor for my CMZ lathe. I started from the Samsung mill turn post (https://cam.autodesk.com/posts/post.php?name=samsung%20mill-turn%20fanuc) and to modify it for my lathe. Mostly imputting the correct M and G code but also getting rid of the sub-spindle and y-axis fonctionalities, that I don't have on my lathe (C-axis and tailstock only).

 

actually I have removed the "user defined properties" related and gave them a fixed value in the "fixed setting" for all non-necessary choices but the "transfertype" setting.

 

I have removed :

transferType: {
    title      : "Transfer type",
    description: "Phase or speed synchronization for stock-transfer.",
    group      : "preferences",
    type       : "enum",
    values     : [
      "Phase",
      "Speed"
    ],
    value: "Speed",
    scope: "post"
  },

from the user's defined and put :

var transferType = 0;

  in the fixed setting but that give me and error when trying to post process a program, saying transfertype must be either speed or phase.  I have tried "phase" or "speed" instead but I can't use the post processor in these cases, saying the post processor is invalid.

with "0" the error message is :

 

Error: TransferType must be Phase or Speed
Error at line: 730
Failed while processing onOpen().
 

 

anyone got any idea how to solve this ?

Thanks!

2 REPLIES 2
Message 2 of 3

Have a look at what's going on at line 730 in your post, I expect it will be what is at line 782 in the unmodified post you linked:

  // Copy certain properties into global variables
  showSequenceNumbers = getProperty("showSequenceNumbers");
  transferType = parseToggle(getProperty("transferType"), "PHASE", "SPEED");
  if (transferType == undefined) {
    error(localize("TransferType must be Phase or Speed"));
    return;
  }

 

It is specifically trying to retrieve the property and assign it to the variable. What you've done isn't working because you've just set the variable and removed the property from existence, meaning it reads as undefined and triggers the error.

 

You could remove this section, but then you'll break all the other references to transferType elsewhere in the post, of which there are a few. You can remove those too, or you can just put the working code back and move on with your day.

 

Message 3 of 3

Thanks for your reply.

 

I got the post-processor to work by modifying one line in the sequence you showed in your reply to

 

transfertype = 0;

I also removed the "var transfertype" in the fixed setting.

 

thanks for your help

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report