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:

Manual Entry Question


jeff
 Share

Recommended Posts

Using MPOkuma.pst.

 

I have a program where I need a bunch of Manual Entry's.

Seems like it doesn't matter if I post as Code or Comment, they are both in Parentheses.

Why would "code" be in parentheses?

 

ex:

 

G00Z20.

X-20.Y20.

M00(MY COMMENT HERE) <--This is how it should look

 

 

 

(G00Z20.)

(X-20.Y20.)

(M00(MY COMMENT HERE)) <--- this is the output

 

 

my post:

 

pcomment2 #Comment from manual entry

scomm$ = ucase (scomm$)

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

else, *n$,"(", scomm$,")", e$

 

 

If I remove the "(" and ")" my N lines don't have the comment in parentheses.

What am I doing wrong?

Link to comment
Share on other sites

There are a couple of different gcodes you need to look at. 1005 is output for manual entry as comment, 1006 is for as code, 1007 is for as comment with no line return, 1026 is for as code with no line return

 

Mpfan has this all setup for each of the different comment gcodes which should give you a starting point:

 

pcomment2 #Output Comment from manual entry

scomm$ = ucase (scomm$)

if gcode$ = 1005, sopen_prn, scomm$, sclose_prn, e$ #Manual entry - as comment

if gcode$ = 1006, scomm$, e$ #Manual entry - as code

if gcode$ = 1007, sopen_prn, scomm$, sclose_prn #Manual entry - as comment with move NO e$

if gcode$ = 1026, scomm$ #Manual entry - as code with move NO e$

if gcode$ = 1008, sopen_prn, scomm$, sclose_prn, e$ #Operation comment

if gcode$ = 1051, sopen_prn, scomm$, sclose_prn, e$ #Machine name

if gcode$ = 1052, sopen_prn, scomm$, sclose_prn, e$ #Group comment

if gcode$ = 1053, sopen_prn, scomm$, sclose_prn, e$ #Group name

if gcode$ = 1054, sopen_prn, scomm$, sclose_prn, e$ #File Descriptor

  • Like 1
Link to comment
Share on other sites

Using MPOkuma.pst.

 

I have a program where I need a bunch of Manual Entry's.

Seems like it doesn't matter if I post as Code or Comment, they are both in Parentheses.

Why would "code" be in parentheses?

 

ex:

 

G00Z20.

X-20.Y20.

M00(MY COMMENT HERE) <--This is how it should look

 

 

 

(G00Z20.)

(X-20.Y20.)

(M00(MY COMMENT HERE)) <--- this is the output

 

 

my post:

 

pcomment2 #Comment from manual entry

scomm$ = ucase (scomm$)

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

else, *n$,"(", scomm$,")", e$

 

 

If I remove the "(" and ")" my N lines don't have the comment in parentheses.

What am I doing wrong?

If you remove the Bottom "(" & ")" at the else line, you should see them when you select comment in the manual entry parameters. They will disappear when you select code, if you remove "(" & ")" on the if line then you are telling it to remove the parenthesis when it actually is a comment.

Link to comment
Share on other sites

If you remove the Bottom "(" & ")" at the else line, you should see them when you select comment in the manual entry parameters. They will disappear when you select code, if you remove "(" & ")" on the if line then you are telling it to remove the parenthesis when it actually is a comment.

 

I removed them from the else line,and it worked,

BUT

it also removed the parentheses from my N lines...for example N100(FACEMILL) turns into N100FACEMILL

Link to comment
Share on other sites

I removed them from the else line,and it worked,

BUT

it also removed the parentheses from my N lines...for example N100(FACEMILL) turns into N100FACEMILL

Something is up because gcode$=1007 is for Manual Entry Comments Only, I remember I had this issue before un til I added the other definitions like Chris McIntosh ^^ mentioned.

Particularly this: if gcode$ = 1008, sopen_prn, scomm$, sclose_prn, e$ #Operation comment, I would also fire up the debugger and do a breakpoint where it generates the commented output and watch the values of the gcode$ parameter. Also you might want to do a search in your post to see if sopen_prn and soclose_prn are defined in your post as ( & ) respectively; you have two choices either define them yourself or simply replace it for "(" & ")".

Link to comment
Share on other sites

Something is up because gcode$=1007 is for Manual Entry Comments Only, I remember I had this issue before un til I added the other definitions like Chris McIntosh ^^ mentioned.

Particularly this: if gcode$ = 1008, sopen_prn, scomm$, sclose_prn, e$ #Operation comment, I would also fire up the debugger and do a breakpoint where it generates the commented output and watch the values of the gcode$ parameter. Also you might want to do a search in your post to see if sopen_prn and soclose_prn are defined in your post as ( & ) respectively; you have two choices either define them yourself or simply replace it for "(" & ")".

 

Yeah, I haven't had time yet today to try the stuff Chris suggested.

I've altered my post many times over the years since it's only my machine that uses it and I'm anal about how I like my programs to look, so it's highly possible that I've deleted some stuff.

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...