Hello Guest it is December 09, 2024, 05:21:27 PM

Author Topic: Soft Start for Spindle Motor G Code Routine  (Read 47448 times)

0 Members and 1 Guest are viewing this topic.

Offline BR549

*
  •  6,965 6,965
Re: Soft Start for Spindle Motor G Code Routine
« Reply #10 on: February 04, 2015, 11:44:51 PM »
You really should try the code before you change anything.

Code"M3" does the same thing as dospinCW()

(;-) TP

Offline Vogavt

*
  •  260 260
(No subject)
« Reply #11 on: February 05, 2015, 10:29:04 AM »
Neither one works.

Offline BR549

*
  •  6,965 6,965
Re: Soft Start for Spindle Motor G Code Routine
« Reply #12 on: February 05, 2015, 11:04:24 AM »
Works Fine here (;-)

(;-) TP

Offline BR549

*
  •  6,965 6,965
Re: Soft Start for Spindle Motor G Code Routine
« Reply #13 on: February 05, 2015, 11:20:52 AM »
OK Lets try it and keep it all in the scripting language. It works fine here as well.

Message"Spindle Starting"
SpeedMax = GetDRO(17)
Speedstep = (Speedmax/3)
SetDro(17,SpeedStep)
DoSpinCW()
Message "Spindle at "&SpeedStep
Sleep(2000)
SetDro(17,(Speedstep *2))
Message "Spindle at "&(SpeedStep*2)
Sleep(2000)
SetDro(17,(SpeedStep *3))
Message "Spindle at "&(SpeedStep*3)
Sleep(2000)
Message"Spindle Up To Speed"

End               

Offline BR549

*
  •  6,965 6,965
Re: Soft Start for Spindle Motor G Code Routine
« Reply #14 on: February 05, 2015, 11:51:19 AM »
Just to make sure we understand how to use it. Open the M3 macro with the editor. Remove the DoSpinCW() code and  Place the NEW code inside of the M3 macro. Save the Macro.

Then from a Program OR the MDI call the standard M3 S3600 and the macro interacts as it should stepping up the spindle RPM until it reachs the call speed (3600).

M3 S3600

(;-) TP
Re: Soft Start for Spindle Motor G Code Routine
« Reply #15 on: February 05, 2015, 12:23:39 PM »
Fine job TP !
Then I put this  ....   Message ""  ....  in M5 to clear the status line.

Thanks,
Russ

Offline Vogavt

*
  •  260 260
Re: Soft Start for Spindle Motor G Code Routine
« Reply #16 on: February 05, 2015, 01:58:37 PM »
Did all that but still doesn't work for me. I've closed Mach and restarted too. It goes to 200 rpm and sits there but that's not enough to turn the spindle (mine is a minimum of 500 rpm to get it to turn). If I type say 1200 then it shows something like 600% spindle over. I press reset and it drops back to 200. If I get it to run at all it slams on at top speed. No ramping.

Offline Vogavt

*
  •  260 260
(No subject)
« Reply #17 on: February 05, 2015, 04:15:24 PM »
Got it! I completely overlooked post #14.  Dang Smartphone's fault and Tapatalk!
All's well with Lazarus again!

Offline Vogavt

*
  •  260 260
(No subject)
« Reply #18 on: February 05, 2015, 04:39:47 PM »
Well sorta... it only works from the MDI and only if I explicitly state "M3 S???" or just MP3.  If I input say S3700 afterwards (while the spindle is already turning it of course goes quickly up to the requested RPM.  I think I can live with this as it's far better than it has ever been! Thanks guys!

Offline Vogavt

*
  •  260 260
Re: Soft Start for Spindle Motor G Code Routine
« Reply #19 on: February 05, 2015, 06:16:03 PM »
MP3! <rollseyes>  See I told you it was that blasted SmartPhone! Auto-corrected to something meaningless in this case.