Hello Guest it is November 13, 2019, 10:28:56 AM

Author Topic: how to go to z without traveling dagonally  (Read 11917 times)

0 Members and 1 Guest are viewing this topic.

how to go to z without traveling dagonally
« on: April 25, 2009, 01:47:54 PM »
At times , the tool will hit the fixtures unless the tool travels first to the y coordinate and then to the x coordinate on its way to a fixture. Is there a way to make this happen? Currently, the tool wants to always go the shortest distance, which is diagonally.  I don't have much Z travel on my CNC machine, thus the need to have this option, especially when I have two tools of very dissimilar lengths.
thanks in advance.
tc

Offline Hood

*
  •  25,856 25,856
  • Carnoustie, Scotland
    • View Profile
Re: how to go to z without traveling dagonally
« Reply #1 on: April 25, 2009, 02:55:30 PM »
If going up to safe Z first then to X and Y together is no use for your setup then you could write either a short macro or have the VB in a button similar to the Go To Z button.
 You would need something like this in either the button or the macro

code("G0")
Code("G53Z0")
While IsMoving()
Sleep(10)
Wend
Code("G0Y0")
While IsMoving()
Sleep(10)
Wend
Code("G0X0")
While IsMoving()
Sleep(10)
Wend
Code("G0Z0")
While IsMoving
Sleep(10)
Wend


Hood

Re: how to go to z without traveling dagonally
« Reply #2 on: April 25, 2009, 03:12:20 PM »
Another way would be to just program the moves you want in your G code file.

Offline simpson36

*
  •  1,374 1,374
    • View Profile
Re: how to go to z without traveling dagonally
« Reply #3 on: April 26, 2009, 03:19:22 AM »
Thats what I was thinking, too.

G1 X10 Y5     moves diagonally

G1 X10
     Y5           moves first in the X and then in the Y


Offline Hood

*
  •  25,856 25,856
  • Carnoustie, Scotland
    • View Profile
Re: how to go to z without traveling dagonally
« Reply #4 on: April 26, 2009, 03:34:33 AM »
Often it is handy to have a button as a lot of the time you may have halted your code and want to go back to zero, you may have just homed and want to quickly go to zero etc etc.
Hood

Offline simpson36

*
  •  1,374 1,374
    • View Profile
Re: how to go to z without traveling dagonally
« Reply #5 on: April 26, 2009, 04:01:29 AM »
Good point, Hood!


How difficult would it be to make a button (or command useable in a program) that would cause the A axis to run continuously?

Offline Hood

*
  •  25,856 25,856
  • Carnoustie, Scotland
    • View Profile
Re: how to go to z without traveling dagonally
« Reply #6 on: April 26, 2009, 04:06:28 AM »
As far as I know you cant make the A run continuously unless you dont want to have any other axis move.
 You can use Swap Axis and have the spinlde and A swap and thus any S commands would go out to theĀ  A Axis pins, you could then have a VB button that does theĀ  swap axis, or of course a macro called from code to do the same.
Hood
« Last Edit: April 26, 2009, 04:10:50 AM by Hood »

Offline simpson36

*
  •  1,374 1,374
    • View Profile
Re: how to go to z without traveling dagonally
« Reply #7 on: April 26, 2009, 08:43:08 AM »
I don't know where this iidea comes from that no other axis can  move while A moves.

G1 X1 A3600 cuts dandy 10tpi threads

G1 X1 X72000 turns at .005 feed

I run the A 'continuously' now by calcing the number of turns I want, feeding that in with a G command and then clearing the A.

Unfortunately, my little power supply kicked the bucket before I could get video on the nifty face off and then thread program I had working.

This already works fine, I'm just looking for a better way. Swapping axis won't work for me becuase I still need the X,Y, and Z active.

The grand scheme here is to make a mini-machining  center . . of sorts. I have it working, it's just down to refinement.

What I would like is

1) simply a way to reset A to machine 0 rather than just work offset 0. SO far this has not been a practical limitation for what I am doing becuse I've gotten machine A into the 10s of millions, so there is enouh headroom for my simply programs.

2) a simple script or brain that would use the stored feedrate variable and use it to convert the A travel to whatever number of degrees reqwuired for rotations to accomplish the feed for the distance commanded and pass that to the G command as an A number.

Example: Mach has stored somewhere the feed per rev of say .004. I want to turn .020 off a workpiece for a distance of .6 inches. All of the data is availble for Mach to calculate the number of turns (in degrees) the A axis needs to move accomplish the cut. It is just going to have to wait until I have time to dig into the scripting and/or brains of Mach unless I can find a willing guru in the mean time to help out. 
« Last Edit: April 26, 2009, 09:08:31 AM by simpson36 »

Offline Hood

*
  •  25,856 25,856
  • Carnoustie, Scotland
    • View Profile
Re: how to go to z without traveling dagonally
« Reply #8 on: April 26, 2009, 09:05:52 AM »
I dont have time to reply at the moment other than to say why would swap axis affect X Y or Z as you would be swapping the spindle for the A, nothing whatsoever to do with X Y and Z, they would still be X Y and Z.

Will reply further later.
Hood

Offline simpson36

*
  •  1,374 1,374
    • View Profile
Re: how to go to z without traveling dagonally
« Reply #9 on: April 26, 2009, 09:19:01 AM »
1) Suppose I wanted to have the X and Y moving and the mill spindle spinning an endmill cutting a workpiece held and slowly rotated by the A axis?


2) the A axis is driven by a servo motor. How is that going to resond to being treated as a spindle by mach? That is sot of the whole problem to start with: Mach inability to spin a servo continuously via a single command.


3) The question was how to do what I want to do,  not if I  should want to do it in the first place.  ;)