Hello Guest it is October 22, 2019, 05:43:51 AM

Author Topic: Spindle Start Macros  (Read 4947 times)

0 Members and 1 Guest are viewing this topic.

Spindle Start Macros
« on: September 25, 2006, 03:56:09 PM »
Hi

I've got a Brigdeport Boss 6 that I'm running off Mach 3, the spindle start relay isn't wired into Mach 3 but to a separate switch as it was originally, I use special macros in Mach3 for M3, M4, M5 and Marcopump that basically ask for a spindle start and Mach waits till I start the spindle before continuing, M5 just stops the spindle and the macropump stops the machine if the spindle stop's.

The problem I'm having is if I run a taping cycle, it asks for a spindle start I start the spindle and off it goes, the tap get to the bottom of the hole the spindle stops and Mach caries on going feeding the tap out of the hole without the spindle running.

Is there something I'm doing wrong or anyway of stopping this happening?

I could rewrite all my program with taping cycles in them to something like this

G0 X0 Y0 T26 M6
G43 H26 Z20.0 S100 M3
Z5
G01 Z-10.0 F100
M5
M4
G01 Z5
M5
M3

But I'd prefer to change something to get it working properly.

Cheers

Chris
Re: Spindle Start Macros
« Reply #1 on: September 25, 2006, 03:59:48 PM »
Oh nearly forgot these are the macros I'm running

M3

DoSpinCW()
Message "Spindle Start Requested"      
SystemWaitFor(Input2)            
While IsMoving ()               
Wend                     
Message "Spindle Start Delay"         
Code "G4 P2"                  
While IsMoving                  
Wend                     
Message ""                  
Call SetUserLED(1010,1)


M4

DoSpinCCW()
Message "Spindle Start Requested"      
SystemWaitFor(Input2)            
While IsMoving ()               
Wend                     
Message "Spindle Start Delay"         
Code "G4 P2"                  
While IsMoving                  
Wend                     
Message ""                  
Call SetUserLED(1010,1)


M5

DoSpinStop()
Call SetUserLED(1010,0)


Marcopump

If GetUserLED (1010) Then         
  If Not IsActive (Input2) Then         
    DoOEMButton (1003)            
    Message "Program Stopped Spindle Fault"
  End If
End If
Re: Spindle Start Macros
« Reply #2 on: September 25, 2006, 05:25:53 PM »
Are you using G84?

Darek
Re: Spindle Start Macros
« Reply #3 on: September 25, 2006, 07:06:23 PM »
Hi Darek

Yes I'm using G84, here's an example of my G Code

M00
(M6 TAP|TOOL - 26|DIA. OFF. - 26|LEN. - 26|TOOL DIA. - 6.)
T26M6
G0G90X-11.Y-39.084S100M3
G43H26Z40.
G99G84X-11.Y-39.084Z19.113R40.F100.
G0G80
M5
G91G28Z0.
M00

Cheers

Chris

P.S. the BOB is working well

Offline Graham Waterworth

*
  • *
  •  1,890 1,890
  • Yorkshire Dales, England
    • View Profile
Re: Spindle Start Macros
« Reply #4 on: September 26, 2006, 02:14:21 AM »
What is setting "Input2"

If the G84 cycle is calling M4 to reverse the spindle and Input2 is active it will continue moving.

Graham.
Without engineers the world stops
Re: Spindle Start Macros
« Reply #5 on: September 26, 2006, 04:47:01 AM »
Hi

I think input 2 is a on/off signal telling Mach if the spindle relay is closed/open i.e. if the spindle is running or not

I had an idea the other night, I fought if I changed the While IsMoving to While NotMoving it would hold the machine till input 2 was seen but this didn't work, I got a error sub or function not defined - NotMoving.  I guess I need to learn VB and not just take wild stabs in the dark.

Thanks

Chris

Offline Graham Waterworth

*
  • *
  •  1,890 1,890
  • Yorkshire Dales, England
    • View Profile
Re: Spindle Start Macros
« Reply #6 on: September 26, 2006, 05:19:15 AM »
I don't understand!

If mach can stop the spindle why can't it start the spindle?

The relay must be cutting the power to the spindle somehow for it to be able to stop it at the bottom of the hole.

Can you post some photos of how all this is wired up.

Graham.
Without engineers the world stops
Re: Spindle Start Macros
« Reply #7 on: September 26, 2006, 09:47:36 AM »
I think it could if I wired it in, it would probably need another relay to pull the motor relay in, it is something I intend looking at in the future and would solve my problem.

There is a spindle enable wire which enables the spindle to be started using the switch as pictured below, this wire also allows Mach to switch the spindle off. This is how the machine was originally wired up before I swapped over to Mach with the help of Hillbilly's break out board and instructions.

I can't really post pictures of how it's all wired as it's to complicated for me to follow I have the wiring schematics though

Thanks

Chris
« Last Edit: September 26, 2006, 09:56:44 AM by creep_pea »