Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Need to fix new post -- Help !!!!


connormac
 Share

Recommended Posts

Help, ya'll helped me get my post just right. Then the system administrator comes up with the new post that was written for our company. Only a year after he received it. Where do I tell it in the post where to put in the manual entry lines. The old post put it between the drill cycles just where I needed it. Made the same changes that James & Christian Raebild told me to make. It puts in the code without ()'s but it puts right in the middle of the drill cycle. confused.gifconfused.gif

Any help would be appreciated.

 

Thanks

Link to comment
Share on other sites

quote:

Help, ya'll helped me get my post just right.

Then don't change it. First off, it's been my experience that IT guys know little about machining/programming. Taking their advice can be hazardous to your career, unless it's the owner's kid.

 

At most, I would copy my old post to use "his" post's name, then tell him you got "his" post running just fine.

 

'Rekd teh If it ain't broke, don't 'f' with it!

Link to comment
Share on other sites

connormac, when you say the new post is putting your manual entry "in the middle of the drilling cycle", what exactly does that look like in the output?

 

It might also be of help if you could show us the pdrill postblock from the new post.

 

If that IT guy didn't give you the new post until a year after he received it, I wonder whose job would be on the line if your boss learns that rolleyes.gif

Link to comment
Share on other sites

Christian,

 

long story about the IT guy kind of the owners pet. Almost bullet proof. Anyway back to the problem. Here is how it looks after posted. M40,M41,M40 are suppost to go after the end of cycle not in hte middle of it. This is a contour and it does the same thing. Do you still want to see pdrill.

code:

 

T1M06(2" INSERT CUTTER)

(NO COMMENT)

G00 G90G54X-2.325Y-.75

G43H1Z2.

S0M5

M40

M41

M40

G0 X-2.325 Y-.75

Z.225

G1 Z.025

X3.825 F.01

G0 Z.25

G0 X-2.325 Y-.75


Anything else you need just tell me.

Thanks for the help

 

[ 06-05-2003, 09:44 PM: Message edited by: connormac ]

Link to comment
Share on other sites
Guest CNC Apps Guy 1

I believe you want to look for "strcantext" in your drill cycles. Make sure they are where you want them. In MPFan, they are after the feed rate.

 

HTH

Link to comment
Share on other sites

I think I have a good guess what is happening. Your manual entry is coming before the section of code that would be placed in a subprogram, if you used subprograms. There is a good chance your pcomment postblock (or a postblock called from pcomment) changes the setting of the variable subout, and that that is what we need to do something about.

 

I don't think I will need to see your pdrill postblock, but the pcomment postblock (and any postblocks called from pcomment) will probably be needed.

Link to comment
Share on other sites

Here you go. All the stuff under pcomment 3 is what you had me add. It works great in the old post.

code:

pnocomm # no comment

if cmf=0,[str5="NO COMMENT"

str5=wbuf(5,wc5)]

cmf=0

pcomment #Comment from manual entry

if gcode=1005|gcode=1006,pcomment3

else,pcomment2

pcomment2 #Comment from manual entry

str5=ucase(scomm)

scomm=sblank

str5=wbuf(5,wc5)

pcomment3 #Comment from manual entry

if mach = 0,

 

[spaces = 0

scomm = ucase (scomm)

#1005 - Comment option 1

#1006 - Comment option 2

#1007 - Define comment with output line

#1008 - Define NC parameter comment

#1026 - ?

if gcode = 1005, n, "(", scomm, ")"

if gcode = 1006, n, scomm #Codes

if gcode = 1007, "(", scomm, ")"

if gcode = 1008, n,"(", scomm, ")"

if gcode = 1026, scomm

if gcode <> 1007 & gcode <> 1026, e

]

 

if mach = 2,

[spaces = 0

scomm = ucase (scomm)

#1005 - Comment option 1

#1006 - Comment option 2

#1007 - Define comment with output line

#1008 - Define NC parameter comment

#1026 - ?

if gcode = 1005, n, "(", scomm, ")"

if gcode = 1006, n, scomm #Codes

if gcode = 1007, "(", scomm, ")"

if gcode = 1008, n, "(", scomm, ")"

if gcode = 1026, scomm

if gcode <> 1007 & gcode <> 1026, e

]

 

if mach = 3,

[spaces = 0

scomm = ucase (scomm)

#1005 - Comment option 1

#1006 - Comment option 2

#1007 - Define comment with output line

#1008 - Define NC parameter comment

#1026 - ?

if gcode = 1005, n, "(", scomm, ")"

if gcode = 1006, n, scomm #Codes

if gcode = 1007, "(", scomm, ")"

if gcode = 1008, n, "(", scomm, ")"

if gcode = 1026, scomm

if gcode <> 1007 & gcode <> 1026, e

]

 

if mach = 4,

 

[spaces = 0

scomm = ucase (scomm)

#1005 - Comment option 1

#1006 - Comment option 2

#1007 - Define comment with output line

#1008 - Define NC parameter comment

#1026 - ?

if gcode = 1005, n, "(", scomm, ")"

if gcode = 1006, n, scomm #Codes

if gcode = 1007, "(", scomm, ")"

if gcode = 1008, n, "(", scomm, ")"

if gcode = 1026, scomm

if gcode <> 1007 & gcode <> 1026, e

]


before I added the stuff you told me to the new post would not put any manual entry lines in. not even in ()'s. the new stuff I added made it put manual entry lines in but the wrong place.

thanks for the help

Link to comment
Share on other sites

The code in pnocomm and pcomment2 tells me the comments are to be written to a buffer file. This is going to take some editing to get things in order.

 

First you need to define string constants for starting and ending paranteses, if they are not defined already. That will be two lines like this:

 

code:

strbp "("

strep ")"

Then you need to edit every output line in pcomment3 to look like these examples (I hope you can work out what the rest of the lines have to look like):

 

code:

	if gcode = 1005, str5 = no2str(n)+strbp+scomm+strep

if gcode = 1006, str5 = no2str(n)+scomm #Codes

Last, you need to add this to the end of your pcomment3 postblock:

 

code:

	scomm=sblank	

str5=wbuf(5,wc5)

That should be a start, at least, I am not certain how well it will work, as that only gets something written to the buffer file, the buffer file has to be read somewhere in the post, too. Try my suggestion, and see what happens. If it doesn't work, post a sample of the output you get.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...