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:

Return home on my Vtl


Recommended Posts

Hello All 

I use generic  fanuc  lathe post from mastercam,com  for my VTL lathe .After every operation my return code are

G28U0.V0.W0.M5 

I want to get only G28  W0.  

This is something what  I can change in my control def  or inside the post 

thank you for any help .

 

Link to comment
Share on other sites

Greetings @mirek1017

Go to pl_retract postblock in your post  and change to this

pl_retract      #Retract tool based on next tool gcode, lathe (see ptoolend)
      cc_pos$ = zero
      if home_type = one,
        [
        pmap_home   #Get home position, xabs
        ps_inc_calc #Set inc.
        pbld, n$, psccomp, e$
        pcan1, pbld, n$, *sgcode, pfxout, pfyout, pfzout, *toolno, e$
        pbld, n$, pnullstop, strcantext, e$
        ]
      else,
        [
        #Retract to reference return
        pbld, n$, `sgcode, psccomp, e$
        if home_type = m_one, pbld, n$, *toolno, e$
        pcan1, pbld, n$, *sg28ref, "U0.", [if y_axis_mch, "V0."], "W0.",  change to this ---->pcan1, pbld, n$, *sg28ref, "W0."
          pnullstop, strcantext, e$
        cutoff_proc = zero  #Reset flag if we are retracted
        if home_type > m_one, pbld, n$, *toolno, e$
        ]

this example is from MPLFAN.pts file your post may look little bit different.

Logic which I am using is like this

pl_retract      #Retract tool based on next tool gcode, lathe (see ptoolend) Here you can change output before tool change
      cc_pos$ = zero
      if home_type = one,
        [
        pmap_home   #Get home position, xabs
        ps_inc_calc #Set inc.
        pbld, n$, psccomp, e$
        pcan1, pbld, n$, *sgcode, pfxout, pfyout, pfzout, *toolno, e$
        pbld, n$, pnullstop, strcantext, e$
        ]
      else,
        [
        #Retract to reference return----
        pbld, n$, `sgcode, psccomp, e$
        if home_type = m_one, pbld, n$, *toolno, e$
        if spindle_stop = 1,
          [
          pcan1, pbld, n$, pnullstop, strcantext, e$
          pcan1, pbld, n$, [if scoolant = sm08, sm09, e$], strcantext, e$
          plathe_refpoint,
          ]
        else,
          [
          pcan1, pbld, n$, [if scoolant = sm08, sm09, e$], strcantext, e$
          plathe_refpoint
          ]
        if spindle_stop > 1, "Invalid input of Miscellaneous value #8 it should be between 0 and 2 ! ", e$
         # pnullstop, pscool, strcantext, e$  # you can se M9 here before the tool change
        cutoff_proc = zero  #Reset flag if we are retracted
        if tl_offset = 1,
          [
          if t$ <> tloffno$, tloffno$ = t$
          ] 
        toolno = t$ * 100 + tloffno$
        if home_type > m_one, pbld, n$, *toolno, e$
        ]

plathe_refpoint #Custom Tool Retract for Lathe
        if refpoint_lathe = 1, n$, *sg28ref, "U0.", "W0.", e$
        else,
          [
          if refpoint_lathe = 0,
          n$, *sg28ref, "U0.", e$
          n$, *sg28ref, "W0.", e$
          else,
            [
            n$, *sg28ref, "U0.", [if y_axis_mch, "V0."], "W0.", e$
            ]
          ]
        if refpoint_lathe > 2, "Invalid input of Miscellaneous value #6 it should be between 0 and 2 ! ", e$


Hope this can help you and guide you on the right path.

Kind regards

Ivan

Link to comment
Share on other sites

MATERIAL - STEEL INCH - 1030 - 200 BHN)
G20
(TOOL - 3 OFFSET - 3)
(RIGHT TURRET - 80 DEG.  INSERT - CNMG-432)
(FACE)
G0 T0303
G18
G97 S69 M03
G0 G54 X19.4 Z0.
G50 S1500
G96 S350
G99 G1 X-.2625 F.01
G0 Z.1
G28 U0. V0. W0. M05
T0300
M01
(TOOL - 3 OFFSET - 3)
(RIGHT TURRET - 80 DEG.  INSERT - CNMG-432)
(RGH OD.02 STOCK FOR FINISH)
G0 T0303
G18
G97 S69 M03
G0 G54 X19.4 Z.1707
G50 S1500
G96 S350
G71 U.1 R.1
G71 P1 Q2 U.02 W.01 F.015
N1 G0 X8.2986 S350
G1 Z.0524 F.015
X8.4867 Z-.0417
G3 X8.505 Z-.0638 I-.0221 K-.0221
G1 Z-1.75
X17.8475
G3 X17.8917 Z-1.7591 K-.0313
G1 X17.9567 Z-1.7917
G3 X17.975 Z-1.8137 I-.0221 K-.0221
G1 Z-3.2662
N2 X19.4
G0 Z.1707
G28 U0. V0. W0. M05
T0300
M01
(TOOL - 3 OFFSET - 3)
(RIGHT TURRET - 80 DEG.  INSERT - CNMG-432)
(FINISH OD)
G0 T0303
G18
G97 S161 M03
G0 G54 X8.2803 Z.1616
G50 S1500
G96 S350
G1 Z.0616 F.005
X8.4867 Z-.0417
G18 G3 X8.505 Z-.0638 I-.0221 K-.0221
G1 Z-1.75
X17.8475
G3 X17.8917 Z-1.7591 K-.0313
G1 X17.9567 Z-1.7917
G3 X17.975 Z-1.8137 I-.0221 K-.0221
G1 Z-3.2662
X18.2578
G0 Z.03
G28 U0. V0. W0. M05
T0300
M01

Link to comment
Share on other sites

Greetings @mirek1017

To get information about your grooving insert you should use 20102 parameter and you will get insert width.

*Use rparsngl function 

This is my output
(T44  | OD GROOVE LEFT - NARROW | D44  | INSERT - Width = 3.00 )
(#6.Operation type - Plunge rough; also, chained grooves |  )
(     |  VC = S115 mm/min       |     )
(     |  MAX RPM = S2000 RPM     |     )
(     |  Feedrate = 0.10 mm/rev |     )
(==========================================================)

Kind regards

Ivan Žugec

Link to comment
Share on other sites
1 hour ago, BehindYou said:

yes

I am use this generic post ,I can find this number parameter 

[POST_VERSION] #DO NOT MOVE OR ALTER THIS LINE# V25.00 P4 E1 W25.00 T1610375561 M25.00 I0 O10
scncpost_revision     := "25.85" # Internal revision number for use by CNC Software only.  Please do not change this number.
scustpost_revision    := "0"  # Revision number for use by Resellers or customers.
# Post Name           : Mplfan.pst
# Product             : LATHE
# Machine Name        : GENERIC FANUC
# Control Name        : GENERIC FANUC
# Description         : GENERIC FANUC LATHE C-AXIS POST
# Mill/Turn           : YES
# 4-axis/Axis subs.   : YES
# 5-axis              : NO
# Subprograms         : YES
# Canned Cycles       : YES
# Executable          : mp.dll
#
# WARNING: THIS POST IS GENERIC AND IS INTENDED FOR MODIFICATION TO
# THE MACHINE TOOL REQUIREMENTS AND PERSONAL PREFERENCE.
#
# Associated File List$
#
# default.mcam-control
# LATHE DEFAULT.mcam-lmd
# LATHE DEFAULT MM.mcam-lmd
#
# Associated File List$
#
# --------------------------------------------------------------------------
 

 

 

Link to comment
Share on other sites

Greetings @mirek1017

Before I go on,
Whatever you do in your post it's on your own responsibility.

Follow this steps and you will have output which you want, related with insert width for groove tools
1.
Create format statement if you don't have it already
fs2 25  1.4 1.2lt   #Decimal, absolute, 4/3 trailing

2.
Create new variable:
fmt  "Groove Insert Width = "   25  groove_width  # Tool width for programming ( "Groove Insert Width = "  you can change the name how ever you like)

3.
Go to pparameter$ postblock (there is one more way which doesn't require this) 
add : if prmcode$ = 20102, groove_width = rparsngl(sparameter$, 4)  # Capture insert width for grooving tools
make sure you will follow the order of the numbers (just to keep it tidy) 

4.
Go to ltlchg$   #Toolchange, lathe  postblock
Search for Comment$ predefined variable, 
now past this either above or under comment$ variable ( you decide)
if opcode$ = 103, sopen_prn, sline, groove_width, sline, sclose_prn, e$
what it will do is this
if opcode$ is equal to 103 (103 means Groove) print ( | value which is stored in the groove_width variable | )  new line ( e$ means new line)
other then that add new strings in your post
scomm_str   : "("
scomm_end   : ")"
sline       : " | "

now this is our :

(  |  Groove Insert Width = 2.00  |  )
( #6. Operation type -  Plunge rough; also, chained grooves  |    )

just because I pasted  if opcode$ = 103, sopen_prn, sline, groove_width, sline, sclose_prn, e$ above predefined comment$ variable
our output is before  ( #6. Operation type -  Plunge rough; also, chained grooves  |    )

This is your personal decision how you want it.

I hope this can help you.

If you need more help/information's feel free to contact me.

kind regards

Ivan.

  • Thanks 1
Link to comment
Share on other sites
6 hours ago, BehindYou said:

Greetings @mirek1017

Before I go on,
Whatever you do in your post it's on your own responsibility.

Follow this steps and you will have output which you want, related with insert width for groove tools
1.
Create format statement if you don't have it already
fs2 25  1.4 1.2lt   #Decimal, absolute, 4/3 trailing

2.
Create new variable:
fmt  "Groove Insert Width = "   25  groove_width  # Tool width for programming ( "Groove Insert Width = "  you can change the name how ever you like)

3.
Go to pparameter$ postblock (there is one more way which doesn't require this) 
add : if prmcode$ = 20102, groove_width = rparsngl(sparameter$, 4)  # Capture insert width for grooving tools
make sure you will follow the order of the numbers (just to keep it tidy) 

4.
Go to ltlchg$   #Toolchange, lathe  postblock
Search for Comment$ predefined variable, 
now past this either above or under comment$ variable ( you decide)
if opcode$ = 103, sopen_prn, sline, groove_width, sline, sclose_prn, e$
what it will do is this
if opcode$ is equal to 103 (103 means Groove) print ( | value which is stored in the groove_width variable | )  new line ( e$ means new line)
other then that add new strings in your post
scomm_str   : "("
scomm_end   : ")"
sline       : " | "

now this is our :

(  |  Groove Insert Width = 2.00  |  )
( #6. Operation type -  Plunge rough; also, chained grooves  |    )

just because I pasted  if opcode$ = 103, sopen_prn, sline, groove_width, sline, sclose_prn, e$ above predefined comment$ variable
our output is before  ( #6. Operation type -  Plunge rough; also, chained grooves  |    )

This is your personal decision how you want it.

I hope this can help you.

If you need more help/information's feel free to contact me.

kind regards

Ivan.

thank you  I  will try 

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