Skip to main content
1-Visitor
March 2, 2017
Solved

T-Code is Modal still outputs an M06

  • March 2, 2017
  • 2 replies
  • 4327 views

Hello,

I and setting up a post for a Leadwell V-60i and need to set the Tool as modal. When I set this option in the Tool Change Sequence output options to "T-code is modal" it will stop posting the T code but still posts an M06.

How can I set up my post not to post an M06 when the T code is modal?

Does any one have a post for this machine that they can share?

Mike

Best answer by AustinN.C.,Inc.

The code Ken supplied should have worked except with out pre-defining the variable CUTOOL you will get FIL errors.  Here is some simpler code you could try...

$$ This variable goes in the Global Section

LSTTN = 0                      $$ DEFAULT LAST TOOL NUMBER TO ZERO

CIMFIL/ON,LOADTL

  TN = POSTF(7,4)          $$ GET THE CURRENT TOOL NUMBER

  IF(TN .NE. LSTTN)THEN

    XX = POSTF(13)          $$ PROCESS TOOL CHANGE...

    LSTTN = TN

  ELSE

    CONTIN                      $$ DO NOT PROCESS A DUPLICATE TOOL CHANGE

  ENDIF

CIMFIL/OFF

Fred

2 replies

21-Topaz II
March 3, 2017

If you are editing one of the GPost files, I've got a piece of code from one of my post-processors that handles tool changes. I didn't like the way tools were output by default and have always liked to have an optional stop after a tool change so I can verify the tool and its acceptability when doing the initial program tests. Here's the bit of FIL code:

----- [ Begin Code ] -----

$$

$$ --[ LOADTL ]---------------------------------------------------------

$$

$$ Handle a tool change to ensure that the machine is moved to the home

$$ position, that the outputs are in the desired format, etc.

$$

CIMFIL/ ON, LOADTL

  $$

  $$ Obtain the tool number requested from the current line. If the tool

  $$ number called for is different from the current tool, process it in

  $$ the appropriate fashion. Otherwise, ignore it.

  $$

  TLNUM  = POSTF ( 7, 4 )

  IF ( TLNUM .NE. CUTOOL ) THEN

    CUTOOL = TLNUM

    $$

    $$ Write preparatory lines.  Some of the machines need to be

    $$ in the home position to properly load tools, so we might as

    $$ well default to moving there.

    $$

    INSERT/ 'G00$'

    INSERT/ 'G49 G28', REPEAT, 17, ' ', 'Z0.0000$'

    INSERT/ 'G91$'

    INSERT/ 'G28 X0.0000   Y0.0000$'

    INSERT/ 'G90$'

    $$

    $$ Output the tool change and an optional stop.

    $$ "IN2TXT" is a routine that makes the tool number, in this case, 2 digits

    $$ of text. For example, 2 becomes "02", etc.

    $$

    CALL/ IN2TXT, INTVAL = TLNUM, NUMDIG = 2

    INSERT/ 'M06 T', TXTVAL, '$'

    INSERT/ 'M01$'

  ENDIF

CIMFIL/ OFF

----- [ End Code ] -----

You could change this stuff to output things the way you want.

mrego1-VisitorAuthor
1-Visitor
March 3, 2017

Thanks Kenneth,

I tried that FIL code but it still posts out the M06.

See example of post below.

G01 Z.1 F196.

M48

M05

G0 G17 G20 G40 G49 G69 G94

M06        <- This is what I need removed when the post is set to T-Code is modal

G54 G90

MIke

1-Visitor
March 3, 2017

The code Ken supplied should have worked except with out pre-defining the variable CUTOOL you will get FIL errors.  Here is some simpler code you could try...

$$ This variable goes in the Global Section

LSTTN = 0                      $$ DEFAULT LAST TOOL NUMBER TO ZERO

CIMFIL/ON,LOADTL

  TN = POSTF(7,4)          $$ GET THE CURRENT TOOL NUMBER

  IF(TN .NE. LSTTN)THEN

    XX = POSTF(13)          $$ PROCESS TOOL CHANGE...

    LSTTN = TN

  ELSE

    CONTIN                      $$ DO NOT PROCESS A DUPLICATE TOOL CHANGE

  ENDIF

CIMFIL/OFF

Fred

1-Visitor
March 10, 2017

Hello~~

I think you need to select "Not Available" in "Auxiliary Code" then M06 code not generate.

Have a good day!!

Mark Rao