Machsupport Forum
Mach Discussion => VB and the development of wizards => Topic started by: Tarak on September 16, 2007, 08:40:51 PM
-
All I'm trying to do is ensure that when RESET is pressed the spindles and coolant all turn off.
I have 4 spindle relays and 1 coolant relay.
It's really strange how this code works in the script editor but not when run from Mach, it presses the RESET button once and then I cannot re-enable the system???
Here's the code I have for the RESET button (M22)
'TURN OFF SPINDLE & COOLANT RELAYS THEN ESTOP THE SYSTEM
CODE "M16" 'Turn off all Spindle Relays
CODE "M19" 'Turn OFF Coolant
DoOEMButton(1021)'Press RESET
-
why do it the hard way, just use one of the Enable lines and "AND" the line into the power of the relays, so when you reset the enable goes off.........
-
Hi Scott, you were right I just used the relay enable on the CNC TekniX controller card, so when RESET is pressed it automatically takes out all the outputs.
The only problem I have is, when I ready the system again the screen says the spindle and coolant is still on (LED's), even though they are not.
How do I make it reset the led's on the screen, when RESET is pressed?
-
here is a brain that should do it, but, when I reset on mine, it turns off the spindle led, and coolent led.
scott
-
Thanks Scott, that did the trick nicely.
-
I tried this brain on my normal computer, it works great, but when I copy it to the machine computer (all have the same files & v2.48).
It won't operate the brain correctly, it's got me knackered.
-
you need to update mach, that brian was for 2.49+
-
Thanks Scott
-
k,
BTW: When you gonna put out some more screens?
Scott
-
Yeah, I've been lazy, too many things on the go, I should probably finish them.