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:

Mazak local subroutines?


romeo123400
 Share

Recommended Posts

Hello all, I have programmed many machines (Lathes and Mills) in the past that would allow subroutines (Local)

to be included in the main program, either above or below the main program.

 

I am new to the Mazak and was wondering if my machine allows this programming method. I hate using separate files

for subprogam call.

 

I have a Mazak Nexus 640t.

 

Also, my machine is not running the g84 tap cycle as a typical lathe would run. When I run the canned cycle

the tool approaches the part and feeds in to depth but the spindle does not reverse and the tool remains at Z depth.

 

Any thoughts on this, be happy to hear..

Link to comment
Share on other sites

Nope Mazak requires they be seperate and handle it just like you are handling it. What does the machine say about using the G84? I always did that using Mazatrol on the lathes on the Integrex I used many different cycles, but would give a call to the apps department to see what is going on with the G84 not working correctly. Your EIA/ISO book should have the code spelled out for the tapping cycle what does it say? D oyu need a R or something else to make it reverse? I would try the G74 cycle and see if that does what you are looking for. I always thought the G84 was for milling and not turning on the Mazak's but with that control I can not be 100% sure.

 

This place is not like it use to be. You would have 10 people jumping at the chance to help, now it is just hit or miss.

Link to comment
Share on other sites

So I think that's what I was looking for. I don't want to have 6 separate programs to have to call when i could do it all in one program.

 

can I have multiple subprograms?

 

Example

Main program

G54

M98 H100 L1

G54

M98 H200 L1

 

G55

M98 H100 L1

G55

M98 H200 L1

 

G56

M98 H100 L1

G55

M98 H200 L1

G57

M98 H100 L1

G57

M98 H200 L1

m30

 

 

N100

subprogram fluff

m99

 

 

Example

N200

subprogram fluff

m99

 

 

Example

N300

subprogram fluff

m99

 

 

Example

N400

subprogram fluff

m99

 

I will give that a try tomorrow.

 

Thanks

Link to comment
Share on other sites

Yes, you can have as many subs as you need. In fact, you can call a sub from another sub with the M98.

The subs can be nested up to 4 times.

 

For example:

 

 

(main program)

M98 H100 L1

-

-

-

M30

 

 

(subs)

N100

-

M98 H900 L1

-

M99

 

 

N900

-

M98 H1500 L1

-

M99

 

 

N1500

-

M98 H4700 L1

-

M99

 

 

N4700

-

-

M99

Link to comment
Share on other sites

Well I tried that programming today and it was unresponsive. For starters I couldn't even get the machine to recognize G54 to G55 code.

 

Then, It did not even recognize the G98 H100 L1 code.

 

I had to write 4 separate programs, what a mess.

 

tomorrow I have to do 4 more only to make a left hand thread.

Link to comment
Share on other sites

Romeo, I don't know if the spacing matters, but I'd try it with no spaces, and also try leaving off the L1, since you're not repeating it anyways.

 

Here's a program that's running on a machine right now. This same program has been run on Fusion and Matrix controls.

 

Also, I always have the local subs below the M30 or M99 of the main program.

 

A2A756F4-B28C-4574-9B21-54917B14703B-2071-0000027F26236B66.jpg

 

640DB4D1-B07B-40A3-963C-8780F9EEB4CD-2071-0000027ECC81877B.jpg

Link to comment
Share on other sites

Hello Joe, I have been trying to PM you but your account says you cant receive any more messages. Might check into that. Rotary Ninja tells

me your the Mazak guy with all the answers.

 

I'm looking at your program and it looks like your program is for Mill work. I am trying to run the lathe and I tried the above sample but it didn't work.

I cant even get my machine to accept a G55. Does it have to have a G55.1 or G55,2?

 

I have a Mazak Nexus with a 640t control

Link to comment
Share on other sites

It has ben a while since I ran the 640t control, so please excuse me if this is wrong, but I believe in your sample above It says "G98 H100 L1", it should be M98 H100 L1.

 

As far as the G54 issue, I believe there is a parameter to switch the machine from using the mazatrol set-up info page to using G54-G59. If you are using the the mazatrol set-up info page the machine would want to see a G53.5, Does it recoginize that command? If so you can use G53.5 Z[#999] for multiple work offsets. The "999" is a macro variable and can be accessed through the macro variable page. I believe 950-999 are legal, and you can set them at the top of your program like this

 

#950=1.2345 (or whatever the number is)

#951=2.3456 (or whatever the number is)

 

G54.1 P1 are the "extended work offsets" and this is an option. if you press the soft key diagnos, version, option, it will bring up the options on the machine. You will also be able see if the machine has rigid tapping herenipet of your

 

G84.2 is the rigid tapping cycle and it must be programmed in feed per rev, and the tool must be define properly.

 

Can you post a snipet of your code?

Link to comment
Share on other sites

Taperlength something I never tried, but I did like my line numbers when doing sub stuff. If you do it that way you have to strip out the line numbers in your programs.

 

In my programs, only the subs have line numbers. To identify important lines, I usually use a little text comment in parentheses, which I can do a search for.

Link to comment
Share on other sites

OK Mazakers, I finally got my G55 to G59 issue relolved.

 

My 640t control initially boots up by default with G53 and G54

 

By commanding G52 then the machne will allow G55 commands.\

 

When your in G53 the control ignores any G55 to G59 work offset request.

 

Now I need to get this Internal subroutine issue resolved.

 

I tried the formats given to me but the machine never makes it down to read the N100 sub program call.

 

 

This is what I did...........Please advise

 

 

 

O5555

(PROGRAM NAME - TEST)

(DATE - JAN. 31 2013 TIME - 3:47 PM)

G20

(TOOL - 9 OFFSET - 9)

(35 DEG. VNMG 331 FINISH TURN INSERT - )

G28 U0. W0.

M98 H100 L1

G52

G55

M98 H100 L1

M30

 

 

N100

G28 U0. W0.

G0 T0909

G18

M8

G97 S1675 M03

G0 X3.4201 Z.0308

G50 S3600

G96 S1500

G99 G1 X3.4908 Z-.0046 F.005

X3.9908 Z-.2546

X4.0616 Z-.2899

G0 G52

G55 X3.4201 Y0. Z.0308

G1 X3.4908 Z-.0046

X3.9908 Z-.2546

X4.0616 Z-.2899

G0 G52

G56 X3.4201 Y0. Z.0308

G1 X3.4908 Z-.0046

X3.9908 Z-.2546

X4.0616 Z-.2899

M9

G28 U0. W0. M05

M99

Link to comment
Share on other sites

Well I kind of expected that. I worked on Mazaks for well of 20 years and I always did what worked and using different sub programs worked on those controls. I like keeping eveything in one program, but if it doesn't work you do what has to be done to get the job done. Using different programs will work and you can keep pushing what you are doing, but if I had something that would get the job doen and it is an acceptable way to get it done then I would move on and fight another fight. I did not think about the G53 giving you a fit, but makes sense and I would look in my parameters to see if you change the default behavior. That is one of the things I always liked about the Mazaks was the ability to change a lot of behavior. If you get the subroutine problem worked out I would appreciate if you shared your experiences.

Link to comment
Share on other sites

Romeo, I've never looked this up in the programming manual, and we don't even have a Mazak lathe so I can't test and give you any feedback. Did you try it with no spaces, and no L call? Also, maybe try 4 digit N numbers instead of 3. Doesn't seem like it would matter, but it's worth a shot. The only style I've ever done it, is what you see there in my screen captures.

Link to comment
Share on other sites

Yup I agree with ll of you but I didn't get to where I am by giving up so I will fight that fight.

I do appreciate all your input. I will let it rest for now and do what needs to be done.

 

If you guys ever have the opportunity to use subroutines in your same program you would love it. Trust me.

 

Even mastercam posts the m98 code as your main program and puts the subs in order at the bottom. I just freakin love this sh$@%t.

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