Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: Kato on May 27, 2006, 11:44:32 AM
-
Hi,
I´m in the middle of converting my lathe (ORAC) to Mach3. And now i´m wondering onething about my vfd. It work like this:
0-14v to set the speed.
Spindle on and off, is connected via a relay.
M3/m4 is also chosen via another relay.
Now the problem, is it possible to set Mach3 that Mach3 cant do a M4 when the M3 is activated? (Must be an M5 before) Because if the lathe is up in 2000rpm M3 I know its not so good if it chose to switch its direction.
Regards Jim
-
You should be able to do it with some VB and a user dro, if you add a few lines to the M3, M4 & M5 macros.
In the M5 macro add something like this
Call SetUserDRO(Number, 0)
DoSpinStop()
In M3 put something like
dir=GetUserDRO(Number)
if dir = 0 then
DoSpinCW()
Call SetUserDRO(Number, 3)
else
generate an error message and stop the machine
endif
In M4 put something like this
dir=GetUserDRO(Number)
if dir = 0 then
DoSpinCCW()
Call SetUserDRO(Number, 4)
else
generate an error message and stop the machine
endif
Not sure it will work, as I have not tried it, maybe Brian will correct my errors.
Graham.
-
I would look at the state of the LED's
'M3 Macro
If (GetOEMLED(116)) Then
MsgBox("Error Spindle is on CCW"
DoSpinstop()
else
DospinCW()
end if
'M4 Macro
If (GetOEMLED(11)) Then
MsgBox("Error Spindle is on CW"
DoSpinstop()
else
DospinCCW()
end if
That should do it :)
And thank you Graham for the post! Love to see how other people get things to work.