Hello Guest it is April 19, 2024, 01:58:40 AM

Author Topic: Turning ON/OFF Spindle when Gcode is Running  (Read 10590 times)

0 Members and 1 Guest are viewing this topic.

Offline TDAY

*
  •  165 165
    • View Profile
    • Home CNC Stuff
Turning ON/OFF Spindle when Gcode is Running
« on: May 03, 2013, 01:16:28 PM »
Hello all,
 I have been using a Brain to control my Automation Direct GS2 VFD thruw modbus. What i would like to add to control of spindle is a way to shut off spindle while a Gcode is running. Can this be done?
Attached is current brain.

Any help is much appreciated.
Thanks,
Troy
"I try to put forth the effort,before asking a dum question"
http://homecncstuff.elementfx.com

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Turning ON/OFF Spindle when Gcode is Running
« Reply #1 on: May 03, 2013, 04:39:37 PM »
Troy, I'm working on setting up a GS2 right now.  I will able to control the run/stop, fwd/Rev, and desired Freq. from my control panel or VFD cabinet that is mounted on my mill and has the VFD, relays, 24 VDC psu and all the manual operation buttons in it.  I will be able to run any of them either by mach or by the manual buttons.  Sometimes I run the spindle manualy for tapping and i need to be able to run the spindle even if I take the control cabinet in the office for testing.  I'll have it all sorted by Monday I hope and will give you what I have then if it will helo.

Brett
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline TDAY

*
  •  165 165
    • View Profile
    • Home CNC Stuff
Re: Turning ON/OFF Spindle when Gcode is Running
« Reply #2 on: May 03, 2013, 05:37:24 PM »
Hi Brett,
 Wow. That sounds like a big help.  :o I got plans to eventually add some manual button control of spindle and others, but i need to finish an interface board to straighten up some wiring and open up more I/0s. So ya, this would be a big ;)

 It doesn't bother me to much that i cant toggle spindle on and off during Gcode run, but iam getting ready to show my brother ("ol" manual machinist) how to use my CNC mill and want it to be as safe and simple as i can make it for him.

One thing I noticed when running a Gcode that executes a M01, is i can then shut off spindle and turn it back on again. But i cant toggle it any other time while in a Gcode run.

Anyhow thanks again,
Troy
"I try to put forth the effort,before asking a dum question"
http://homecncstuff.elementfx.com

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Turning ON/OFF Spindle when Gcode is Running
« Reply #3 on: May 06, 2013, 07:48:12 AM »
of course there is a way...........

drop an On/Off spindle button (your own), on the screen somewhere, call it running spindle power or some such.
have that button toggle a User LED.
In a Brian, have that LED control the state of the modbus register that is the address/bit(s) that your using for your spindle control.  Look in the GS2 manual, and for convenience use the Block addressing option to condense all your controls in a continuous block of addresses. Modbus runs independent of Mach3, so, if your modbus is controlling your drive then you can turn it on/off while gcode is running......

Scott
fun times

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Turning ON/OFF Spindle when Gcode is Running
« Reply #4 on: May 06, 2013, 01:27:50 PM »
That's exactly what I'm doing Scott.  It works really good with the exception of one problem.  When you set the parameter to choose the source of operation to digital input terminals the drive does not respect that as long as communications are established.  I can turn the spindle on and off form the manual cabinet and vary the speed with the pot on the manual cabinet but I cannot change the spindle direction.  It will will only rotate in the last commanded direction Mach sent.  I'm hoping this is something a frirmware update in the drive will fix.  I'm calling AUD now to see what they think.

Brett
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Turning ON/OFF Spindle when Gcode is Running
« Reply #5 on: May 06, 2013, 03:03:23 PM »
Hey Troy, I just spoke to AUD and they say the GS2 can not work like that.  The problem I'm having with the source of operation for the Fwd/Rev, Stop/Run being respected if the parameter is changed by serial.  The drive does a great job and I like it.  This would have been no problem had I known up front.  I called AUD a couple of months ago when I was thinking about this option and they said it would work fine........ now they say it won't. Soooooo, I will probably be redoing the controls a bit.  I'm thinking right now that I will have the digital inputs run through a set of dry contact relays and simply have mach or my front panel selector switch turn them on or off.  In hind sight, I would have put a PLC in my VFD/manual spindle control box and handled all IO and serial communications through it.  I have sent you a PM as well Troy.

The only way I see around this caveat is if you could enable/disable a config. in the serial plug-in modbus via vb.

Brett   
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline TDAY

*
  •  165 165
    • View Profile
    • Home CNC Stuff
Re: Turning ON/OFF Spindle when Gcode is Running
« Reply #6 on: May 10, 2013, 02:07:01 PM »
Hi Brett,
 I have been messing around with the digital inputs of GS2 after talking with you and think i have a work around for me. I set P3.02 to 01 (External Fault) and P3.03 to 02 (External Reset). Which corresponds to Digital Inputs 3 and 4
Both Digital Inputs are wired to one simple on off switch. When switch is off the GS2 sees a External Fault and coasts to a stop. When i flip switch on, External Fault is gone on DI3, and DI4 clears the GS2 fault allowing spindle to run again.

Question, do you know if this is safe for the drive? Having both Digital Inputs wired to same On/Off switch?

Thanks again,
Troy
« Last Edit: May 10, 2013, 02:09:19 PM by TDAY »
"I try to put forth the effort,before asking a dum question"
http://homecncstuff.elementfx.com

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Turning ON/OFF Spindle when Gcode is Running
« Reply #7 on: May 10, 2013, 02:25:04 PM »
Good for you Troy.  You can also set the drive to ramp to stop rather than coast.  As long as your useing the digital common from the drive as the common for both switches it should be fine.  I'm guessing if they were both on the fault would take prioriety, I would hope it does at least.  You may want to test that.

Brett 
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline TDAY

*
  •  165 165
    • View Profile
    • Home CNC Stuff
Re: Turning ON/OFF Spindle when Gcode is Running
« Reply #8 on: May 10, 2013, 02:58:47 PM »
I have the P1.00 set to Ramp to Stop but i dont think this applies when drive is issued a External Fault. The book says for an External Fault that it will coast to a stop.
Yes, fault takes priority thats why i had to change P3.02 to 01(NormallyClosed).

I was thumbing thru the manual in the DirectLOGIC Modbus Ladder Programming area. I dont know how to do this but it resembled Machs Brains. Could this be used with the Compare and Switch option of Mach's Brains somehow??

Troy
"I try to put forth the effort,before asking a dum question"
http://homecncstuff.elementfx.com

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Turning ON/OFF Spindle when Gcode is Running
« Reply #9 on: May 10, 2013, 03:06:01 PM »
Yup, you could do that Troy.  You could have a dro in MAch and you enter the value you want the brain to send to that param.

Brett
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!