Hello Guest it is April 19, 2024, 08:23:18 PM

Author Topic: M3 M4 M5  (Read 4824 times)

0 Members and 1 Guest are viewing this topic.

Offline Kato

*
  •  11 11
    • View Profile
M3 M4 M5
« 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

Online Graham Waterworth

*
  • *
  •  2,672 2,672
  • Yorkshire Dales, England
    • View Profile
Re: M3 M4 M5
« Reply #1 on: May 27, 2006, 07:59:37 PM »
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.
« Last Edit: May 27, 2006, 08:03:59 PM by Graham Waterworth »
Without engineers the world stops
Re: M3 M4 M5
« Reply #2 on: May 28, 2006, 07:06:18 AM »
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.

Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com