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:

Heidi post


Jack Neelands™
 Share

Recommended Posts

Hey guys...was wondering if any of you were able to get your post to put out a repeat number after the CALL LBL when clicking on the absolute/incremental subprogram icon in the depths of cut window

 

psub_call_s$ #Call to sub level

sub_prg_no$ = sub_prg_no$ + 100 #Add sub number offset

pbld, n$, "CALL LBL ", *sub_prg_no$,(SOMETHING NEEDS TO GO IN HERE) e$

 

Would also like to see that option in the ramping window as well and be able to get it to work that way....anY takers?

 

 

Im am trying to avoid this

 

 

8 L X+35.3553 Y+35.3553 R0 F MAX M3

9 L B+90 F MAX

10 L Z+10 F MAX

11 L IZ-9.9 F MAX

12 L IZ-.02 F250

13 CALL LBL 102

14 L IZ-.02 F250

15 CALL LBL 102

16 L IZ-.02 F250

17 CALL LBL 102

18 L IZ-.02 F250

19 CALL LBL 102

20 L IZ-.02 F250

21 CALL LBL 102

22 L IZ-.02 F250

23 CALL LBL 102

24 L IZ+.12 F100000

25 L IZ+9.9 F MAX

26 M5

27 B+0 F MAX

28 M02

1 ;

2 LBL 102

3 L IX-1.4142 IY+1.4143 RL F1000

4 CC IX+1.4142 IY-1.4142

5 C IX+2.8285 IY-2.8285 DR+

6 CC IX-1.4142 IY+1.4142

7 C IX-2.8285 IY+2.8285 DR+

8 L IX+1.4142 IY-1.4143 R0

9 LBL 0

 

 

and get this instead

 

 

8 L X+35.3553 Y+35.3553 R0 F MAX M3

9 L B+90 F MAX

10 L Z+10 F MAX

11 L IZ-9.9 F MAX

12 L IZ-.02 F250

13 CALL LBL 102 REP 6 <-----SEE THE DIFFERANCE?

24 L IZ+.12 F100000

25 L IZ+9.9 F MAX

26 M5

27 B+0 F MAX

28 M02

1 ;

2 LBL 102

3 L IX-1.4142 IY+1.4143 RL F1000

4 CC IX+1.4142 IY-1.4142

5 C IX+2.8285 IY-2.8285 DR+

6 CC IX-1.4142 IY+1.4142

7 C IX-2.8285 IY+2.8285 DR+

8 L IX+1.4142 IY-1.4143 R0

9 LBL 0

Link to comment
Share on other sites

If you use CALL LBL with REP then the called LBL must before CALL LBL! This method works like GOTO.

 

Example:

8 CC X+188,500 Y-50,000

9 LP PR+5,000 PA+0,000 R F555 M

10 LBL 1

11 CP IPA+360,000 IZ-1,000 DR+ R F200 M

12 CALL LBL 1 REP 3 /3

13 CP IPA+360,000 DR+ R F M

14 LP PR+0,000 PA+0,000 R F555 M09

15 Z+100,000 R F5555 M05

16 STOP M00

 

This code not work!

 

8 L X+35.3553 Y+35.3553 R0 F MAX M3

9 L B+90 F MAX

10 L Z+10 F MAX

11 L IZ-9.9 F MAX

12 L IZ-.02 F250

13 CALL LBL 102 REP 6 < Go to LBL102 and not return!

24 L IZ+.12 F100000

25 L IZ+9.9 F MAX

26 M5

27 B+0 F MAX

28 M02

1 ;

2 LBL 102

3 L IX-1.4142 IY+1.4143 RL F1000

4 CC IX+1.4142 IY-1.4142

5 C IX+2.8285 IY-2.8285 DR+

6 CC IX-1.4142 IY+1.4142

7 C IX-2.8285 IY+2.8285 DR+

8 L IX+1.4142 IY-1.4143 R0

9 LBL 0

 

The correct code:

8 L X+35.3553 Y+35.3553 R0 F MAX M3

9 L B+90 F MAX

10 L Z+10 F MAX

11 L IZ-9.9 F MAX

< removed L IZ-.02 F250

13 CALL LBL 102 < REP removed

24 L IZ+.12 F100000

25 L IZ+9.9 F MAX

26 M5

27 B+0 F MAX

28 M02

1 ;

2 LBL 102

L IZ-.02 F250 < inserted

3 L IX-1.4142 IY+1.4143 RL F1000

4 CC IX+1.4142 IY-1.4142

5 C IX+2.8285 IY-2.8285 DR+

6 CC IX-1.4142 IY+1.4142

7 C IX-2.8285 IY+2.8285 DR+

8 L IX+1.4142 IY-1.4143 R0

9 CALL LBL 102 REP 6 < Repeat here

10 LBL 0

 

CALL LBLxxx REPyy = GOTO with repeat, nesting levels endless! The LBL definiton must first, CALL with REP later!

 

CALL LBLxxx = Subrutine call, nesting levels max. 8!

 

These two very different method.

Link to comment
Share on other sites

The Z incremental minus move must be inside the label you want to repeat, or the part will be cut by the REP command at the same level. It will not cut deaper every repeat. Jack, your version will work if you place the Z incremental move inside the LBL SET.

Alma's version is the way I would program it, by hand, but then you do not have control over the LBL to change the REP funtion. When you want a clean up cut, you could call the LBL again but only once with Jacks method. With Alma's the LBL will allways repeat 6 times.

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