Hello Guest it is March 28, 2024, 06:25:31 AM

Author Topic: separate spindle start and stop outputs?  (Read 3150 times)

0 Members and 1 Guest are viewing this topic.

separate spindle start and stop outputs?
« on: June 05, 2008, 01:21:41 AM »
As a temporary measure I want to connect relays across the spindle start and stop buttons of a Sieg super X3 mill (which I just put a cncfusion ballscrew kit on). There are other options for controlling the SX3 spindle but none as simple as patching 4 wires onto the front keypad which will get me up and running immediately.

This means a momentary output to start and a different momentary output to stop. Is there a simple way I can trigger a 0.2 second output on an M3 and a different 0.2 second output on M5?


 

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: separate spindle start and stop outputs?
« Reply #1 on: June 05, 2008, 02:49:34 AM »
Yes, just need to put some VB in the M3, M4 and M5 buttons.
If you use Output 1, 2 and 3 respectively  then all yuou would do is set up which pin you are using for each in Ports and Pins, Inputs.
In the M3 Macro you would put

ActivateSignal(OutPut1)
Code "G4P0.2"
While Ismoving
Wend
DeActivateSignal(OutPut1)

The M4 would be the same except for it would be (OutPut2)  and similar for M5 but using (OutPut3)

If you have the box checked in the General Config page for G4 in milli seconds then you would need "G4P200"


Hood
Re: separate spindle start and stop outputs?
« Reply #2 on: June 05, 2008, 04:44:54 AM »
awesome - thanks!

I put the extra VB script into m3.m1s and m5.m1s which seems to do the trick when running g-code.  Don't think I'll mess with M4 just yet. Is there's a way to hook into the on-screen spindle toggle button as well?

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: separate spindle start and stop outputs?
« Reply #3 on: June 05, 2008, 06:37:24 AM »
You can set up the spindle options to use the pins that you have set for the relays, problem is they will stay on and not be momentary. You could howqever use Screen4 and make up a custom screen by opening the standard 1024.set and altering the spindle button to be a VB button. Save the screenset as a different name and then open Mach and under the view menu choose your screenset you just saved. When its open go to operator menu and choose edit VB Buttons, the one you have just put on the screen should be flashing, just clcik on it and put the code in it that you have in the macro or you could just call the M3 from it by putting

code "M3"

Hood