Ok, I am a newbe and this is my first posting but, I don't know why this is happening. I am familiar with programming and learning G code and Mach3. I have only had the CNC machine (Shark Pro) for about six months. I have upgrade my controller to a CNC4pc - C11 V9.3
I am using XP, 3gig CPU with 4gig Ram. Using Mach3 Ver. R3.042.040.
This is the problem; I am programming one of my buttons for Auto Centering and Zeroing.
The program is working properly with all the G4 codes in it. Now at the beginning I am writing a continuity test section and any G4, M30 or M1 (M1 button is optioned on) they are ignored, yet they work inside the program. I have loaded it with different screens, both 1024.set and others and it makes no difference. Beat me with a rock, but I just don’t see why they are ignored.
Here is a part of the program; the new section makes you test for continuity before centering, it ignores the G4 & M commands. This section is above the dashed lines. When running the program all I will see is the " ** NO Continuity **" in the Status Bar, a slight pause of about 1.5 sec then it runs the below program. The computer runs to fast for the " **** TEST CONTINUITY ****" to be seen in the Status Bar with out a pause. The new section is being saved, when I re-open the "edit button script" is does show it saved.
Rem Test To make sure spindle is grounded And continuity exist
Code "( **** TEST CONTINUITY ****)" 'print in Status Bar
Code "G4 P1.5" 'Pause to read Status Bar
If GetOemLed (825) <> 0 Then 'check for continuity test
Code "( CONTACT TESTED OK)" 'print in Status Bar
Code "G4 P1.5" 'pause to read Status Bar
Code "( Place CENTER TOOL then RESTART)" 'print in Status Bar
Code "M1" 'stop program until RESTART is Pressed
Else 'if no continuity then
Code "( ** NO Continuity **)" 'print in Status Bar
Code "M30" 'stop program and rewind from start
End If 'End If statement
Code "M1" 'Wait to align the ring then restart
-------------------------------------------------------------------------------------------------------------------------------
(This section works OK and sees the G4 code)
Rem Centering Spindle In center of tube
If GetOemLed (825) <> 0 Then 'Check to see if the probe is already grounded or faulty
Code "(Probe plate is grounded, check connection and try again)"
Else
FeedCurrent = GetOemDRO(818) 'Get the current Feed Rate settings to reset later
XCurrent = GetDro(0)
YCurrent = GetDro(1)
Rem Move Z down into ring 'move probe into ring
Code "F8" 'change feed rate to moderate speed 8 IPM
ZNew = ZCurrent - .75 'set Z distance for down .75 inch
Code "G31 Z" &ZNew 'move Z down .5 inch
While IsMoving() 'wait for probe to finish moving
Wend 'end wait command
Rem If Probe touches Ring On the way down Then go back up
If GetOemLed (825) <> 0 Then 'if probe touches Auto Zero ring then
ZNew = GetDro(2) + .25 'probe move to current Z + .25 inches if touches plate on the way down
Code "G0 Z" &ZNew 'move Z down at 2 IPM
While IsMoving() 'wait for probe to finish moving
Wend 'end wait command
Code "G4 P5.0" 'Pause for 5 seconds to re-align ring before it tries again (this Works OK)
Code "F8" 'change feed rate to moderate speed 8 IPM
ZNew = GetDro(2) - .5 'probe move to current Z - .5 inches
Code "G31 Z" &ZNew 'move Z down .5 inch
While IsMoving() 'wait for probe to finish moving
Wend 'end wait command
End If 'end if statement
Any Ideas or am I just blind and missing something stupid...
Lyle