Greetings, I am making some changes to my workflow and ended up with a

Greetings,
I am making some changes to my workflow and ended up with a couple of questions. I am implementing zero switches and I would like add tool change functions. My workflow will be something like this:

Power up
Preform Homing
Set G53 Zero to work
Run File

When chilipepr encounter an M6 tool change I need it to pause and goto to an absolute position. Something like:
G23 Z0
G23 X100 Y100

Then on un-pause:
G53 X0 Y0

Better yet would to return to the exact previous X and Y cords but I don’t know how to do that. Leading to the hard question. How can I pass a parameter back? Use another workspace?

But the main question is after pausing on M6 the gcode module is not sending any of my gcode?

Any advice in general about work flow?

What workspace are you using? i.e. what CNC controller?

I am using the TinyG.

That workspace has pretty good M6 support. When an M6 is hit basically ChiliPeppr just stops sending more Gcode and when you get to that line in the Gcode you do get a callback. You can write a macro that listens for that. Take a look at the pubsub for the Gcode widget. The event to subscribe to is “/com-chilipeppr-widget-gcode/onpause”

There are sample macros that can help you see how to subscribe and unsubscribe. Perhaps just also look at sample macro that creates buttons and generate a couple buttons for your pause/unpause commands and then have them auto load on startup. See the startup macro to do that.

I’ll add his note here so I can find it when company leaves:

I may be confused but I am thinking through the same workflow.

Can’t you put the tool change position and re-position code in the M6 window in the “Gcode Sender Options” screen?

After M6 you get a dialog and then you have to “unpause” to continue?

After the pause it will move to the next Gcode in the program?

Am I correct in assuming that you need a home the machine at startup/reset to set the 0,0 before the G53, otherwise a crash is possible (i.e. doesn’t know where it is?).

For me, on M6 tool changes, I try to use end mills that have retention rings so I don’t have to do anything other than swap tools. When I don’t have retention rings, I do re-zero the Z, but I don’t touch XY. In fact, I power my motors during the tool change to help ensure I don’t mess up the XY when I’m wrenching the spindle head to unscrew the end mill. To re-zero Z I either manually eyeball it, or use the touch plate.

@jlauer I never heard of retention rings? I am guessing this controls the depth of the tool in the spindle. Are these added to the tool or they come that way. Can you point me to one? thks.

@donkjr For some reason none of the code I add to the M6 window is being executed. Tablet workspace for TinyG.

Screenshot? I don’t really know what you mean.

@donkjr I use these bits a lot and this page ;shows the rings @jlauer is talking about.
(I find having a machine zero that is repeatable allows me to jig repetitive operations more quickly.)

http://www.precisebits.com/products/carbidebits/downcut_2flute.asp

@jlauer I am away from the machine today. Screen shot later.

What G23 stands for? This is to disable stroke check off (special zones defined by G22, the tool cannot enter). Shouldn’t it be G00 or G01?

I use various tools and often zero out Z-axis during M6 tool change (I use TouchPlate widget for that). My motors are set to idle 2 secs after they stop moving axis and I never got position lost, just be careful not to move X/Y while using wrenches on a spindle.
Moving to a certain ‘tool change’ position might be an option, especially if you plan to stop a program and continue a day or two later. This way you don’t need to remember exact position, although this can easily be read from the last line before M6 containing G00 or G01 gcode command. Just put your material in the same place on the machine bed, perform homing cycle and you are good to go.

@Colin_Kaminski thanks I have these on sooner of my dental bits, never knew what they were.

@jlauer I played with the Gcode widget a little more today and with a simple file and the machine home and the g53 home set to different places. I made a file:
g21
g0 X20 Y20 Z0
M6
G53 G0 X0 Y0 Z0

I expected the machine to move to the first position, execute the gcode inside the setup and pause. On resume it would execute the second set of gcode and move again. I got no motion whatsoever.

chillipeppr tablet and tinyg controller.

Here is a picture of the gcode widget setup box. missing/deleted image from Google+

what happens if you do it without the m6? g53 is machine coords. so what wcs are you in initially? g54? if so, what did you set g54 to? i’m just wondering if your wcs is not set, i.e. g54 = g53

Okay, I played with this for awhile today. I was using the G23 work space because of a Fusion reason but it is not needed. I had to look for sometime to sort out why I was even using it. I moved everything to G90/G91 commands and it did not solve the problem. I ended up changing M6 to M6 T1 and that fixed it. I guess without a tool it was not working correctly.

I just have on more problem and I don’t think I can fix it without a macro, in which case I will do it by hand. I would love to go into inches mode during tool change and return to the G20/G21 condition that existed before the tool change. I don’t think I can run a conditional command in Gcode? Is that correct? It would be easy in a macro but I am trying to save screen real estate.