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:

Another post question - null toolchange


Bruce Caulley
 Share

Recommended Posts

I have 2 ops that are on the same plane using the same tool. Why would the post output a toolchange as below? I do not have the force toolchange tab checked.

 

 

code:

 G91 G28 Z0.                             ptlchg0$ p__5:868 346.

G90 ptlchg0$ p__5:868 346.

M11 B67. M10 ptlchg0$ p__5:868 346.

M98 P555 ptlchg0$ p__5:868 346.

G0 G90 X-147.656 Y-39.998 ptlchg0$ p__5:868 346.

G43 H#100 Z138.69 ptlchg0$ p__5:868 346.

Z129.69 pzrapid$ prapidout 348.

G1 Z128.69 F2000. plin$ plinout 350.

X-109.592 F3400. plin$ plinout 352.

G3 Y-28.57 R5.714 pcir$ pcirout 354.

G1 X-139.656 plin$ plinout 356.

G2 Y-17.142 R5.714 pcir$ pcirout 358.

G1 X-109.592 plin$ plinout 360.

G3 Y-5.714 R5.714 pcir$ pcirout 362.

G1 X-139.656 plin$ plinout 364.

G2 Y5.714 R5.714 pcir$ pcirout 366.

G1 X-109.592 plin$ plinout 368.

G3 Y17.142 R5.714 pcir$ pcirout 370.

G1 X-139.656 plin$ plinout 372.

G2 Y28.57 R5.714 pcir$ pcirout 374.

G1 X-109.592 plin$ plinout 376.

G3 Y39.998 R5.714 pcir$ pcirout 378.

G1 X-147.656 plin$ plinout 380.

Z129.69 F10000. plin$ plinout 382.

G0 Z138.69 pzrapid$ prapidout 384.

G91 G28 Z0. ptlchg0$ p__5:868 438.<============This line not needed

G90 ptlchg0$ p__5:868 438.<============This line not needed

M11 B67. M10 ptlchg0$ p__5:868 438. <============This line not needed

M98 P ptlchg0$ p__5:868 438.<============This line not needed

G0 G90 X-127.992 Y-40. ptlchg0$ p__5:868 438.<============This line not needed

G43 H#100 Z129.69 ptlchg0$ p__5:868 438.

G1 Z128.69 F2000. plin$ plinout 440.

G41 D60 Y-48.8 F3400. plin$ plinout 442.

G3 X-119.192 Y-40. R8.8 pcir$ pcirout 444.

G1 Y40. plin$ plinout 446.

G3 X-127.992 Y48.8 R8.8 pcir$ pcirout 448.

G1 G40 Y40. plin$ plinout 450.

Z129.69 F10000. plin$ plinout 454.

M319 peof$ peof$ 456.

G91 G28 Z0. peof$ peof$ 456.

G90 peof$ peof$ 456.

M01 peof$ peof$ 456.

M99 peof$ peof$ 456.

% peof$ peof$ 456.

Link to comment
Share on other sites

Hi David,

 

The null toolchange post block seems to be the culprit. Search in your post for ptlchg0$ and see what the logic looks like. There should be some kind of boolean "if" statement that compares the current toolplane to the last toolplane and looks for a change. If no change has occured, it should retract the tool to the Z retract or clearance of the current operation, then move to the next op with no toolchange. If you post a snippet of the null toolchange post block here I'll take a look.

 

HTH,

Link to comment
Share on other sites

From the post:

 

code:

 ptlchg0$         #Call from NCI null tool change (tool number repeats)                        

pcuttype

pcom_moveb

pcheckaxis

c_mmlt$ #Multiple tool subprogram call

comment$

pcan

result = newfs(15, feed) #Reset the output format for 'feed'

pbld, n$, sgplane, e$

pspindchng

pbld, n$, scoolant, e$

if mi1$ > one & workofs$ <> prv_workofs$,

[

sav_absinc = absinc$

absinc$ = zero

pbld, n$, "G91 G28 Z0.", e$

n$, "G90", e$

pbld, n$, "M11", pfcout, "M10", e$

 

n$, "M98 P", work_shift, e$

pbld, n$, *sgcode, *sgabsinc pfxout, pfyout, e$

pbld, n$, sg43, "H#100" , pfzout, scoolant, pstagetool, e$

pe_inc_calc

ps_inc_calc

absinc$ = sav_absinc

]

if cuttype = zero, ppos_cax_lin

if gcode$ = one, plinout

else, prapidout

pcom_movea

c_msng$ #Single tool subprogram call

Link to comment
Share on other sites

Also,

In the example above on one of the unnecessary lines there is a line: M98 P

 

After the P there should be the workoffset number which I have defined in the post. In the post section above you can see:

code:

 n$, "M98 P", work_shift, e$ 

I can live with the unnecessary null toolchange, but only if the variable work_shift outputs for all null toolchanges and not just the first.

 

Bruce

Link to comment
Share on other sites

This is what I have:

 

code:

  # --------------------------------------------------------------------------

# Rotary Axis Settings

# --------------------------------------------------------------------------

vmc : 0 #SET_BY_MD 0 = Horizontal Machine, 1 = Vertical Mill

rot_on_x : 3 #SET_BY_MD Default Rotary Axis Orientation

#0 = Off, 1 = About X, 2 = About Y, 3 = About Z

rot_ccw_pos : 0 #SET_BY_MD Axis signed dir, 0 = CW positive, 1 = CCW positive

index : 0 #SET_BY_MD Use index positioning, 0 = Full Rotary, 1 = Index only

ctable : 5 #SET_BY_MD Degrees for each index step with indexing spindle

use_frinv : no$ #SET_BY_CD Use Inverse Time Feedrates in 4 Axis, (0 = no, 1 = yes)

maxfrdeg : 2000 #SET_BY_MD Limit for feed in deg/min

maxfrinv : 999.99#SET_BY_MD Limit for feed inverse time

maxfrinv_m : 99.99 #SET_BY_MD Maximum feedrate - inverse time

frc_cinit : yes$ #Force C axis reset at toolchange

ctol : 225 #Tolerance in deg. before rev flag changes

ixtol : 0.01 #Tolerance in deg. for index error

frdegstp : 10 #Step limit for rotary feed in deg/min

rot_type : 1 #SET_BY_MD Rotary type - 0=signed continuous, 1=signed absolute, 2=shortest direction

force_index : no$ #Force rotary output to index mode when tool plane positioning with a full rotary

use_rotmcode : 0 #Output M-Code for Axis direction (sindx_mc)

#0 = Signed direction (only valid when rot_type = 1)

#1 = M-Code for direction

#Rotary Axis Label options

use_md_rot_label : no$ #Use rotary axis label from machine def? - Leave set to 'no' until available

srot_x "A" #Label applied to rotary axis movement - rotating about X axis - used when use_md_rot_label = no

srot_y "B" #Label applied to rotary axis movement - rotating about Y axis - used when use_md_rot_label = no

srot_z "C" #Label applied to rotary axis movement - rotating about Z axis - used when use_md_rot_label = no

sminus "-" #Address for the rotary axis (signed motion)

 

#Axis locking

rot_lock : 1 #Use rotary axis lock/unlock codes (0 = no, 1 = yes)

slock "M10" #Axis lock

sunlock "M11" #Axis unlock

Link to comment
Share on other sites

I did a search and couldn't find that line. Here are my general output settings:

 

code:

 # --------------------------------------------------------------------------

# General Output Settings

# --------------------------------------------------------------------------

sub_level$ : 1 #CD_VAR Enable automatic subprogram support

breakarcs$ : 2 #CD_VAR Break arcs, 0 = no, 1 = quadrants, 2 = 180deg. max arcs

arctype$ : 2 #CD_VAR Arc center 1=abs, 2=St-Ctr, 3=Ctr-St, 4=unsigned inc.,

#5 = R no sign, 6 = R signed neg. over 180

do_full_arc$ : 0 #CD_VAR Allow full circle output? 0=no, 1=yes

helix_arc$ : 2 #CD_VAR Support helix arc output, 0=no, 1=all planes, 2=XY plane only

arccheck$ : 1 #CD_VAR Check for small arcs, convert to linear

atol$ : 0.01 #CD_VAR Angularity tolerance for arccheck

ltol$ : 0.002 #CD_VAR Length tolerance for arccheck

vtol$ : 0.0001#System tolerance

maxfeedpm : 500 #SET_BY_MD Limit for feed in inch/min

ltol_m : 0.05 #Length tolerance for arccheck, metric

vtol_m : 0.0025#System tolerance, metric

maxfeedpm_m : 10000 #SET_BY_MD Limit for feed in mm/min

force_wcs : yes$ #Force WCS output at every toolchange?

spaces$ : 1 #CD_VAR Number of spaces to add between fields

omitseq$ : yes$ #CD_VAR Omit sequence numbers?

seqmax$ : 9999 #CD_VAR Max. sequence number

stagetool : 0 #SET_BY_CD 0 = Do not pre-stage tools, 1 = Stage tools

stagetltype : 0 #0 = Do not stage 1st tool

#1 = Stage 1st tool at last tool change

#2 = Stage 1st tool at end of file (peof)

use_gear : 0 #Output gear selection code, 0=no, 1=yes

min_speed : 50 #SET_BY_MD Minimum spindle speed

nobrk$ : no$ #CD_VAR Omit breakup of x, y & z rapid moves

progname$ : 1 #Use uppercase for program name (sprogname)

prog_stop : 1 #Program stop at toolchange: 0=None, 1=M01, 2 = M00

tool_info : 2 #Output tooltable information?

#0 = Off - Do not output any tool comments or toolpable

#1 = Tool comments only

#2 = Tooltable in header - no tool comments at T/C

#3 = Tooltable in header - with tool comments at T/C

tlchg_home : no$ #Zero return X and Y axis prior to tool change?


Link to comment
Share on other sites

OK, so now that I have safe output when a null toolchange is called I need to get rid of the unnecessary null toolchanges that I am getting after every operation. If I have three ops on the same plane with the same tool I get the following:

 

code:

 %                                       pheader$ pheader$ 68.

NC GROUP2(O0000) pheader$ pheader$ 68.

(Experimental post ggggg Be Afraid) pheader$ pheader$ 68.

(MCX FILE MAKINO_CENTRE.MCX) pheader$ pheader$ 68.

( 16MM FIN (EDP09120) 842M | D60 | CONTROL COMP | ) pwrtt$ ptooltable 68.

M42 psof$ psof$ 70.

T#100 M6 psof$ psof$ 70.

G91 G28 Z0. psof$ psof$ 70.

G90 psof$ psof$ 70.

M11 G0 B0. M10 psof$ psof$ 70.

M98 P101 psof$ psof$ 70.

G0 X-65.018 Y48.8 S14000 M3 psof$ psof$ 70.

G43 H#100 Z171. M8 psof$ psof$ 70.

G1 Z170. F2000. plin$ plinout 72.

G41 D#101 plin$ pccdia 74.

X-73.818 F500. plin$ plinout 74.

G3 X-65.018 Y40. R8.8 pcir$ pcirout 76.

G1 X67.643 plin$ plinout 78.

G3 X76.443 Y48.8 R8.8 pcir$ pcirout 80.

G1 G40 X67.643 plin$ plinout 82.

Z171. F10000. plin$ plinout 86.

G91 G28 Z0. ptlchg0$ p__5:869 140.

G90 ptlchg0$ p__5:869 140.

M11 B0. M10 ptlchg0$ p__5:869 140.

M98 P101 ptlchg0$ p__5:869 140.

G0 G90 X-65.018 Y48.8 ptlchg0$ p__5:869 140.

G43 H#100 Z171. ptlchg0$ p__5:869 140.

G1 Z170. F2000. plin$ plinout 142.

G41 D#101 plin$ pccdia 144.

X-73.818 F500. plin$ plinout 144.

G3 X-65.018 Y40. R8.8 pcir$ pcirout 146.

G1 X67.643 plin$ plinout 148.

G3 X76.443 Y48.8 R8.8 pcir$ pcirout 150.

G1 G40 X67.643 plin$ plinout 152.

Z171. F10000. plin$ plinout 156.

G91 G28 Z0. ptlchg0$ p__5:869 210.

G90 ptlchg0$ p__5:869 210.

M11 B0. M10 ptlchg0$ p__5:869 210.

M98 P101 ptlchg0$ p__5:869 210.

G0 G90 X-65.018 Y48.8 ptlchg0$ p__5:869 210.

G43 H#100 Z171. ptlchg0$ p__5:869 210.

G1 Z170. F2000. plin$ plinout 212.

G41 D#101 plin$ pccdia 214.

X-73.818 F500. plin$ plinout 214.

G3 X-65.018 Y40. R8.8 pcir$ pcirout 216.

G1 X67.643 plin$ plinout 218.

G3 X76.443 Y48.8 R8.8 pcir$ pcirout 220.

G1 G40 X67.643 plin$ plinout 222.

Z171. F10000. plin$ plinout 226.

M319 peof$ peof$ 228.

G91 G28 Z0. peof$ peof$ 228.

G90 peof$ peof$ 228.

M01 peof$ peof$ 228.

M99 peof$ peof$ 228.

% peof$ peof$ 228.


headscratch.gif

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