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:

c axis g-code output


Recommended Posts

hi, there

can anybody help me controlling the limit of c axis output not to exceed 360 degrees

 

a c-axis face contour toolpath outputs the following code in MastercamX3

 

N2320 X53.672 C360.

N2330 X53.669 C360.224

N2340 X53.659 C360.447

N2350 X53.643 C360.67

N2360 X53.62 C360.892

N2370 X53.591 C361.114

 

I don't want the C output to exceed 360 degrees

where can I do that in the MPLFAN.PST post or at any place

 

the attachment contains the toolpath

 

thanks

Link to comment
Share on other sites

Well, this may get into the confusing realm of Machine Definition, Control Definition, post processor, or a combination of them. Check in your MD first and see if changing your settings here will help. This is for a 4th axis on a 3-axis vertical mill, but you could have something similar for your C-axis component of your lathe.

 

See if changing here gives you the output you want. I could be completely wrong, but it's worth a shot.

Link to comment
Share on other sites

finally worked

 

I found it in an old version 9 post

 

1- add this sub to the post

 

p360_max_index #------- control the c axis output not to exceed 360 degrees

[

while cabs > 360, cabs = cabs - 360

while cabs < zero, cabs = cabs + 360

while cabs = 360, cabs = 0

cabs = abs(cabs)

]

 

2- and call it within pfcout and pcout

 

 

pfcout #Force C axis output

 

p360_max_index

.

.

.

 

 

pcout #C axis output

 

p360_max_index

.

.

.

 

thanks for you all :rolleyes:

Link to comment
Share on other sites

Changing the output does not require post edits such as you have implemented.

This is what the 'scase' initializations are for (among other things):

 

#Machining position turret/spindle settings
# Switch strings based on turret position top/bottom-left/right and cut type.
# Turret position is based on the Mastercam settings (see lathtype).
# Strings are re-assigned for output in the routine psw_str_mult.
# The string variable sw_string holds the place position value to determine
# how to assign the strings.  Planes are relative to the view from Mastercam.
# Assign the 17 digit string following the alpha columns below:
# A - C axis, 1 = axis winds, 2 = axis signed, 3 = indexer, 4 = shortest direction
# B - Spindle direction, 0 = normal, 1 = reverse
# C - Plane 0 arc/comp, 0 = normal, 1 = switch
# D - Plane 1 arc/comp, 0 = normal, 1 = switch
# E - Plane 2 arc/comp, 0 = normal, 1 = switch
# F - Plane 0, 0 = G17, 1 = G19, 2 = G18
# G - Plane 1, 0 = G17, 1 = G19, 2 = G18
# H - Plane 2, 0 = G17, 1 = G19, 2 = G18
# Decimal (required)
# I - Plane 0, X axis, 0 = normal, 1 = switch sign from basic
# J - Plane 0, Y axis, 0 = normal, 1 = switch sign from basic
# K - Plane 0, Z axis, 0 = normal, 1 = switch sign from basic
# L - Plane 1, X axis, 0 = normal, 1 = switch sign from basic
# M - Plane 1, Y axis, 0 = normal, 1 = switch sign from basic
# N - Plane 1, Z axis, 0 = normal, 1 = switch sign from basic
# O - Plane 2, X axis, 0 = normal, 1 = switch sign from basic
# P - Plane 2, Y axis, 0 = normal, 1 = switch sign from basic
# Q - Plane 2, Z axis, 0 = normal, 1 = switch sign from basic
use_only_tl  : 1 	#Use only Top turret/Left spindle settings (below) for
        			#all Mastercam turret/spindle selections
        			#When configuring for multi-spindle/turret set to 0

#Columns-   	ABCDEFGH.IJKLMNOPQ #Turret/Spindle        	#Path Type
scase_tl_c1  : "10000222.000000000"  #Top turret/Left spindle, Turning cut
scase_tl_c2  : "11000012.000000000"  #Top turret/Left spindle, Right Face cut
scase_tl_c_2 : "11110012.000000000"  #Top turret/Left spindle, Left Face cut
scase_tl_c3  : "10010102.000000000"  #Top turret/Left spindle, Cross cut
scase_tl_c4c : "10000111.000000000"  #Top turret/Left spindle, Y axis subs. Cycle
scase_tl_c4  : "10000222.000000000"  #Top turret/Left spindle, Y axis subs.
scase_tl_c5  : "10000222.000000000"  #Top turret/Left spindle, Multisurf Rotary

#Columns-   	ABCDEFGH.IJKLMNOPQ
scase_bl_c1  : "10000222.000000000"  #Bottom turret/Left spindle, Turning cut
scase_bl_c2  : "11000012.000000000"  #Bottom turret/Left spindle, Right Face cut
scase_bl_c_2 : "11110012.000000000"  #Bottom turret/Left spindle, Left Face cut
scase_bl_c3  : "10010102.000000000"  #Bottom turret/Left spindle, Cross cut
scase_bl_c4c : "10000111.000000000"  #Bottom turret/Left spindle, Y axis subs. Cycle
scase_bl_c4  : "10000222.000000000"  #Bottom turret/Left spindle, Y axis subs.
scase_bl_c5  : "10000222.000000000"  #Bottom turret/Left spindle, Multisurf Rotary

#Columns-   	ABCDEFGH.IJKLMNOPQ
scase_tr_c1  : "10000222.000000000"  #Top turret/Right spindle, Turning cut
scase_tr_c2  : "11000012.000000000"  #Top turret/Right spindle, Right Face cut
scase_tr_c_2 : "11110012.000000000"  #Top turret/Right spindle, Left Face cut
scase_tr_c3  : "10010102.000000000"  #Top turret/Right spindle, Cross cut
scase_tr_c4c : "10000111.000000000"  #Top turret/Right spindle, Y axis subs. Cycle
scase_tr_c4  : "10000222.000000000"  #Top turret/Right spindle, Y axis subs.
scase_tr_c5  : "10000222.000000000"  #Top turret/Right spindle, Multisurf Rotary

#Columns-   	ABCDEFGH.IJKLMNOPQ
scase_br_c1  : "10000222.000000000"  #Bottom turret/Right spindle, Turning cut
scase_br_c2  : "11000012.000000000"  #Bottom turret/Right spindle, Right Face cut
scase_br_c_2 : "11110012.000000000"  #Bottom turret/Right spindle, Right Face cut
scase_br_c3  : "10010102.000000000"  #Bottom turret/Right spindle, Cross cut
scase_br_c4c : "10000111.000000000"  #Bottom turret/Right spindle, Y axis subs. Cycle
scase_br_c4  : "10000222.000000000"  #Bottom turret/Right spindle, Y axis subs.
scase_br_c5  : "10000222.000000000"  #Bottom turret/Right spindle, Multisurf Rotary

 

Change the first value in the string (column "A") as needed to determine C output.

If 'use_only_tl' is set to 1 as above, just change the bolded values here:

 

#Columns- ABCDEFGH.IJKLMNOPQ #Turret/Spindle #Path Type

scase_tl_c1 : "10000222.000000000" #Top turret/Left spindle, Turning cut

scase_tl_c2 : "11000012.000000000" #Top turret/Left spindle, Right Face cut

scase_tl_c_2 : "11110012.000000000" #Top turret/Left spindle, Left Face cut

scase_tl_c3 : "10010102.000000000" #Top turret/Left spindle, Cross cut

scase_tl_c4c : "10000111.000000000" #Top turret/Left spindle, Y axis subs. Cycle

scase_tl_c4 : "10000222.000000000" #Top turret/Left spindle, Y axis subs.

scase_tl_c5 : "10000222.000000000" #Top turret/Left spindle, Multisurf Rotary

 

using these settings to match the desired output:

# A - C axis, 1 = axis winds, 2 = axis signed, 3 = indexer, 4 = shortest direction

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