Misc cam wishes

Misc cam wishes

friesendrywall
Collaborator Collaborator
1,396 Views
14 Replies
Message 1 of 15

Misc cam wishes

friesendrywall
Collaborator
Collaborator

#1.  A way to renumber tools by setup without editing the tool library.

 

#2.  User definable Post processor options.  This would allow setting exact stop mode on an operation, for example.

 

#3.  Whenever there is a change made in Cad, some of the Setups re open with errors.  A - If the contours haven't changed, why is this necessary?  B-why some but not all. C-I only want to see the active one open.

 

#4.  The Post processor should have a better way of setup/operation selection.  Too many times it either selects all setups, or a single operation.

0 Likes
1,397 Views
14 Replies
Replies (14)
Message 2 of 15

Laurens-3DTechDraw
Mentor
Mentor

@friesendrywall wrote:

#1.  A way to renumber tools by setup without editing the tool library.

 

#2.  User definable Post processor options.  This would allow setting exact stop mode on an operation, for example.

 

#3.  Whenever there is a change made in Cad, some of the Setups re open with errors.  A - If the contours haven't changed, why is this necessary?  B-why some but not all. C-I only want to see the active one open.

 

#4.  The Post processor should have a better way of setup/operation selection.  Too many times it either selects all setups, or a single operation.


 

 

#1  - One for the development guys

#2 - I'm not sure what you are looking for here. I mean you can make he post do anything with a Manual NC - Action command.

#3 - I believe the invalidation's is on the list and being improved over time. But this means now it's a case of better safe than sorry so you see them invalidate too much.

#4 - I'm not completely sure what you see happening. If you can to post process you have to select the things you want to post process. So if that's the set-up select that then click post process. If you just want a operation. Select that and then click post process. 

Laurens Wijnschenk
3DTechDraw

AutoDesk CAM user & Post editor.
Found out the hard way is the best way to win.


Message 3 of 15

HughesTooling
Consultant
Consultant

For #4. The ops or setups that are dark blue will post, if all you have is the light blue highlight against one setup all setups will post. The light blue is the active CAM setup that new ops will be added to.

Only Mill setup will post.

before.png

Selected ops will post.

 

Untitled(2).png

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 4 of 15

xander.luciano
Alumni
Alumni
Issue #4 is a matter of how you are selecting setups, or rather the lack of selecting.

If you do not have any setup or operations selected (dark blue) then clicking post process will by default post all setups. This is ideal for cases where you might be using probing to set offsets, or for mill turn operations (like how you have your photo).

If you want to only post 1 or 2 setups, you can ctrl+click (or shift+click) the setup folders and then click post process. Then it will post out what you have selected. Same for operations, you can ctrl+click operations and post only specific operations.

I think posting all operations instead of the active operation is better because your active operation may change without you realizing it. Say you activate setup 3 and post that out, then close the file without saving (or it's a file you only have read access on and you can't save it), then next time you open that file the active setup will revert back to setup 4. By forcing you to actually select the setup & operations you want to post it forces users to pay more attention to what they are doing.

Let me know your thoughts,
Xander Luciano

Xander Luciano
CAM Content Developer

If my post is helpful, press the Kudo button - If it resolves your issue, press Accept as Solution!
Quick Tips: When to resselect CAM geometry | Understanding Smoothing in CAM | Adaptive Facing | Online GCode Viewer
0 Likes
Message 5 of 15

friesendrywall
Collaborator
Collaborator

@ Laurens-3DTechDraw

#2. Not really, because the manual NC is an operation by itself. I would like a param that can get passed to the pp so I can handle the operation differently. For example, right now I am using G187, and I modded the post to reset G187 on a .0004, where really a user definable checkbox would be better.

0 Likes
Message 6 of 15

friesendrywall
Collaborator
Collaborator

@ HughesTooling & @xander.luciano

I know how it works, but would prefer a checkbox perhaps, something that doesn't shift around so easily.  I find it easy to post the wrong thing after a little change got made, not sure about this forcing the user to select the setup again, and again, and again... each time you post a little program fix.

0 Likes
Message 7 of 15

xander.luciano
Alumni
Alumni

Hello,

If you find yourself constantly having to re-post a long list of setups and don't want to manually select them all, just suppress the setups you don't want to post like so:

 

mSXjF2m

 

And as per #2:  User definable Post processor options.

You can setup custom properties already

nWLNZJP

And like @Laurens-3DTechDraw said, you can do a manual NC operation, and with a manual NC operation I don't see why you wouldn't be able to change the post to do what you want depending on what the ManualNC is. 

Best,

Xander Luciano


Xander Luciano
CAM Content Developer

If my post is helpful, press the Kudo button - If it resolves your issue, press Accept as Solution!
Quick Tips: When to resselect CAM geometry | Understanding Smoothing in CAM | Adaptive Facing | Online GCode Viewer
0 Likes
Message 8 of 15

HughesTooling
Consultant
Consultant

@friesendrywall wrote:

@ HughesTooling & @xander.luciano

I know how it works, but would prefer a checkbox perhaps, something that doesn't shift around so easily.  I find it easy to post the wrong thing after a little change got made, not sure about this forcing the user to select the setup again, and again, and again... each time you post a little program fix.


OK as long as it still works like it does now because I wouldn't find clicking check boxes on and off would speed things up. I normally right click the setup and pick post from the right click menu.

 

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 9 of 15

friesendrywall
Collaborator
Collaborator

The manual NC is an operation by itself with no tool linked, so the post processor that way I have it modded has no way to know which tool operation it belongs to.

 

If you could put a manual NC inside of an operation then that would work.  Any way to get a custom parameter, even if it was just text.

 

Maybe if I explain my current process it will make more sense.  Here is a typical posted output.  There isn't a good way to integrate a manual NC into this.  If you wonder why this way, 38k serial isn't so fast.

 

%
O03050 (Base bottom x 6)
(T1 D=0.375 CR=0. - ZMIN=0.375 - flat end mill)
(T2 D=2. CR=0. - ZMIN=0.675 - face mill)
G90G17
G20
G53G0Z0.

(Subroutine calls)
(T[1] Cleanup)
(T[1] Clean wings previous sub)
G54
M97 P3051
G55
M97 P3051
G56
M97 P3051
G57
M97 P3051
G58
M97 P3051
G59
M97 P3051
(T[2] Face)
G54
M97 P3053
G55
M97 P3053
G56
M97 P3053
G57
M97 P3053
G58
M97 P3053
G59
M97 P3053
M9
M5
G53G0Z0.
G53X-15.Y0.
G49 G90
M30

(Cleanup)
N3051
(code here...)
(Clean wings)
(more code same tool)
Z3.(Between part move)
M99

(Face)
N3053
(code here...)
Z3.(Between part move)
M99
0 Likes
Message 10 of 15

friesendrywall
Collaborator
Collaborator

@xander.luciano  

 

Suppressing non active setups isn't a bad idea, thanks for the suggestion.

 

I attached my current post for what its worth.

 

To output subs the way I use them, I set IsCoreProgram to Yes and UseToolChangeSubs to Yes, then set the WorkOffsetBase and Count.  No, its not very polished.

0 Likes
Message 11 of 15

xander.luciano
Alumni
Alumni

Well I must say, what you did there was actually really interesting! Was really easy to follow too. You must have some coding experience I'd assume 🙂

Anyways, I could modify the post to do this, but I'd have to refactor the code so that instead of doing everything onOpen, it would be per section.
But this at least this example will give you a good overview. Essentially this will do what you want it to do. My example is pretty lame and simple, but you could easily expand it in so many ways.

So first off, the ManualNC operation is a parameter for the following operation. So by putting an NC operation in  between operations you can disable and enable settings, or add gCode, anything really as long as you program the post processor to accept it. So for this example I used the Action Manual NC type, and used that to change the value of the global properties. In this way you could use a manual NC operation to turn on and off different user settings.

hseKKgo

 

I just used a simple switch/case to interpret the results. Alternatively you could use a string like: toolSubs:true,coreProgram:true to turn it on, and toolSubs:false,coreProgram:false to turn it off.

your post would have to have something like this:

function onSection() {
    if(hasParameter("action")) {
        var params = getParameter("action").split(",");
        for (var i=0; i<params.length; i++){
            writeComment(params[i]);
            param = params[i].split(":");
            switch (param[0]) {
                case 'toolSubs':
                    usingToolSubs = (param[1] == "true");
                    writeComment("usingToolSubs=true");
                    break;
                case 'coreProgram':
                    isCoreProgram = (param[1] == "true");
                    writeComment("isCoreProgram=true");
                    break;
                default:
                    writeComment("Error: unknown action!");
                    break;
            }
        }
    }
    
    //rest of code here
}

So it's a lot more logic on the post side, but it IS possible to do. If you would like, I can write a post that would do exactly that for you, but it would take me some time to sort all the logic out and test it fully. Though you do seem like you might know a fair bit about programming so you might even be interested in doing this yourself.

Also, if you put a manual NC operation as the last operation in your setup folder, then the parameter will apply to the onClose() function.
You also cannot put two of the same ManualNC operations before 1 operation. E.g. you cannot have 2 action NC operations, the first one will be overwritten by the second one. 

Lastly, you cannot have a manual NC operation apply to the onOpen() function, which there is really no need to anyways because the user properties of the post dialogue should have any settings you want in the onOpen() function. 

Though, if you wanted to get around this, you could run through the onOpen function, and in onSection, check if it's the first section, if it is the first section, you could run another function and pass it the desired parameter like this:

 

var firstSection = true;

onOpen() {
  //code
}

onAfterOpen(params) {
  //some code needing params
}

onSection () {
  if (firstSection) {
    if(hasParameter("action"))
        onAfterOpen(getParameter("action"));
  firstSection = false;
  }
  //rest of section
}

My only concern there is that Javascript is an asynchronous language, so you would need a callback after onAfterOpen() unless the post processor version has some voodoo magic to keep it synchronous. Honestly haven't explored that too much so don't know for sure. 

Anyways, that ended up being really technical, but it should help. Let me know if you have questions!

 

note: I attached the edited post so you could see what changes I made - Starts on line 810.

 

Best,
Xander Luciano

 

 

 

 

 


Xander Luciano
CAM Content Developer

If my post is helpful, press the Kudo button - If it resolves your issue, press Accept as Solution!
Quick Tips: When to resselect CAM geometry | Understanding Smoothing in CAM | Adaptive Facing | Online GCode Viewer
Message 12 of 15

friesendrywall
Collaborator
Collaborator

@xander.luciano 

 

Thanks, I hadn't thought of doing it that way.

 

Do you suppose Notes are available in the Post?  That would be easier.

0 Likes
Message 13 of 15

xander.luciano
Alumni
Alumni

Hello,

 

Indeed they are! Even supports multiline comments properly 🙂 So you should have no problem setting operations up the way you want. 

GRc8uqD

 

 

I'm curious to hear your thoughts about this, hope it helps!

 

Best,

Xander Luciano


Xander Luciano
CAM Content Developer

If my post is helpful, press the Kudo button - If it resolves your issue, press Accept as Solution!
Quick Tips: When to resselect CAM geometry | Understanding Smoothing in CAM | Adaptive Facing | Online GCode Viewer
0 Likes
Message 14 of 15

xander.luciano
Alumni
Alumni

Should probably mention this too since it makes editing post a lot easier.

If you post your code with the dump.cps Dumper post processor, it will create a dump file with all the raw posted data. It's a great tool to use when editing post processors!

 

EEEGPE4

 

 

Let me know if you have any questions,

-Xander Luciano


Xander Luciano
CAM Content Developer

If my post is helpful, press the Kudo button - If it resolves your issue, press Accept as Solution!
Quick Tips: When to resselect CAM geometry | Understanding Smoothing in CAM | Adaptive Facing | Online GCode Viewer
0 Likes
Message 15 of 15

friesendrywall
Collaborator
Collaborator

I can see this working.  I'll have to do some fine tuning on my post.

0 Likes