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:

Post help / manual entry


Recommended Posts

I'm trying to figure out how to Move my Manual Entry Text, I'm ok at editing my Post but can't figure this out.

 

Right now it post's like this:

%

O0000

(TEST)

(POSTED ON APR. 19 2013 AT 10:42 AM)

(MIKE W.)

(TOOL #7 - 1/8 X 90 CHAMFER MILL)

(TOOL #8 - #25 DRILL .1495 DIA 118TIP)

(TOOL #9 - #14 DRILL .182 DIA 135TIP)

(TOOL #10 - .1878 REAMER)

 

N1(1/8 X 90 CHAMFER MILL )

(MANUAL ENTRY NOTE) <- THIS LINE I WOULD LIKE TO MOVE

G0G17G40G49G80G90

T7M6

G0G90G54X-.128Y-.0394S2500M3

G43H7Z.1

M8

G99G81Z-.035R.1F3.5

G80

M9

M5

G91G28Z0.

M01

 

 

I WANT IT TO POST LIKE THIS

 

%

O0000

(TEST)

(POSTED ON APR. 19 2013 AT 10:42 AM)

(MIKE W.)

(TOOL #7 - 1/8 X 90 CHAMFER MILL)

(TOOL #8 - #25 DRILL .1495 DIA 118TIP)

(TOOL #9 - #14 DRILL .182 DIA 135TIP)

(TOOL #10 - .1878 REAMER)

(MANUAL ENTRY NOTE) <- I WANT THIS LINE TO POST HERE

 

N1(1/8 X 90 CHAMFER MILL )

G0G17G40G49G80G90

T7M6

G0G90G54X-.128Y-.0394S2500M3

G43H7Z.1

M8

G99G81Z-.035R.1F3.5

G80

M9

M5

G91G28Z0.

M01

 

 

 

Any and all help is very appreciated Thanks

Link to comment
Share on other sites

you have to create another note definition and ensure that the MANUAL ENTRY only CODE is speparated and COMMENT is another separated thing. Originally the MPMaster lumps 2 in one. I had this problem before and I defined as separated entities. You should do something like this

 

pcomment2 #Comment from manual entry

#1005 - As Comment

#1006 - As Code

#1007 - As Comment with output line, change at point

#1026 - As Code with output line, change at point

#1008 - Operation comment

#1051 - Machine Name

#1052 - Group Comment

#1053 - Group Name

#1054 - File Descriptor

spaces$ = 0

scomm$ = ucase (scomm$)

if sof & gcode$ >= 1051, scomm_str, scomm$, scomm_end, e$

#if gcode$ = 1005, n$, pspc, scomm_str, scomm$, scomm_end, e$

if gcode$ = 1006, n$, pspc, scomm$, e$

#if gcode$ = 1007, scomm_str, scomm$, scomm_end

#if gcode$ = 1026, scomm$

#if gcode$ = 1008 & header = zero, n$, pspc, scomm_str, scomm$, scomm_end, e$

if gcode$ = 1008, scomm_sav = ucase(scomm$)

spaces$ = sav_spc

 

then....

 

pwrttparam$ #Information from parameters

if prmcode$ = 10010, stock = rpar(sparameter$,1) # Stock to leave in Z

if prmcode$ = 10068, stock1 = rpar(sparameter$,1) # Stock to leave in XY

if prmcode$ = 12068, stock2 = rpar(sparameter$,1) # Stock to leave in Z facing

if prmcode$ = 15145, metvals = rpar(sparameter$,1)

if prmcode$ = 15346, comp_type = rpar(sparameter$,1)

if prmcode$ = 20004, slot = rpar(sparameter$,16)

if prmcode$ = 20006, cut_ability = rpar(sparameter$,8)

if prmcode$ = 20007, pilot_dia = rpar(sparameter$,11)

if prmcode$ = 12628,

[

hst_flg = 1

hststyle = rpar(sparameter$,1)

]

poperation

if sof & scomm_sav <> snull,

spaces$ = 0

*sav_n3, spaces$ = 0, scomm_str, *scomm_sav, scomm_end, e$

spaces$ = sav_spc

 

then....

 

at the tool you just call out as *POPERATION to separate the MANUAL ENTRY AS CODE and AS CODE

 

 

I HOPE THESE TIPS CAN HELP YOU BECAUSE WHEN I WAS FIRST STARTED, I HAD TO WORK IN A DARK AND IT WORKS FOR ME AS A PERFECT POST FOR THE FLOOR PEOPLE.

Link to comment
Share on other sites
  • 2 weeks later...
  • 2 months later...
You need to be careful though, as it will post your Manual Entry toolpath, but will also output the Operation Comment if there is one.

 

Trying to separate these.

 

at the tool you just call out as *POPERATION to separate the MANUAL ENTRY AS CODE and AS CODE

 

I feel like something is missing here or I am not understanding the portion I quoted here. My post has the same code as listed above but is not posting out correctly.

Link to comment
Share on other sites

Spade,

 

sav_n3 is a variable that he has created. It has no bearing on what you are trying to do.

 

The important thing to understand is that manual entries and operation comments are handled by the same postblock. If you are trying to treat them separately, you need to define how to treat each type of comment.

 

#1005 - As Comment

#1006 - As Code

#1007 - As Comment with output line

#1008 - Operation comment

 

These are the most common types of comments. When you use manual entry and select the 'As Comment' button, it is identified with gcode$=1005. Manual entry with 'As Code', gcode$=1006. Manual entry without end of line, gcode$=1007.

 

Tool comments are dealt with by another post block.

 

So, in the psof$ section, you could do this:

 

 if gcode$ >= 1005 & gcode$ < 1008, comment$
 pcan
 ptoolcomment
 if gcode$ = 1008, comment$

 

This will force the manual entry lines to be output before the tool comment, and the operation comments to be output after the tool comment.

 

If you have both types of comments, you may have to do some work inside the pcomment$ post block to separate the outputs.

 

HTH :cheers:

Link to comment
Share on other sites

Thanks for the reply.

 

Unfortunately, that does not help with my issue.

 

I am looking for a way to separate manual entry code/comments from operation comments. Currently, comment$ is what controls the location of both. Once I have found a way to separate them, I can properly have them output where I want in the code.

Link to comment
Share on other sites

Piece of cake.

 

Using the above mentioned gcodes, simply assign the contents of scomm$ to the string variable of your choice. Then you can output your string wherever you want.

 

Like this (in pcomment$):

 

 if gcode$ <= 1007,
       [
	 sMyString = scomm$
	 scomm$ = ""
       ]

 

If you have multiple lines of manual entry, you will need to set up a buffer file to collect the data, then output from there.

Link to comment
Share on other sites

Check here for information on buffer files:

 

http://www.emasterca...showtopic=72936

 

I read that thread earlier today when I was searching for my help with this issue. It wasn't exactly what I was hoping to see. I don't have any issues with how manual entry posts in the header. My issue is before/after tool changes.

 

Creating my own string variable has not helped so far either.

Link to comment
Share on other sites

This is fairly easy to do. You want to output the contents of the Manual Entry in the Header, but save the operation comment (1008) until 'psof$' for output. No need to use a buffer. (You certainly could if you need more output options)

 

Start by adding two variables, one numeric that you use as a flag, and a string variable to hold the 1008 operation comment:

header	   : 0	 #Header flag variable for comment processing
sop_comm : ""    #String variable for saved operation comment

 

Then, in 'pheader$' set 'header' to '1'. Add the command variable 'comment$' at the location in the header where you want to dump the Manual Entry comments. Keep in mind that if you do this, the Manual Entry will be output before the Tool Table.

 

After adding 'comment$', set the variable 'header' to '0'. That indicates that we are done processing the file header.

 

Here is the complete pheader$ post block:

 

pheader$		 #Call before start of file
  header = one
  if subs_before, " ", e$ #header character is output from peof when subs are output before main
    else, "%", e$
  sav_spc = spaces$
  spaces$ = 0
  *progno$, sopen_prn, sprogname$, sclose_prn, e$
  #sopen_prn, "PROGRAM NAME - ", sprogname$, sclose_prn, e$
  sopen_prn, "DATE=DD-MM-YY - ", date$, " TIME=HH:MM - ", time$, sclose_prn, e$ #Date and time output Ex. 12-02-05 15:52
  spathnc$ = ucase(spathnc$)
  smcname$ = ucase(smcname$)
  stck_matl$ = ucase(stck_matl$)
  snamenc$ = ucase(snamenc$)
  sopen_prn, "MCX FILE - ", *smcpath$, *smcname$, *smcext$, sclose_prn, e$
  sopen_prn, "NC FILE - ", *spathnc$, *snamenc$, *sextnc$, sclose_prn, e$
  #sopen_prn, "DATE - ", month$, "-", day$, "-", year$, sclose_prn, e$  #Date output as month,day,year - Ex. 02-12-05
  #sopen_prn, "DATE - ", *smonth, " ", day$, " ", *year2, sclose_prn, e$ #Date output as month,day,year - Ex. Feb. 12 2005
  #sopen_prn, "TIME - ", time$, sclose_prn, e$  #24 hour time output - Ex. 15:52
  #sopen_prn, "TIME - ", ptime sclose_prn, e$  #12 hour time output 3:52 PM
  comment$

  sopen_prn, "MATERIAL - ", *stck_matl$, sclose_prn, e$
  spaces$ = sav_spc
  header = zero

 

Now you need to modify 'pcomment2' to save the 1008 comment:

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,
    [
    if header = one, sop_comm = scomm$  #Operation comment
    else, sopen_prn, scomm$, sclose_prn, e$  #Operation comment
    ]
  if gcode$ = 1051, sopen_prn, "MACHINE NAME: ", scomm$, sclose_prn, e$  #Machine name
  if gcode$ = 1052, sopen_prn, "MACH GROUP COMMENT: ",scomm$, sclose_prn, e$  #Group comment
  if gcode$ = 1053, sopen_prn, "MACHINE GROUP NAME: ",scomm$, sclose_prn, e$  #Group name
  if gcode$ = 1054, sopen_prn, scomm$, sclose_prn, e$  #File Descriptor

 

Finally, in 'psof$' you need to replace the 'comment$' command variable with some logic to check the 'sop_comm' and output it if it isn't blank:

 

  c_mmlt$ #Multiple tool subprogram call
  pbld, n$, sopen_prn, *opnum, sclose_prn, e$
  ptoolcomment

  if sop_comm <> sblank, sopen_prn, sop_comm, sclose_prn, e$ #Output saved operation comment

  #comment$
  pcan
  pbld, n$, *t$, sm06, e$
  pindex

 

Hope that helps,

 

Colin

Link to comment
Share on other sites

Colin,

 

That got me a little closer, but still no good. Few more things to mention:

 

1. header is already a variable in my post

2. I have no problems with manual entry in my header(I like it where it is)

 

 

 

Before any changes were made to post, I could do either this:

 

()
(TOOL COMMENT)
()
(MANUAL ENTRY)  [b]<---NOT correct spot[/b]
N730 (OPERATION COMMENT) [b]<---- CORRECT spot[/b]
N740 T3 M06
N750 G00 G17 G90 G54 X19.798 Y118.357 S0 M05

 

or this:

 

(MANUAL ENTRY) [b]<-----CORRECT spot[/b]
N730 (OPERATION COMMENT) [b]<----NOT correct spot[/b]
()
(TOOL COMMENT)
()
N740 T3 M06
N750 G00 G17 G90 G54 X19.798 Y118.357 S0 M05

 

After trying your suggestions, the operation comment was in the correct spot, but it was the same operation comment from my first operation for all the operations, and by #ing out comment$, my manual entry will not post out.

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