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:

Program Posting Question


westerfieldc
 Share

Recommended Posts

I usually put the G10 lines at the start of the program that I am running.

 

As for your issue, with no toolpaths in the program, there may not be anything to trigger the post to go to the section to start outputting the header information. Just a guess, since I have never tried to post a 'comment only' program.

 

Good luck! :cheers:

Link to comment
Share on other sites

how often are you going to want to do this? If it's not much you might as well edit your file

 

Suspect you might have to edit your post-processor. as mentioned above with no toolpath there's some triggers in the post gone missing

 

to not edit the post:

 

Make a drill path and just select your work origin. then delete that one point in the posted NC file

 

otherwise you'll have to open up your .PST or MCPOST - find the section that outputs the header and make it come out all the time when only a manual entry is put in.

Link to comment
Share on other sites

Hi everyone,

 

Let me jump in here, because what he really needs is a post guy...

 

The reason you aren't getting any output is because the 'comment$' command variable that outputs the code from Manual Entry is located in 'psof$' (Start-of-file) that gets called by the first toolchange gcode$ (1001).

 

That is why you aren't getting any output.

 

What you need to do is either modify the post, or create a separate post for only posting these type of operations.

 

If you just move the 'comment$' command up into 'pheader$' that will work, but it will also cause your operation comment from the 1st operation to post above the tool table. What I usually recommend is making a modification to the 'pcomment2' post block to save the operation comment for output later in 'psof$'.

 

Let me dig up an example after work and I'll post it...

 

Thanks,

 

Colin

Link to comment
Share on other sites

Ok, first make a backup of your post before you begin.

 

Next, add initialize a variable near the top of your post:

header	   : 0	 #Header flag variable for comment processing

 

Then, initialize a string variable:

sop_comm	 : ""    #String variable to hold operation comment from pheader

 

Once you've done that, modify the 'pheader post block as follows:

 

pheader$		 #Call before start of file
  header = one		    #<<<<< Set Flag
  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$				 #<<<<< dump comments to pcomment$/pcomment2
  sopen_prn, "MATERIAL - ", *stck_matl$, sclose_prn, e$
  spaces$ = sav_spc
  header = zero		    #<<<<< Reset Flag

 

That will process the comments in the header. Now you have to save the operation comments, and output them later. Modify the 'pcomment2' post block:

 

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$		 #Save Operation comment
    else, [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

 

Now, modify 'psof$' as follows:

  ptoolcomment
  if sop_comm <> sblank, sopen_prn, sop_comm, sclose_prn, e$ #Output saved operation comment, if not blank
  #comment$    #<<<<<<< Add pound sign in front of 'comment$'
  pcan
  pbld, n$, *t$, sm06, e$
  pindex

 

That should give you what you need. It will process a manual entry toolpath in the header, and output operation comments normally during 'psof$' output...

 

Hope that helps,

 

 

Colin

Link to comment
Share on other sites
  • 4 months later...

Sorry I have not responded to this sooner but I have gotten super busy. I did as Colin suggested and all seem good except the subs_before variable. I don't have it in my post any where and I'm not sure how to initialize it. This is supper close to what I need just need help over this last hurdle.

 

Thanks

Chris

Link to comment
Share on other sites

Hi Chris,

 

That variable is part of an update we made to our Mill posts. If you are using an older version of the posts that don't have that logic, then you do not need to add it unless you want to support Subprograms before the NC Code output. That logic is used (along with other logic elsewhere in the post) to read the setting in the Control Definition for Subs Before or Subs After the main program.

 

Thanks,

 

Colin

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