Machsupport Forum

G-Code, CAD, and CAM => G-Code, CAD, and CAM discussions => Topic started by: Sensongroup on June 20, 2012, 03:24:58 AM

Title: Writing a Gcode
Post by: Sensongroup on June 20, 2012, 03:24:58 AM
I am trying to write a gcode/mcode sequence to do the following:

1. Run a motor on X axis until it hits a limit switch and stops (I'm using a limit switch input on a breakout board to operate an optical sensor).
2. Then dwell for 2 seconds and then activate a relay on Y output for 2 - 3 milliseconds then dwell for 2 seconds.
3. Then activate a relay on Z output for 2 - 3 milliseconds then dwell for 2 seconds and then repeat the procedure again.

Can anyone help as I'm new to the whole Mach3 scene and would appreciate any help.
Title: Re: Writing a Gcode
Post by: BR549 on June 20, 2012, 11:22:12 AM
You are going to find out that MACH3 does NOT have precise time delay control on inputs or outputs.

(;-) TP
Title: Re: Writing a Gcode
Post by: Welshman on June 23, 2012, 10:09:00 PM
 BR549
He may be able to use a macro where a pause command is timed in msecs.
Just a thought,
Title: Re: Writing a Gcode
Post by: BR549 on June 24, 2012, 12:10:56 PM
Mach3 does not always abide by the input Msec loop values (;-) .

Been there done that , (;-) TP