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:

Basic Post Processing - June 2017 Containment Thread


Recommended Posts

I'm starting this new thread for any students in my Basic Post Processing class for June 2017. Feel free to ask questions, or initiate new discussions. I figured a "Containment Thread" like this would be a good idea, rather than each student starting a brand new thread. Plus, (and I find this to be a fairly universal truth), your fellow classmates will get just as much benefit out of your question as you do.

  • Like 8
Link to comment
Share on other sites
  • Colin Gilchrist changed the title to Basic Post Processing - June 2017 Containment Thread

:thumbsup:, as soon as I can think of some good questions applicable to topics we are currently on or have covered on here they will go.  Also, I wouldn't thing there is need to limit discussion from an answer perspective to just class members or Colin responding?  I personally would welcome answers and approaches from all good or bad such that we can learn many different ways to tackle the problems.

  • Like 2
Link to comment
Share on other sites

Notepad++ extension [https://notepad-plus-plus.org/] 

On 4/12/2017 at 3:07 AM, Günther Massimo - GMCCS said:

I use UltraEdit for postwriting etc. It's my favorite editor, because it can edit binary files too.

Therefore I wrote a small parser in C++ to extract all the keywords from mcpost.dll for syntaxhighlighting.

If you import the attached XML file in Notepad++, you get syntaxhighlighting and intellisense in Notepad++. :)

 

Mastercam MP2018.xml

 

 

 

  • Like 2
Link to comment
Share on other sites
21 hours ago, Lord Wukits said:

11:30 PM Eastern Time - Office Hours Saturday 2017-06-10

Office Hours has been moved to Saturday, from 3:30-5:30 PM. I've sent out an invitation to class members with a new Go to Meeting Link, since the time has changed from our original weekly meetings...

Thanks,

Colin

Link to comment
Share on other sites

I am trying to add some custom program rotation to my post, my problem is on the last tool with rotation, I can't get the G69 to post

I am using Misc Values (mi8) to toggle on/off  (mpmaster post)

Thanks,  Ed

N40 M06 T40 (--SPOT DRILL, D0.625 - 5/8, HSS)                 -----------second to last tool with rotation
(= ADD NOTES)
G00 G17 G90 G54 B0. X0 Y0 S427 M03
G68 X0 Y0 R#110                                                                    ---------------Rotation post good
X-1.2132 Y3.0303
G43 H100 Z1. M08 T56
G94
G98 G81 Z-1.9645 R-1.648 F1.06
X2.0726 Y2.5456
X3.1149 Y-.7399
X.2366 Y-3.218
X-1.5912 Y-2.8715
X-3.2543 Y.8904
G80
X-2.3969 Y1.0941
G98 G81 Z-.133 R.1 F6.83
X-1.7809 Y-1.9417
X1.4149 Y-2.223
G80
X2.1791 Y-2.131
G98 G81 Z-.1875 R.1 F6.83
G80
X2.5517 Y.6585
G98 G81 Z-.132 R.1 F6.83
X.1625 Y2.6301
G80 M09
G69                                                                                                 ---------------------cancel is good
M05
G91 G30 X0. Y0. Z0.
M01

N56 M06 T56 (--1.0 FLAT ENDMILL)                                            ---------------last tool with rotation
(*MILL RELIEF, SECTION F-F - 1 PLC)
(COMPENSATION TYPE - COMPUTER)
(= ADD NOTES)
G00 G17 G90 G54 B0. X0 Y0 S1000 M03
G68 X0 Y0 R#110                                                                                  ---------------Rotation post good
X-3.7737 Y2.9752
G43 H56 Z2. M08 T24
Z-2.397
G94 G01 X-3.7327 Y2.7286 F5.
G03 X-3.4452 Y2.5228 I.2466 J.0409
G01 X-3.1887 Y2.5654
G03 X-2.1337 Y3.4197 I-.225 J1.3565
G01 X-2.0424 Y3.6524
G03 X-2.1838 Y3.9765 I-.2327 J.0913
G01 X-2.4165 Y4.0678
G00 Z2. M09
M05                                                                                                               ---------no cancel
G91 G30 X0. Y0. Z0.
M01

N24 M06 T24 (--DRILL, INSERT, 1-1/6 CENTRE-DEX)                            -------------no rotation from here to end 
(= ADD NOTES)
G00 G17 G90 G55 B90. X0. Y0. S721 M03
G43 H24 Z2. M08 T40
G94
G98 G81 Z0. R.45 F3.61
G80 M09
M05
G91 G30 X0. Y0. Z0.
M01

 

pretract        #End of tool path, toolchange
      phsm_off
      sav_absinc = absinc$
      absinc$ = one
      sav_coolant = coolant$
      coolant$ = zero
#      if nextop$ = 1003, #Uncomment this line to leave coolant on until eof unless
#        [                 #  explicitely turned off through a canned text edit
        if all_cool_off,
          [
          #all coolant off with a single off code here
          if coolant_on, pbld, n$, *sall_cool_off, e$
          coolant_on = zero
          ]
        else,
          [
          local_int = zero
          coolantx = zero
          while local_int < 20,
            [
            coolantx = and(2^local_int, coolant_on)
            local_int = local_int + one
            if coolantx > zero,
              [
              coolantx = local_int
              pbld, n$, scoolantx, e$
              ]
            coolantx = zero
            ]
          coolant_on = zero
          ]
#        ]
      #cc_pos is reset in the toolchange here
      cc_pos$ = zero
      if prog_rot = one, pbld, n$, "G69", e$                                         #Added Program Rotation Cancel
      if convert_rpd$ = one,
        [
        gcode$ = one
        feed = maxfeedpm
        ipr_type = zero
        ]
      else, gcode$ = zero
      pbld, n$, sccomp, *sm05, psub_end_mny, e$
       pbld, n$, sgabsinc, sgcode, [if gcode$ = 1, sgfeed], *sg28, "X0.", "Y0.", "Z0.", [if gcode$ = 1, feed], scoolant, e$
#      if lock_codes = one & rot_on_x, pbld, n$, *sunlock, sunlockcomm, e$
#      pbld, n$, *sg28, "X0.", "Y0.", protretinc, e$
#      if lock_codes = one & rot_on_x & cuttype = 0, pbld, n$, *slock, slockcomm, e$
      if abs(fmtrnd(cabs)) > 360 & nextop$ <> 1003 & not(index),
        [
        if lock_codes = one, pbld, n$, *sunlock, sunlockcomm, e$
        rotretflg = 1
        pbld, n$, `sg28, protretinc, e$
        rotretflg = 0
        if lock_codes = one & cuttype = 0, pbld, n$, *slock, slockcomm, e$
        ]
      absinc$ = sav_absinc
      coolant$ = sav_coolant

Link to comment
Share on other sites
13 hours ago, huskermcdoogle said:

Look in end of file post block.  You will have the end of file retract and so on so forth.  You will have to add it there as well.

I added it there but still the same, no cancel at the end of that tool (N56), and besides the tool with no cancel is not the end of the file

Link to comment
Share on other sites

You said you are using mi8$ to turn this on. Are you saving the mi8$ using sav_mi8$ and then using that back to the last section of the post? With Mastercam once a mi variable is used the value is discarded. By using the sav_ and  last_ come into play in the MPMaster post. Depending on how you are doing what you are doing you will need to use the sav_ of a mi or you may even need to make logic to call the last_ .

The latest MPMASTER has mi9$ in it. Follow that logic and you will see if doesn't go to the end, but the mr1$ and mr2$ logic do use last_ logic that allows their values to be used over and over again the way till the end of the post code to turn off the highspeed codes with phsm_off. It relates to the mr1_flg and how they use it's logic to help keep track of what is on or off which is important for something like you are doing.

For me MP Logic is hard to wrap your brain around sometimes. You really need to think about the process and then break down the steps and it is best to use a proven process to work out a new process.

Link to comment
Share on other sites

 

15 minutes ago, C^Millman said:

You said you are using mi8$ to turn this on. Are you saving the mi8$ using sav_mi8$ and then using that back to the last section of the post? With Mastercam once a mi variable is used the value is discarded. By using the sav_ and  last_ come into play in the MPMaster post. Depending on how you are doing what you are doing you will need to use the sav_ of a mi or you may even need to make logic to call the last_ .

The latest MPMASTER has mi9$ in it. Follow that logic and you will see if doesn't go to the end, but the mr1$ and mr2$ logic do use last_ logic that allows their values to be used over and over again the way till the end of the post code to turn off the highspeed codes with phsm_off. It relates to the mr1_flg and how they use it's logic to help keep track of what is on or off which is important for something like you are doing.

For me MP Logic is hard to wrap your brain around sometimes. You really need to think about the process and then break down the steps and it is best to use a proven process to work out a new process.

Yes I am using mi8$ and no I am not saving...thanks for pointing me it the right direction. 

Link to comment
Share on other sites
11 hours ago, Burnt said:

Does anyone know if CodeExpert works with the HLE edition of Mastercam? Whenever I try to open CodeExpert I receive an error but the HLE still opens up fine.

You cannot Post your code with HLE, so I would assume that it won't work.

You should be able to install Mastercam, but just never use a Hasp on your computer. Thst should allow you to run Code Expert.

Link to comment
Share on other sites
8 hours ago, Colin Gilchrist said:

You cannot Post your code with HLE, so I would assume that it won't work.

You should be able to install Mastercam, but just never use a Hasp on your computer. Thst should allow you to run Code Expert.

HLE won't post anything or it won't post tool path code? With the learning edition of V9 you would only get the first three lines of each tool path but the rest of the program would post fine. I built my post(s) with that edition. I'm about ready to build the fourth generation and I was wondering if I can use the current HLE.

Link to comment
Share on other sites
2 hours ago, Burnt said:

Is there any way we could receive the download for the HLE edition through EApprentice Colin? If not does anyone know where to get one? I put it on my PC quite a while ago and deleted the install file.

Your reseller can get it to you

Link to comment
Share on other sites
15 hours ago, Colin Gilchrist said:

I'm not sure of the answer to that. Maybe someone with the current HLE can test it?

If you click the "Post selected operations" button in the HLE you'll get the error message "The requested function can not be run from Mastercam Mill X9 (Demo/Home Learning Edition)" and nothing will happen.

Link to comment
Share on other sites
20 minutes ago, JParis said:

Only to customers who purchase something through the site

Correct! The HLE download can be seen by anyone but only downloaded by someone who's purchased something through the eStore. Once they've purchased permission to download the HLE (and any future versions of it) will last indefinitely.

Link to comment
Share on other sites

Using misc integers, I have successfully implemented functionality to choose to pause the program at the start with a custom combination of block delete and/or M00/01. For example:

%
O1000 (O1000)
/ (O1000)       or    /M01 (O1000)       or     M00 (O1000)     or     (O1000)
...

My question:  Is there a better place or way to implement this without using misc integers?  I would prefer it to be file specific and not dependent on the first operation, but yet easy to customize for each file.

Link to comment
Share on other sites
On 6/15/2017 at 4:32 PM, Burnt said:

Is there any way we could receive the download for the HLE edition through EApprentice Colin? If not does anyone know where to get one? I put it on my PC quite a while ago and deleted the install file.

Do you want to save the setting inside the Mastercam file? If yes, then I would use Manual Entry paths. If it might be File specific, but change "on-the-fly" quite often, then I'd suggest a Prompt Question.

There are also some other places we could enter the information inside Mastercam. For example; Machine Group Properties Comment, or Operation Group Comment. We could also use Canned Text.

Canned Text is probably the easiest method to use, and we can explore the various options during the next Office Hours.

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