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:

SUB-PROGRAMM


Recommended Posts

Hi ,

i am facing some problems in " Sub-Programming " NC file ..

N114 G1 Z0. F1000.
N116 M98 P1001
N118 G0 G90 X85. Y63. Z1.
N120 G1 Z0. F1000.
N122 M98 P1002
N124 G0 G90 X117. Y145. Z1.
N126 G1 Z0. F1000.
N128 M98 P1003
N130 G0 G90 X177. Y205. Z1.
N132 G1 Z0. F1000.
N134 M98 P1003
N136 G0 G90 X265. Y243. Z1.
N138 G1 Z0. F1000.
N140 M98 P1002
N142 G0 Z#120
N144 G91 G0 G28 Z0.
N146 G28 X0. Y0.
N148 M30
 

Sub-prog ...

O1001
N100 G91
N102 X-1.5 F3151.5
N104 Y-23.5
N106 X47.
N108 Y47.
N110 X-47.
N112 Y-23.5
N114 X1.5
N116 M99


O1002
N100 G91
N102 Y-1.5 F3151.5
N104 X23.5
N106 Y47.
N108 X-47.
N110 Y-47.
N112 X23.5
N114 Y1.5
N116 M99


O1003
N100 G91
N102 X1.5 F3151.5
N104 Y25.
N106 G2 X1.5 Y1.5 I1.5 J0.
N108 G1 X50.
N110 G2 X1.5 Y-1.5 I0. J-1.5
N112 G1 Y-50.
N114 G2 X-1.5 Y-1.5 I-1.5 J0.
N116 G1 X-50.
N118 G2 X-1.5 Y1.5 I0. J1.5
N120 G1 Y25.
N122 X-1.5
N124 M99


In above NC files ,  M98 P1001 , P1002 , P1003 but not getting 4 th sub prog as M98 P1004 & P1005 ?

instead of this i am getting M98 P1003 , P1002 ....( repeating ) 

i need : one drive chain should give one sub program ( M98 P1001 , P1002 , P1003 , P1004 , & P1005 if i created one contour Tool path  by selecting 5 drive chains )

( Highlighted by Red Color above )

please any one help me ....

Customization of Post .. where is that logic  to modify & get as i need ?

 

Link to comment
Share on other sites

Hi!

Not quite sure here, but have you checked if maybe this has to do something with your issue?

see attached image of control definition, from Machine, Job setup group, Control definition

It is not so much info other than your trouble, a sample file will help other gurus here if this not solve it for you, which post you are using, what cycle etc etc.

anyway, hope this helps something at least!

 

Geir

SUB.PNG

  • Like 1
Link to comment
Share on other sites

You should upload a Zip 2 Go file (create inside Mastercam), so that someone can help you. Just looking at your NC code doesn't help us help you. We need to see the 'input' to the post. Make sure you check the 'Toolpaths' button so we get a copy of your Mastercam file in the Zip package.

There are a dozen or more Post Blocks inside the Post that control Subroutine output. Along with those Post Blocks, there are a bunch of Command Variables that influence the output, and pre-defined variables that grab NCI data. You also have to know how MP reacts to the 1018 and 1019 trigger lines, and if the Subroutine is Transform or Non-Transform.

So we can't just say "oh, go here and make this edit", without knowing a lot more about your tool path settings, and seeing the way that your Mastercam is built.

  • Like 1
Link to comment
Share on other sites

Here I attached ZIP2GO file & i made 1 contour Tool Path with selecting 25 drive chains .

but getting only O1001 , O1002 , O1003 & O1004 .

i need " one chain should create One sub program number i.e, O1001 , O1002 ....... O1020 , O1022 ,.....O1025.... Cause when ever power cut/ shut down  then i will call sub prog number ( its reduce ideal time moment )

 i doing this for Laser machine  ....

Subprog2266.ZIP

Link to comment
Share on other sites

So you are looking for output like this?

%
O0000(T)
N100 G21
N102 G0 G17 G40 G49 G80 G90
( T1 | NOZZLE 1 MM | H1 )
N104 T1
N106 G0 G90 G54 X-2. Y-.5
N108 G43 H1 Z1.
N110 M3 S#100
N112 G4 X#140
N114 M98 P0001
N116 G0 G90 X58. Y-.5 Z1.
N118 M98 P0002
N120 G0 G90 X118. Y-.5 Z1.
N122 M98 P0003
N124 G0 G90 X178. Y-.5 Z1.
N126 M98 P0004
N128 G0 G90 X238. Y-.5 Z1.
N130 M98 P0005
N132 G0 G90 X-2. Y59.5 Z1.
N134 M98 P0006
N136 G0 G90 X58. Y59.5 Z1.
N138 M98 P0007
N140 G0 G90 X118. Y59.5 Z1.
N142 M98 P0008
N144 G0 G90 X178. Y59.5 Z1.
N146 M98 P0009
N148 G0 G90 X238. Y59.5 Z1.
N150 M98 P0010
N152 G0 G90 X-2. Y119.5 Z1.
N154 M98 P0011
N156 G0 G90 X58. Y119.5 Z1.
N158 M98 P0012
N160 G0 G90 X118. Y119.5 Z1.
N162 M98 P0013
N164 G0 G90 X178. Y119.5 Z1.
N166 M98 P0014
N168 G0 G90 X238. Y119.5 Z1.
N170 M98 P0015
N172 G0 G90 X-2. Y179.5 Z1.
N174 M98 P0016
N176 G0 G90 X58. Y179.5 Z1.
N178 M98 P0017
N180 G0 G90 X118. Y179.5 Z1.
N182 M98 P0018
N184 G0 G90 X178. Y179.5 Z1.
N186 M98 P0019
N188 G0 G90 X238. Y179.5 Z1.
N190 M98 P0020
N192 G0 G90 X-2. Y239.5 Z1.
N194 M98 P0021
N196 G0 G90 X58. Y239.5 Z1.
N198 M98 P0022
N200 G0 G90 X118. Y239.5 Z1.
N202 M98 P0023
N204 G0 G90 X178. Y239.5 Z1.
N206 M98 P0024
N208 G0 G90 X238. Y239.5 Z1.
N210 M98 P0025
N212 G0 Z#120
N214 G91 G0 G28 Z0.
N216 G28 X0. Y0.
N218 M30
 
O0001
N100 G1 Z0. F1000.
N102 X-.5 F2980.
N104 X50.5
N106 Y50.5
N108 X-.5
N110 Y-.5
N112 Y-2.
N114 M99
 
O0002
N100 G1 Z0. F1000.
N102 X59.5 F2980.
N104 X110.5
N106 Y50.5
N108 X59.5
N110 Y-.5
N112 Y-2.
N114 M99
 
O0003
N100 G1 Z0. F1000.
N102 X119.5 F2980.
N104 X170.5
N106 Y50.5
N108 X119.5
N110 Y-.5
N112 Y-2.
N114 M99
 
O0004
N100 G1 Z0. F1000.
N102 X179.5 F2980.
N104 X230.5
N106 Y50.5
N108 X179.5
N110 Y-.5
N112 Y-2.
N114 M99
 
O0005
N100 G1 Z0. F1000.
N102 X239.5 F2980.
N104 X290.5
N106 Y50.5
N108 X239.5
N110 Y-.5
N112 Y-2.
N114 M99
 
O0006
N100 G1 Z0. F1000.
N102 X-.5 F2980.
N104 X50.5
N106 Y110.5
N108 X-.5
N110 Y59.5
N112 Y58.
N114 M99
 
O0007
N100 G1 Z0. F1000.
N102 X59.5 F2980.
N104 X110.5
N106 Y110.5
N108 X59.5
N110 Y59.5
N112 Y58.
N114 M99
 
O0008
N100 G1 Z0. F1000.
N102 X119.5 F2980.
N104 X170.5
N106 Y110.5
N108 X119.5
N110 Y59.5
N112 Y58.
N114 M99
 
O0009
N100 G1 Z0. F1000.
N102 X179.5 F2980.
N104 X230.5
N106 Y110.5
N108 X179.5
N110 Y59.5
N112 Y58.
N114 M99
 
O0010
N100 G1 Z0. F1000.
N102 X239.5 F2980.
N104 X290.5
N106 Y110.5
N108 X239.5
N110 Y59.5
N112 Y58.
N114 M99
 
O0011
N100 G1 Z0. F1000.
N102 X-.5 F2980.
N104 X50.5
N106 Y170.5
N108 X-.5
N110 Y119.5
N112 Y118.
N114 M99
 
O0012
N100 G1 Z0. F1000.
N102 X59.5 F2980.
N104 X110.5
N106 Y170.5
N108 X59.5
N110 Y119.5
N112 Y118.
N114 M99
 
O0013
N100 G1 Z0. F1000.
N102 X119.5 F2980.
N104 X170.5
N106 Y170.5
N108 X119.5
N110 Y119.5
N112 Y118.
N114 M99
 
O0014
N100 G1 Z0. F1000.
N102 X179.5 F2980.
N104 X230.5
N106 Y170.5
N108 X179.5
N110 Y119.5
N112 Y118.
N114 M99
 
O0015
N100 G1 Z0. F1000.
N102 X239.5 F2980.
N104 X290.5
N106 Y170.5
N108 X239.5
N110 Y119.5
N112 Y118.
N114 M99
 
O0016
N100 G1 Z0. F1000.
N102 X-.5 F2980.
N104 X50.5
N106 Y230.5
N108 X-.5
N110 Y179.5
N112 Y178.
N114 M99
 
O0017
N100 G1 Z0. F1000.
N102 X59.5 F2980.
N104 X110.5
N106 Y230.5
N108 X59.5
N110 Y179.5
N112 Y178.
N114 M99
 
O0018
N100 G1 Z0. F1000.
N102 X119.5 F2980.
N104 X170.5
N106 Y230.5
N108 X119.5
N110 Y179.5
N112 Y178.
N114 M99
 
O0019
N100 G1 Z0. F1000.
N102 X179.5 F2980.
N104 X230.5
N106 Y230.5
N108 X179.5
N110 Y179.5
N112 Y178.
N114 M99
 
O0020
N100 G1 Z0. F1000.
N102 X239.5 F2980.
N104 X290.5
N106 Y230.5
N108 X239.5
N110 Y179.5
N112 Y178.
N114 M99
 
O0021
N100 G1 Z0. F1000.
N102 X-.5 F2980.
N104 X50.5
N106 Y290.5
N108 X-.5
N110 Y239.5
N112 Y238.
N114 M99
 
O0022
N100 G1 Z0. F1000.
N102 X59.5 F2980.
N104 X110.5
N106 Y290.5
N108 X59.5
N110 Y239.5
N112 Y238.
N114 M99
 
O0023
N100 G1 Z0. F1000.
N102 X119.5 F2980.
N104 X170.5
N106 Y290.5
N108 X119.5
N110 Y239.5
N112 Y238.
N114 M99
 
O0024
N100 G1 Z0. F1000.
N102 X179.5 F2980.
N104 X230.5
N106 Y290.5
N108 X179.5
N110 Y239.5
N112 Y238.
N114 M99
 
O0025
N100 G1 Z0. F1000.
N102 X239.5 F2980.
N104 X290.5
N106 Y290.5
N108 X239.5
N110 Y239.5
N112 Y238.
N114 M99
%

 

  • Like 1
Link to comment
Share on other sites

For a Contour Toolpath, you'll never be able to get that output with the "Subprogram" option under Depth Cuts. The "Subprogram" option for Depth Cuts allows you to repeat the XY motion of a Contour inside the Sub, while calling Z depths. So the first thing I did was disable that option (subprogram), and disabled the "Depth Cuts" completely.

I then went to the "Lead In/Out", and disabled the regular "Entry and Exit" motion. The default is to use "enter at the Midpoint" and even though you used "perpendicular" for the entry, it would cause a little bit of a dwell mark with your laser. So what I did instead was enabled "Extend the Start" and "Extend the End" of the contour. I set the value to 150% of the beam width, to give a little "ramp up" time, and did that for the exit as well. (Could probably go with 50% on the exit with no trouble if you want...) If you do want Extend motion to "cross" over itself, you should also disable the "Infinite Look ahead" in the Cut Parameters.

I then did a "Rechain All" on your chains in the Chain Manager. I selected just a single chain, in the lower left corner. I only chained that one chain for the Contour Operation.

Once the changes were compete, I regenerated the Operation. That gave me the single Contour Op, with a single chain.

I then Right-Clicked on the Contour Operation, and from the Right-Click menu, chose Mill Toolpaths > Transform.

The Transform Toolpath is designed to do many things. One of them is outputting Subprograms in a Rectangular Pattern.

Make the following changes on the Type and Method Tab:

  • Type = Translate
  • Method = Coordinate
  • Source = Geometry
  • Group NCI output by = Operation Type
  • Create new operations and geometry = Unchecked
  • Copy source operation = Checked
  • Disable Posting in selected operations = Checked
  • Subprogram = Checked, set to Absolute
  • Work offset numbering = Maintain source operation's

Make the following changes on the Translate Tab:

  • Method = Rectangular
  • Instances X = 5 Y = 5, Distance Between
  • Rectangular X = 60. Y = 60.
  • Pattern Shift all Zeros.
  • Like 2
Link to comment
Share on other sites
  • 2 weeks later...
6 hours ago, PcRobotic said:

I just sent you a 3MB email, I got this problem before.  It took me 1 week to figure out and I won't let that happen on you.

 

Anything that you think I don't know please share just like I did to you, thank you.

Transform - Translate.pdf

You didn't get different Work offset output because you used the Automagic setting for work offsets and not the increment by one.

Nice work sir thanks for giving back. ;)

  • Like 1
Link to comment
Share on other sites
On 11/08/2017 at 5:54 AM, C^Millman said:

You didn't get different Work offset output because you used the Automagic setting for work offsets and not the increment by one.

Nice work sir thanks for giving back. ;)

Here are 2 more, I love to share what I know and thank you for you guys teaching me all the post stuff.  In return, I just put some stuff together and I hope this stuff help you guys in TRANSFORM - SUB PROGRAM....

Transform - Rotate.pdf

Transform - Mirror.pdf

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