Hello Guest it is March 29, 2024, 10:58:24 AM

Author Topic: Question around operation and parameters  (Read 6431 times)

0 Members and 1 Guest are viewing this topic.

Question around operation and parameters
« on: August 05, 2007, 03:24:15 PM »
The more time I spend with my machine and with this program the more things I want to tinker with, problem is that I've been busy making parts so I don't have much time to just tinker with things. I've run into a couple of situations that I need some expertise on, I have a little downtime with the machine so this is the perfect time to play.

1. I know Brian had posted some stuff about the T3 command and I see the parameters in the Settings window, what I would like to do move the gantry to absolute X +2, Y0, Z0. That would make changing tools much easier when working with the machine, today I do a reference all and then change the tool.

2. Without using the tool tables, is there an easy way to change the offset when changing tools, what I do today is this (this is all within the same program):

a. When the machine hits a T3 and stops I hit the reference home to zero out the Z axis and set it to a known position.

b. I change out to my smaller tool and reset the Z axis to reflect the new tool height.

c. I let the program continue (hit run).

I know there's a better way and I should probably be putting these into the tool table (which is on my list of things to do). I know the exact height of the tools because I coller them so they drop in the same each time.

3. Is there a way to automatically stop the machine so I can do things like flip a piece? Today I break my runs into seperate programs and when one finishes, I flip the piece and run the second. I would love instead to have it all run from one. I could use a T3 I suppose and tell it to change the same bit, I'm assuming it will stop and wait for my input.

4. An odd question I ran into was that one of the home switches on my machine must be dirty or something, I've had to increase the debounce to 5000 just to get the X to reference home correctly. Does this setting effect the actual position when referencing home? or does the program apply the same amount of return cycles each time? So for instance if I fix the switch and reset debounce to say 1500 will my gantry position actually shift when I reference home?

Thanks...

-Paul-
-Paul-

Paul Davis
Luthier
Patriot Guitars

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Question around operation and parameters
« Reply #1 on: August 05, 2007, 09:26:46 PM »
Hey Paul,
   Check out this thread.
http://www.artsoftcontrols.com/forum/index.php?topic=3849.0

There are lots of ways to do the tool change. Like you, I have not had much time to mess with this until recent. I have been learning a lot. You have 3 options for tool change in general config. Ignor, does as it implies, it ignores the M6 command in your g-code (that sholud be placed on the same line as your tool number. Ex. T3 M6). Then you have stop spindle. This will use both the m6 start and m6 end macros. Then there is auto, which only uses the M6 start macro. You can place code in the macros to do allmost anything you can think of. The one in the link sends the tool to toolcahnge position, 3 dros on your settings page, mid to lower far right. Ask if you want to do an auto tool zero and goes back to running your code.

I hope this helps,
Brett
   
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!
Re: Question around operation and parameters
« Reply #2 on: August 05, 2007, 11:22:32 PM »
Thanks Brett...

I don't have a spindle as of yet (it's on my wishlist), so let me make sure I understand this correctly:

I issue a T2 M6 or a T3 M6 in my gcode, this tell Mach that I want to change to tool 2 or 3 and the M6 tells it to perform the tool change based on the settings on the Settings page, on that page there are two areas of concern...

1. There is a text area that states: 'Do not run Tool Change Macro' and a button that states Ignore Tool Change, on my screen this option is disabled (hence I do tool changes)

2. There is a Tool Change Location on the other side of the screen, today it reads:

X  -1.0000
Y +0.0000
Z +3.0000

So here is my question.... Is the Z an absolute? will it ignore my offsets and actually go to the zero position if I need it to or will it go to the offset 0??

If it's absolute then I should be able to do this:

X +2.0000
Y +0.0000
Z +0.0000

And the gantry would locate in just about the right spot for me, I could change the tool, change the Z offset for the new tool and start back up without ever having to reference home the machine.

I need to do some homework on the tool offsets and tables, my main question is this (I'll see if I can explain it correctly...)

Let's say tool 1 has a length of 2" beyond my router and I zero out Z by doing a reference home, how do I figure out the actual control point or the offset to add for the tool? do I put in the Z reading once I locate the tool height on my fixture?, this is the area that I've just not worked out in my mind. I see the fixture table, I guess it's time to do some reading and see if I can wrap my brain around it....

Thanks

-Paul-
-Paul-

Paul Davis
Luthier
Patriot Guitars

Offline jimpinder

*
  •  1,232 1,232
  • Wakefield, West Yorks, UK
    • View Profile
Re: Question around operation and parameters
« Reply #3 on: August 06, 2007, 06:42:07 AM »
During your downtime, have a look at the instructional videos. One includes a complete piece on changing the M6 macro to suit individual requirements. I have done this myself, and now when I include an M6 instruction the lathe moves to a convenient position for me to change the tool.
I can change the tool, and if I include the T(?) instruction just after the M6, in puts up the number of the tool on the screen to remind me, and no doubt I can include the new tool offsets there.
I hit the resume button and off I go again.

Jim
Not me driving the engine - I'm better looking.
Re: Question around operation and parameters
« Reply #4 on: August 06, 2007, 09:40:11 AM »
That's a great idea Jim, I'll get those today and start digging through them. Sounds like your doing exactly what I want to do :)]

Thanks

-Paul-
-Paul-

Paul Davis
Luthier
Patriot Guitars
Re: Question around operation and parameters
« Reply #5 on: August 08, 2007, 09:36:35 PM »
Jim...

That was the best advice I've had in a long time, I watched them all and now have the tool change working exactly like I want.

I saw the video on tool changing and it really didn't do what I wanted, but the scripting one did and I used that to get started.

I also saw a message from Graham Waterworth about using tool offsets and everything clicked into place mentally, I'm probably going to look into adding a second serial port and a touch probe so I can set the T1 position and just use offsets from there on out (thanks Graham!!!)...

The only real question I have left is if I can add my own MXX command, I would like one to move the gantry out of the way, put up a dialog and when it's cleared continue. I can write the code for that no problem, but I need to dig deeper into scripting to see if I can make my own commands (I know I could do a button but I want it automated)...

Cheers

-Paul-
-Paul-

Paul Davis
Luthier
Patriot Guitars
Re: Question around operation and parameters
« Reply #6 on: February 29, 2008, 12:56:16 PM »
I'm trying to do a script for a simple tool changer and running into the problem of finding the current and new tool DRO.
I'm using the code:
    current_tool = GetOEMDRO(824)
    next_tool = GetSelectedTool()
      ...

and when I step through it they don't seem to load the tool info.  I've tried several options for the current_tool.

On the 1024.lset screen when I use the  screen designer to look at the current tool DRO it dosen't have any information on what the DRO number is.  I'm a bit confused on what is a system, user or OEM DRO.  I've looked at the videos and they are very helpful but dosen't seem to work the same when I try it.
 Thanks...

Offline jimpinder

*
  •  1,232 1,232
  • Wakefield, West Yorks, UK
    • View Profile
Re: Question around operation and parameters
« Reply #7 on: February 29, 2008, 02:20:23 PM »
As far as I understand it, reading the Mach specific functions and things in Vis Basic the tool numbers are obtained by functions.

Function GetCurrentTool() as Integer
Function GetSelectedTool() as Byte

The first function returns the currentl tool, the other returns the number of a selected tool (but not yet implemented)

My problem is I am now screwing round in my mind to remember how to use functions in basic !!!
Not me driving the engine - I'm better looking.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Question around operation and parameters
« Reply #8 on: February 29, 2008, 03:26:07 PM »
Try

current_tool = GetCurrentTool()
next_tool = GetSelectedTool()
Re: Question around operation and parameters
« Reply #9 on: March 04, 2008, 01:06:52 PM »
Thanks, that works great.  Now that I got that going I find that I can't seem to update the current tool number.
 probably wrong format for the command.

Other then that it works fine...

This is on a little EMCO TurnPC lathe with a 6 position tool changer that returns an index and a pulse per tool with
 a single drive signal that causes forward rotation and when dropped reverses rotation to index the tool.

My M6 program is:
---------------------------------------------------------------------------------------------------------------
current = GetCurrentTool()
newtool = GetSelectedTool()

If current=0 Then      'syncs tool turret
  ActivateSignal(OUTPUT4)      'start turret moving
   While IsActive(INPUT2)=false   'wait for tool index
   Wend
  DeactivateSignal(OUTPUT4)   'reverse tool turret to index
  SetCurrentTool(1)   '<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< is SetCurrentTool(x) the correct format?
  current=1         'this initiallizes the tool changer on startup
End If


If current = newtool Then
   Exit Sub
End If

If newtool>6 Or newtool<1 Then
Message("Next Tool out of range")
    Code "M30"
    End
End If

Code "G53 X-.1"           'position X to safe area
While IsMoving ()
Wend
            '6 position turret - calc next tool count
movedist = (newtool - current) + 1
If movedist <1 Then movedist = movedist + 6
ActivateSignal(OUTPUT4)      'start turret moving

For I=1 To movedist
  While IsActive(INPUT1)=false
  Wend
 
  While IsActive(INPUT1)=true
  Wend
Next I
DeactivateSignal( OUTPUT4 )   'stop and index turret
'  While IsActive(INPUT1) = true
'  Wend
SetCurrentTool(newtool)         '<<<<<<<<<<<<<<<<< is SetCurrentTool(x) the correct format?

---------------------------------------------------------------------------------------------------------------