![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Mastercam Discuss Mastercam software here. |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
| Hello People, Could someone tell me how to get mastercam to stop adding gcode to the end of my job that sends the tool to the reference point at 0 and marking my work. Mastercam x3 CNC mill Cheers Matt |
|
#2
| ||||
| ||||
| Matt, More info is needed What generic post ? for what machine and control ? There can be multiple solutions for what you put up but, try looking at the settings in Misc Intergers before any post editing at the G30/G28 behaviour and the settings you have for Misc Interger#1 |
|
#3
| |||
| |||
| Sure sorry about that making a few assumptions that people know whats going on around me. I have a generic mill (half chinese half home made) using mach3 and a Geckodrive G540. I have modified the default generic fanuc 3x mill. So I am using the Generic Fanuc 3X mill.pst Thanks for your time. Matt. |
|
#4
| ||||
| ||||
| I suggest that you open your post with any text editor, NOTEPAD or CIMCO And read the top "Notes" section in regards to "Work offsets:" and the number you put in at MI#1 AND the number you put in as the work offset # in the "view manager" If you want to use G54,G55 etc ---then MI#1 should be =2 and the number you set in the view manager would be 0 for G54, 1 for G55 and so on. when you have this area sorted, then mod the post if required The area you want, is marked in RED or comment the bad one out and hard code what you need in it's place. ie n$, "G0 Z100.", e$ Code: peof$ #End of file for non-zero tool
pretract
if lock_codes = one & rot_on_x, pbld, n$, *sunlock, sunlockcomm, e$
rotretflg = 1
# pbld, n$, *sg28, "X0.", "Y0.", protretinc, e$
pbld, n$, *sg28, "Y0.", protretinc, e$
rotretflg = 0
if lock_codes = one & rot_on_x, pbld, n$, *slock, slockcomm, e$
comment$
if not(index), n$, *sg90, e$
n$, "M30", e$
mergesub$
clearsub$
mergeaux$
clearaux$
"%", e$ |
|
#7
| |||
| |||
| I'm having the same issue. I've gotten in the habit of adding a "move to point" toolpath at the end of my programs, then deleting the extra lines of code that send the part to the back of the machine. We're using the generic fanuc 3x mill post on a Hurco VM1. I have a little experience with coding, but I'm not catching your drift on what needs to be changed to keep it from going to the machine's home position at the end of a program (I'd still like it to go to the machine's home position during tool changes though, but I think that's a setting we've adjusted in the mill itself right now). On a side note, I've been playing around with the posts, so I saved a copy of the generic post and re-named it so I'd still have the original to revert back to. When I run a program through that re-named post, the code comes out without spacing. With the original there's spacing and it's easy to read. What happened? I didn't change anything in the post, just re-named a copy of it. Looks like the line numbering is different too. Here's an example of what the output looks like from the re-named one: N140G43H8Z.35 N150Z.1 N160G1Z.0187F6.42 N170Y-2.3037Z-.0813F30. And the same line from the original: N108 G43 H8 Z.35 N110 Z.1 N112 G1 Z.0187 F6.42 N114 Y-2.3037 Z-.0813 F30. Thanks for any help |
|
#8
| |||
| |||
| Look for "end of file non tool zero". If it has a g28 in a line put a # in front of the line. Only do this in the section between end of file non tool zero & m30. Nowhere else in the post. Then in the next line after you put the #, & put in the code that you want to be there like superman showed you. Like. n$, "GO Z25.", e$ or what ever you want that number to be. Then you could do the same with X & Y. As far as the spacing goes are you using the same md & cd that you were using before? I know that there's some switches in there that can control your line # & spacing output. If that's not it then I'm not sure offhand. I don't have a post in front of me right now. Hth |
|
#9
| ||||
| ||||
| For the change in the spaces, open the original file and the modified one using Cimco, then do a file compare This will highlight any differences. If you can't find the problem, start again from the original post You should be looking for a missing $ or a , (comma) or a character that may have been deleted To understand how a post works, the general order it "thinks" is: upper area defines your machine, creates a place to place info ( strings) and sets a default value in these strings, then it runs thru in this general order 1-header 2-SOF ( start of file ) 3-toolchange ( or ptlchg_com ) 4-1st op 5- next op --> if new tool ( do #3)--> if same tool ( do ptlchg0$ ) 6- EOF ( end of file ) every step is a branch point away to do an item, then return to the main body and do the next step ie pwcs in the main stream is calling a "macro" to look at your settings and how you define your work origin, and then apply the correct code sequence when you post. |
|
#10
| |||
| |||
Hopefully I'll get some time to look into the post and find the move to zero part |
| Sponsored Links |
|
#11
| ||||
| ||||
EDIT: Found the issue with the spacing. A setting in the control definition in mastercam, under NC Output, it had changed the spaces between NC addresses to 0, when it should have been 1, so that's fixed. And I'm still unable to find the point where it tells it to go to the home position. The part you posted earlier is completely different from what I have, so I'm not sure what to change.
Last edited by mafitch7479; 10-08-2010 at 11:11 AM. |
|
#12
| ||||
| ||||
| Code: peof$ #End of file for non-zero tool
pretract
comment$
n$, "G0 Z10.", e$ # retract to Z home
n$, "G0 X-10. Y10.", e$ # move spindle to rear
if stagetool = 1 & stagetltype = 2, pbld, n$, *first_tool$, e$
n$, "M30", e$
mergesub$
clearsub$
mergeaux$
clearaux$
"%", e$ n$, *sg28, "Z0.", e$ n$, *sg28, "X0. Y0.", protretinc, e$ Protretinc is a post-block that should make the 4th axis return to zero ---if turned ON and used. Using a machine code is better as it uses the machines' co-ord system for the values and it doesn't rely on the part's origin. Last edited by Superman; 10-08-2010 at 08:49 PM. Reason: forgot the seq #'s |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mach3 axis not returning to home | saltybugger | Machines running Mach Software | 20 | 01-18-2010 11:57 AM |
| Stop Z from going home | DareBee | Fadal | 17 | 11-25-2009 02:37 PM |
| Reset mach 3 after stoping pogram and returning home | Prboz | Mach Mill | 0 | 12-12-2007 05:05 AM |
| home, limit, e-stop | drafterman | CNC Plasma and Waterjet Machines | 11 | 04-12-2007 05:46 AM |
| Limit, Home and E Stop Switches | Mr.Chips | General Electronics Discussion | 15 | 01-17-2007 09:02 AM |