Hello Guest it is April 18, 2024, 10:07:54 PM

Author Topic: non co-ordinated move  (Read 2899 times)

0 Members and 1 Guest are viewing this topic.

non co-ordinated move
« on: November 20, 2011, 02:21:44 PM »
I use mach3 to run a rubber belt grinding machine and use the "A" axis to move the belt forward while a grinding head grinds the belt as it moves. Right now I have it set up to move the grinding head to the surface of the belt, then click a button to start moving the belt (Axis) then turn on the motor to the grinding head. I want to click 1 button to start moving the belt, slight delay, then drop the head. All the GCodes I have tried move Z and A in a coordinated move, meaning the head does not reach the belt until it is at the end of the run. When I click the button DoOemButton (313) I cannot drop the the head while the belt is moving. Is there a GCode to move A 10000 and Z-1 independently (non coordinated move)?



Re: non co-ordinated move
« Reply #1 on: November 20, 2011, 02:50:20 PM »
G1 A100 Z-1 F...
A9800 F...
A10000 Z0 F...
 ::)
Re: non co-ordinated move
« Reply #2 on: November 20, 2011, 04:08:19 PM »
Thank you, that works great, now while A is in motion I need the code to make a button to raise Z up 1 inch, and then stop the belt(A)

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: non co-ordinated move
« Reply #3 on: November 20, 2011, 04:08:58 PM »
SImply call each move you need as a seperate line. Mach will do the moves on each line then go to the next line. As the moves are stacked into the que so they should run as one continous move like you want.

SIMPLE example

G0 X0Y0 Z0  A0  (set the axis's to their origin)

M3    (Start spindle)

G0 Z-1                (move the z just over the top of the belt)

G1 Z-1.1 A10  F10     (blend the Z move into the starting move of the belt to prevent gouging the belt)

G1 A360 F10             (grind the belt for 1 complete revolution)

G1 A370 Z-1 F10       ( pull the grinder out of contact with the belt as a blended move)

G0 Z0 A0                  ( retract Z and return to belt origin)



Hope that helps, (;-) TP


Re: non co-ordinated move
« Reply #4 on: November 20, 2011, 09:12:37 PM »
Code "G1 A3 Z-1 F300"
Code "A9800 F300"
Code "A10000 Z0 F300"

^This works great when i have A set to zero to start the belt and lower the grinder
I have the A10000 set because i grind different lenghts of belt so i want A to move until I click a button to stop it without gouging the belt
The problem i'm having is that A wants to go back to 0 when i click the button with GCode I set
I still need code for a button that will keep the belt moving, bring the head up(Z) and then stop the belt(A)
BTW......I have a manual button to the side of the machine to start/stop the grinding head rotation
« Last Edit: November 20, 2011, 09:14:18 PM by dreck »
Re: non co-ordinated move
« Reply #5 on: November 21, 2011, 01:24:46 PM »
Dreck:

You can have separate programs for the various belt lengths, as BR549 wrote a program to grind a belt for a 360 degree rotation of "A". Just run the program with a larger "A" value, and note the degrees to complete a given belt length. Then edit the program, and give it a name that identifies the specific belt, such as: 28 inch Belt, 44 inch Belt, etc.

Also, if you use the spindle CW code, M3, you can turn on a relay for the grinder. A program end code, M30, will turn off everything at the end of the program, without manually turning off the grinding head.

Mach drives multiple axis', i.e., X,Y,Z,A in a vector format if they are on the same line. For instance, if you have the following program;

G0 X0 Y0 M3
G1 X20 Y1 F100
M30

The X and Y axis will start and stop at the same time. However, X will move 20 times faster than Y, but they will move in a coordinated vector.

Conversly, if the G1 line were broken;

G1 X20 F100
Y1
M30

The X axis will move for 20 units first, and after X reaches 20 units, the Y axis will move 1 unit. Then the program will stop, and reset to the beginning. If the grinding head is started and stopped with the M code, it will turn off at the end.

Also, the feedrate code, F, is modal. This means that it only need to be programmed once, for a given series of feed moves, or it will remain in effect until changed by another F value.

My first example had a F... on each line, as often when combining the X or Y axis with A, the resultant feed can be very different when X or Y combined with the A axis moves. Since "A" is not a linear function, the surface speed becomes a function of the "A" radius, when combined with an X or Y axis movement. This is something that only you can determine given your machine configuration. There is a General config section for the rotary axis radius.

You can play around with different feed rates, and A values, as well as moving the Z axis in smaller movements to engage or disengage from the belt surface, as the A axis keeps moving. For instance you could have the Z axis move in increasing depth increments as the belt rotated, making a finish pass in a smaller value.

It seems to me, ::) the only button necessary to run the grinding process is the "Cycle Start", as Mach can operate relays under program control. As  BR549 pointed out, the entire list of codes is in a "Que", and Mach is not designed to break into the program midway, and branch off into another axis function. You can do a "Feed Hold", but that will just pause the axis motion, not the M3 (spindle relay on), or a "Stop" which you do not want to do either, unless absolutely necessary as they will definitely gouge the belt somewhat.


 ;)