Hello Guest it is October 16, 2019, 07:07:13 AM

Author Topic: AUTOSTART & AUTOREWIND BUTTON  (Read 11346 times)

0 Members and 1 Guest are viewing this topic.

AUTOSTART & AUTOREWIND BUTTON
« on: October 28, 2012, 06:31:47 AM »
Hi to all. This is my first post & the question is how to make a button when i click it to start cycle,when the gcode end autorewind wait for 5 seconds & then start cycle again.

I have a cnc and many different pieces. The gcode produced from Gcad. The point is that sometimes i have 10 same pieces and i would like the mach 3 to make my life easier. (till now i click on start when the program end (gcode ends) i click on rewind & after i click again start.

My english isn't so good but i hope to undrestand what i want.

i try with script but i ve errors i m not so familiar with scripts.

Thanks in advance.
Re: AUTOSTART & AUTOREWIND BUTTON
« Reply #1 on: October 28, 2012, 10:30:06 AM »
using a m30 the program should rewind
starting again in auto is really not safe, you need to make sure the area is clear and a new part is clamped properly
you are better off using a macro loop and call up the number of times you want it to cycle in the safe working environment.
There you can place a g4 pause time before it starts again.
Re: AUTOSTART & AUTOREWIND BUTTON
« Reply #2 on: October 29, 2012, 01:45:32 PM »
The problem is that i can't edit the code everytime that Gcad program produce it.

As example i give you the following to understand what i want the button do:

Line 1 : DoOEMButton (1000)   {START CYCLE}
Line 2 : ???????                       WAIT TILL PROGRAM END i want a command to wait the program end (Gcode end).
Line 3 : DoOEMButton (1002)   THIS IS THE REWIND BUTTON
Line 4 : ???????                       WAIT FOR X SECONDS   i want a command to wait for X seconds.
Line 5 : ???????                       GOTO DoOEMButton (1000)   i want a command to go to the first line (line1) of the script.


Alternative i have a thought about a button to only enable or disable the all process. One button START & one button ENABLE REPEAT. When the ENABLE REPEAT button is off the button START make a single START CYCLE & when the ENABLE REPEAT button is on the button START make repeated START CYCLE.

I say again that i'm not familiar with scripts but i hope to help me.
Re: AUTOSTART & AUTOREWIND BUTTON
« Reply #3 on: October 29, 2012, 04:47:14 PM »
You might look at a project BR549 Terry/Sherry(  ;D )  and I worked on quite awhile ago and see if it can be adapted to your needs

http://www.machsupport.com/forum/index.php/topic,15401.msg103250.html#msg103250

Offline Graham Waterworth

*
  • *
  •  1,888 1,888
  • Yorkshire Dales, England
    • View Profile
Re: AUTOSTART & AUTOREWIND BUTTON
« Reply #4 on: October 30, 2012, 05:15:31 AM »
why not just loop the g-code put something like this :-

G00 X0 Y0 Z25.
G01 X.....
...
(BODY OF CODE)
...
M0 (WAIT FOR CYCLE START)
M47( LOOP)

Or you could use the dangerous method, NOT RECOMMENDED!

G00 X0 Y0 Z25.
G01 X.....
...
(BODY OF CODE)
...
G4 P5000 (WAIT FOR 5 SECONDS)
M47( LOOP)

Without engineers the world stops
Re: AUTOSTART & AUTOREWIND BUTTON
« Reply #5 on: October 30, 2012, 12:55:05 PM »
Graham as i said i can't everytime that gcad produce a gcode program edit and add commands to gcode. I want all to became with a button if possible. I hope to find the time the weekend to give some tries with the button constration.

But till weekend i want some ideas to make the things easier.  The solution to add M0 (WAIT FOR CYCLE START) & M47( LOOP) commands on gcode is good but i don;t want to edit the gcode program everytime.

Offline BR549

*
  •  6,902 6,902
    • View Profile
Re: AUTOSTART & AUTOREWIND BUTTON
« Reply #6 on: November 07, 2012, 12:14:03 PM »
I SAW THAT,

(;-)TP

Offline Graham Waterworth

*
  • *
  •  1,888 1,888
  • Yorkshire Dales, England
    • View Profile
Re: AUTOSTART & AUTOREWIND BUTTON
« Reply #7 on: November 10, 2012, 04:28:10 AM »
I find it strange that a CAM program can not substitute M30 with an M0 and a M47 or add them on the lines before the M30, it sounds as if you need a new CAM system to me.

Graham
Without engineers the world stops