Jump to content

Welcome to eMastercam.com
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account
Photo

MPMASTER questions (long)

- - - - -

  • Please log in to reply
15 replies to this topic

#1
Rick Damiani

Rick Damiani

    Advanced Member

  • Resellers
  • PipPipPip
  • 719 posts
I am using the MPMASTER post from this site for the HAAS mill at my college, and ran into two issues with it when using subprograms on a somewhat complex job I was doing. Its a simple-looking part for a surey-style class, but I let the CAD instructor design the project, so the set-up is a bear.

The part in question was a solid model that was being approached from three different sides, necessitating three different set-ups. For this sort of thing, I generally use an operation group for each set-up, generate the appopriate WCSs and workplane numbers, and assign my toolpaths to the correct WCS for the side I am working on. Then I post eatch operation group seperately and use the CIMCO editor to concatinate the NC files into one file for transfer to the control.

The result, for the HAAS, is three named programs plus a seperate program for each subprogram, for a total of (in this case) something like seven different program numbers (as viewd when selecing 'list programs' at the control).

The first problem I ran into was when doing a contour with depth cuts, multi-pass, and lead-in (first pass only)/lead-out (last pass only) enabled. The first set of multi-pass cuts correctly plunged at the plunge rate, then cut at the feed rate. Subsiquent depth passes were all done at the plunge rate. Looking at the NC file, it looked like what was happening is that the post was doing the first-pass lead-in at the correct feed rate in the main program, then failing to put an F code in the subprogram. When the spindle plunged at the plunge rate for the next depth cut, the lack of an F code in the subprogram meant that the next set of passes all occured at the plunge rate. Any suggustions to fix?

Second problem: When I did the above operation groups, I numbered the programs sequentially (3557 top, 3558 bottm, 3559 side). When I later changed and posted the top operaton (adding more subprograms) the newly-created subprograms from program 3557 overworte some of the subprograms from 3558, resulting in a facing operation that seemed to wander off into space. Re-posting all of the operatons fixed the program numbering, but meant that I had to go through the cut-and-paste bit to put them all into a new file.

The first problem seems like something fixable by the post, and any suggustions there would be appriciated. The second is more of a workflow issue with the post. I'd like to have the post put program numbers in for each operation group so I can avoid the cut-and-paste and still get a different program for each side in one .NC file and not post it three times[1]. Is that posible to do easily, or am I looking at a major effort in post-writing?

[1] I don't want a single program with stop codes in it because I want to do each set-up in batches. i.e. a dozen on the first side, then run the second side on that dozen, then run the third. Yeah, I could use the 'restart' feature of the HAAS control to help do this, but then I still have to hunt through the program for start/stop points.

#2
iowajim62

iowajim62

    Advanced Member

  • Members
  • PipPipPip
  • 4,826 posts
I just gotta ask why not MPHAAS post ?
Does it not post subs properly ?
I didn't wanna start another flame war or anything just curious. smile.gif

#3
Rick Damiani

Rick Damiani

    Advanced Member

  • Resellers
  • PipPipPip
  • 719 posts

quote:


I just gotta ask why not MPHAAS post ?
Does it not post subs properly ?
I didn't wanna start another flame war or anything just curious.

The MPMASTER post seemed like a better starting point than the supplied posts, as I really liked the tool table it writes into the header. I was unsucussful in my initial attempts at grafting that fuctionality onto MPHAAS. Also, the MPHAAS post insists on writing out 'A' moves if I use a rotated T/C plane, even if I ask it not to.

FWIW, I did figure out how to solve my second issue wilst playing with it this afternoon. I copied the pheader and peof subroutines to pheader0 and peopro and removed the lines that write the '%' at the top and bottom of the file (respectivly), then added this:

code:


if progno<>0,
[
peopro
pheader0
psof
]
else
[
<original code>
]

to the ptlchg and ptlchg0 fucntions. That closes the first program and resets the control, writes the initialization strings and headers for the second program, and calls for a tool change even if the same tool is used in the second program. I'm amazed that it was so simple, so I'm kinda expecting it to blow up when I try it next time I am in the shop. The .NC file looks good though.

Of course now I only get a tool table in the first program, so I am back to having to figure out how they did that. Grrrr.

I'll see if MPHAAS handles the subprogram feedrate issue better than MPMASTER does. If so, and if I can hunt down and kill all of the extranious A0. moves, I'll see if my efforts can be used there. Of course, any assistance on the subprogram feed rate issue would still be appriciated.

#4
Guest_CNC Apps Guy 1_*

Guest_CNC Apps Guy 1_*
  • Guests
To remove the "A's" delete "pcout" and or "pfcout" in ptlchg, ptlchg0, and psof.

Ummmmm, I'll look into the other stuff when I get a chance. I do similar to what you're doing. I name my groups the program number I'm going to use, have the nci follow that, and then just out the program number in the first op of the group and voila. No problems.

#5
Finecut

Finecut

    Member

  • Members
  • PipPip
  • 92 posts
In the Haas Post at the bottom, Question 164
Change the "y" to "n".

That will turn off the "A" output.

Finecut

#6
Cadcam From Cad/Cam Consulting

Cadcam From Cad/Cam Consulting

    Advanced Member

  • Members
  • PipPipPip
  • 8,761 posts
Rick On the "A" out put is your post set like this.

164. Enable Rotary Axis button? n

It will not out put any A movements if this is set to N on my haas post.

Jm2C

#7
Rick Damiani

Rick Damiani

    Advanced Member

  • Resellers
  • PipPipPip
  • 719 posts
The really irritating thing about MPHAAS is that setting quesiton 164 to 'n' *still* puts A0. in the code if there is a rotated tool plane in the program.

#8
Rick Damiani

Rick Damiani

    Advanced Member

  • Resellers
  • PipPipPip
  • 719 posts

quote:


To remove the "A's" delete "pcout" and or "pfcout" in ptlchg, ptlchg0, and psof.

I do have a 4th axis that I am planning on hooking up once I get the chucks/collets sorted. Will removing those lines keep me from outputting good code?

quote:



Ummmmm, I'll look into the other stuff when I get a chance. I do similar to what you're doing. I name my groups the program number I'm going to use, have the nci follow that, and then just out the program number in the first op of the group and voila. No problems.

No problem if I post the groups seperately. I just don't want to do it that way.

#9
Guest_CNC Apps Guy 1_*

Guest_CNC Apps Guy 1_*
  • Guests

quote:


Will removing those lines keep me from outputting good code?

Yep.

#10
d0gFartz

d0gFartz

    Member

  • Members
  • PipPip
  • 293 posts
Just set this line to be a 0 under #Rotary Axis Settings

rot_on_x : 0 #Default Rotary Axis Orientation
#0 = Off, 1 = About X, 2 = About Y, 3 = About Z

this will keep from outputting A`s then when you want to use your rotary you can go back in and set it to the axis that it needs to rotate about and it will post your A`s again and there values

[ 01-01-2003, 07:53 PM: Message edited by: d0gFartz ]

#11
Mark C

Mark C

    Member

  • Members
  • PipPip
  • 72 posts
Save what you have now as Haas_rotary. Then make changes as James said deleting pcout and or pfcout , or as Dogfartz said set rot_on_x to zero and save it as Haas.
When posting just call out the proper post. Saves any problems you might get from constantly editing posts. Just remember to create a .txt file and possibly a .set file to match to retain full functionality

Actually, thinking about it, you can ask a question when posting whether to use rotations or not.
I have a horizontal post that I have set up do that cuz we do some parts that are too big for our biggest vertical that we have to put on one of our horizontals. No need to output:
M11
B0
M10
every tool change.
If you want I can look at my post when I get back to work Monday ( two weeks off!!!!) and give you some pointers. Just can't remember what I did off the top of my head

[ 01-01-2003, 11:13 PM: Message edited by: Mark C ]

#12
Rick Damiani

Rick Damiani

    Advanced Member

  • Resellers
  • PipPipPip
  • 719 posts

quote:


Just set this line to be a 0 under #Rotary Axis Settings

I'll try that. Thanks.

#13
Allan Brown

Allan Brown

    Advanced Member

  • In-House Solutions
  • PipPipPip
  • 2,168 posts
Mpfan handles subs as O0001 and O1001 for the two sub levels used in Mastercam, and they increment up from there. Mpmaster adds the program number in, specifically so that O0001 and O1001 etc. are not overwritten with the very next program using subs. With a program number of O1234, the sub numbering would be O1235 and O2235. You do have control over this behaviour - search for sav_progno in the post.

Can't really comment on your feed issues without the file. Test out Mpfan and see if it handles the feeds differently.

As for the 3 program numbers issue, you want to post to a single NCI / NC file, but have 3 separate main programs internally in the 1 NC file? Use a different program number in the first op of each group. In the post at the tool change, or null tool change, compare progno and prv_progno. Add logic to close off the previous program and start a new one based on this logic.

e.g. if progno <> prv_progno, pnewprog

where pnewprog has elements of peof and pheader and psof to close off the current program and start a new one.

[ 01-02-2003, 01:26 PM: Message edited by: Dave Thomson ]

#14
Guest_CNC Apps Guy 1_*

Guest_CNC Apps Guy 1_*
  • Guests

quote:


Just set this line to be a 0 under #Rotary Axis Settings

rot_on_x : 0 #Default Rotary Axis Orientation
#0 = Off, 1 = About X, 2 = About Y, 3 = About Z

this will keep from outputting A`s then when you want to use your rotary you can go back in and set it to the axis that it needs to rotate about and it will post your A`s again and there values

DOH!!!! Forgot the obvious. Hate when that happens. Rick this should do what you are asking.

#15
Rick Damiani

Rick Damiani

    Advanced Member

  • Resellers
  • PipPipPip
  • 719 posts

quote:


Mpfan handles subs as O0001 and O1001 for the two sub levels used in Mastercam, and they increment up from there. Mpmaster adds the program number in, specifically so that O0001 and O1001 etc. are not overwritten with the very next program using subs. With a program number of O1234, the sub numbering would be O1235 and O2235. You do have control over this behaviour - search for sav_progno in the post.

I kinda created the problem for myself by numbering my programs sequentially (3557, 3558, and 3559), then changing the number of sub programs in one of the operations in 3557 (I added depth cuts to a multi-pass contour) and re-posting it without re-posting the other programs. The best 'fix' seems to be changing the post so it can output all the programs at once, sorta as you outline below.

quote:



Can't really comment on your feed issues without the file. Test out Mpfan and see if it handles the feeds differently.

Will do.

quote:




e.g. if progno <> prv_progno, pnewprog


I used an if/else construct in the tool change functions and compared progno to zero, which seemed to work. I only put program numbers on the first op of a given group, leaving all the rest set to 0.

#16
Rick Damiani

Rick Damiani

    Advanced Member

  • Resellers
  • PipPipPip
  • 719 posts

quote:



DOH!!!! Forgot the obvious. Hate when that happens. Rick this should do what you are asking.

It does. It seems that the A0. is getting added as part of a reference return, which seems to be being added weither I turn reference returns on or not. I'm thinking that if I fix that bit, and add some logic to that part of the code, I can leave rot_on_x set to 1, allowing me to output 3 or 4 axis code with the same post. This would be best for me, as I am not always smart enough to select the proper post before I start generaitng toolpaths.

Thanks all for all the input. I gots lots of stuff to try now.