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:

Search the Community

Showing results for tags 'Post edits to add function.'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Mastercam Forums
    • Industrial Forum
    • Post Processor Development Forum
    • Educational Forum
    • Woodworking Forum
    • Machining, Tools, Cutting & Probing
    • 3D Printing

Categories

  • Mastercam Demo Software
  • Files Referenced in Books and Videos
    • Instructor Files
    • Mastercam X7
    • Mastercam X6
    • Mastercam X5
    • Mastercam X4
    • Mastercam X3
    • Mastercam X2
    • STEM
  • Free Book Samples
    • Mastercam 2020
    • Mastercam 2019
    • Mastercam 2018
    • Mastercam 2017
    • Mastercam X9
    • Mastercam X8
    • Mastercam X7
    • Mastercam X6
    • Mastercam X5
    • Mastercam X4
    • Mastercam X3
    • STEM Curriculum
  • Mastercam eBooks (PDF)
    • Mastercam 2023
    • Mastercam 2022
    • Mastercam 2021
    • Mastercam 2020
    • Mastercam 2019
    • Mastercam 2018
    • Mastercam 2017
    • Mastercam X9
    • Mastercam X8
    • Mastercam X7
    • Mastercam X6
    • Mastercam X5
    • Mastercam X4
  • Mastercam Documentation
    • Brochures
    • Press Releases
    • Tips & Guides
  • Tools
  • Post Processors
    • Post Processor 'How To' Info
    • Mpmaster (all versions)
    • Mplmaster (all versions)
    • Application Specific Posts
    • Educational Post Processors
    • Post Processor Request Forms
    • Post Processor Feature Checklist Forms

Product Groups

  • Sitewide Subscription
  • Books
    • Older Versions (No Demo Software)
  • eBooks (PDF)
    • Mastercam 2023
    • Older Versions (No Demo Software)
  • Multimedia
    • Older Versions (No Demo Software)
  • Clearance
  • eCourses
  • eCourses

Categories

  • General Mastercam
    • Hasp / Sim License Articles
    • Nethasp
  • Lathe
  • Toolpaths
    • FBM Drill
    • FBM Mill
    • Dynamic Milling
    • Contour
    • Drill
    • Pocket
    • Face
    • 2D Highspeed
    • Engraving
    • Surface Rough
    • Surface Finish
    • Surface High Speed
    • Curve 5 axis
    • Drill 5 Axis
    • Swarf 5 Axis
    • Multisurface 5 Axis
    • Flow 5 Axis
    • Rotary 4 Axis
    • Port 5 axis
    • Advanced Multiaxis
    • Circle Paths
    • Circle 5 Axis
  • Wire EDM
  • Art
  • Post-Processing
  • Editors & DNC
  • Add-ons + Chooks & Nethooks
  • Windows, PC & Hardware Troubleshooting
    • Windows Issues
    • Videocards
    • Network & Filesharing
  • Multiaxis
  • eBooks

Blogs

  • Mastercam Training Solutions
  • eMastercam Community
  • Reseller Blog
  • Future of CNC Manufacturing Education
  • Mastercam Xtras
  • Latest News

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Interests


Location


Mastercam SIM Number


AIM


MSN

Found 1 result

  1. I have a customer that has the ability to call the pallet number based off of a Mcode. M60 is a standard pallet change and M61 is Pallet #1 and M62 is Pallet #2. I looked around in the generic posts and even Mpmaster and see no thought given to this. I looked up old topics and such and must have missed one that laid this out so I thought I would share this for others. BEFORE ATTEMPTING ANY POST MODIFICATION BACK UP YOUR POSTS, MACHINE AND CONTROL DEFINITION. USE THIS AT YOUR OWN RISK!!!!! Okay disclaimer out of the way lets start the process. Using the latest Mpmaster since this is In-House's web site here is what I did. I decided to use mi3 as the trigger since it was not used by the post. We have to decide how we want to handle this. I like 0 as my default which will trigger M60 if it is turned on to be used. We need to define that using our control definition for Mpmaster. By doing this through the control definition the correct way we know it updates our associated Machine Definition as well. We need to change the post to support the use of mi3 for this process. Under Mirc Variables section of the post define the sav_mi3 since we will be suing it for error checking. #Misc variables sav_mi3 : 0 #Store mi3 value for error checking on pallet call In the error messages on the post add the output statement for this function if used wrong. Meaning if you have pallet 1 called and call it again the system will alert you of this error and if done the other way will error out. # -------------------------------------------------------------------------- # Error messages # -------------------------------------------------------------------------- spalleterror : "ERROR - CANNOT USE SAME PALLET NUMBER AT START AND END OF PROGRAM" We need to define our string to use this process. I like using strings for this process, but hard coded values for output would work as well. I placed this one under the Table Rotations strings in Mpmaster # -------------------------------------------------------------------------- # Pallet Call Process using mi3 spallet_0 : "M60 (PALLET CALL)" #Pallet Call Standard spallet_1 : "M61 (PALLET #1 CALL)" #Pallet Call for Pallet #1 spallet_2 : "M62 (PALLET #2 CALL)" #Pallet Call for Pallet #2 spallet : "" #Target for string fstrsel spallet_0 mi3$ spallet 3 -1 We need to put the call statement for this in the bottom of our pheader$ section of the post: pheader$ #Call before start of file hour = int(time$) min = int((time$ - hour)* 100) if hour > 12, hour = hour - 12 if hour = 0, hour = 12 year$ = year$ + 2000 "%", e$ spaces$=0 if progno$ = 0, progno$ = 1234 # Added so there is never a program number Zero *progno$, " ", scomm_str, sprogname$, scomm_end, e$ spathnc$ = ucase(spathnc$) smcname$ = ucase(smcname$) comment$ # File descriptor spaces$=0 #scomm_str, "PROGRAM NAME - ", sprogname, scomm_end, e #scomm_str, "DATE=DD-MM-YY - ", date, " TIME=HH:MM - ", time, scomm_end, e #scomm_str, "MASTERCAM - V", *vers_no$, scomm_end, e$ # scomm_str, "MASTERCAM - X", scomm_end, e$ scomm_str, "MCX FILE - ", smcpath$, smcname$, smcext$, scomm_end, e$ if spostname_sav = snull, spostname_sav = spostname # scomm_str, "POST - ", snamepst$, scomm_end, e$ #scomm_str, "MP - V", *dll_vers$, scomm_end, e$ stck_matl$ = ucase(stck_matl$) # scomm_str, "MATERIAL - ", stck_matl$, scomm_end, e$ scomm_str, "PROGRAM - ", sprogname$, sextnc$, scomm_end, e$ scomm_str, "DATE - ", *smonth, "-", *day$, "-", *year$, scomm_end, e$ # MON-DD-YYYY #scomm_str, "DATE - ", *year$, "/", *month$, "/", *day$, scomm_end, e$ # YYYY/MN/DD #scomm_str, "DATE - ", *day$, "/", *month$, "/", *year$, scomm_end, e$ # DD/MN/YYYY #scomm_str, "DATE - ", date$, scomm_end, e$ # DD-MM-YR scomm_str, "TIME - ", *hour, ":", *min, [if time$ < 12, " AM"], [if time$ >= 12, " PM"], scomm_end, e$ # 12 hour #scomm_str, "TIME - ", time$, scomm_end, e$ # 24 hour # scomm_str, "POST DEV - ", *slicense, scomm_end, e$ spaces$=sav_spc if seqno$ = 0, omitseq$ = yes$ sav_progno = progno$ if tseqno = 1 & omitseq$ = 1, [ seqno$ = 1 seqinc$ = 1 n$ = seqno$ ] sav_rot_on_x = 0 header = 0 pallet, e$ #Added for Pallet Call Logic Then also at the end of for the code to come out: 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$ pallet, e$ #Added for Pallet Call Logic n$, "M30", e$ mergesub$ clearsub$ mergeaux$ clearaux$ "%", e$ #Multi-post logic spath_in = spathnci$ + snamenci$ spath_set = spathpst$ + sset spath_out = spathnc$ + snamenc$ + sextdoc sparams = ssq + sdq + spath_in + sdq + sspace + sdq + spath_set + sdq + sspace + sdq + spath_out + sdq + ssq Then we add the logic, error checking and outputting section into our post. I placed this after the pgear secton of the post: pallet #Call the Pallet Number from the mi3$ Varaible. if mi3$ = 0, *spallet else, [ if mi3$ = sav_mi3, result = mprint(spalleterror) #Added for error checking else, *spallet ] Now you should have a process where in the 1st operation you use the mi3 for the pallet you want called and in the last peration you put in the mi3 value for the next pallet. If you use the 0 to call M60 you will not get an error, but if you use 1 or 2 and repeat that value then the post will tell you there is an error and not output the last one. You could make it a fatal error with exitpost$, but I did not think that was needed. Hopefully this will help someone and can be of benefit for anyone trying to add or make changes to their post. I am not expert and I again and open to anyone pointing out my mistakes or things I missed.

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