Hello Guest it is March 29, 2024, 06:20:11 AM

Author Topic: Turning on Spindle in a set direction...  (Read 4841 times)

0 Members and 1 Guest are viewing this topic.

Offline SimonD

*
  •  143 143
    • View Profile
Turning on Spindle in a set direction...
« on: May 11, 2008, 04:38:47 PM »
Hi,

How do I turn on the spindle in a set direction in a brain? 
If I terminate my condition with the "UserLED" "164 - Spindle CW on" it does not turn on the spindle.

If I use "Button" "Spindle on/off" it starts it but in whatever direction it was last moving in.

I have tried 2 rungs, one setting the UserLED and the other pressing the button but that doesn't work either.

What am I doing wrong?

Thanks
Simon

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Turning on Spindle in a set direction...
« Reply #1 on: May 12, 2008, 09:41:24 AM »
Simon, your Spindle Forward and Reverse have to be used on the lower Outputs of 1-6 (yes you have to select this under the ports and pins, you will have to assign your M3 and M4 to an output# unique to each.  When your G Code Runs, and lets say puts out an M3, and that turns on OUTPUT3 for instance.
Output3 will be on the input side of Brians, Then you can terminate to you modbus. If using the output3 as an output, the your input can be a secondary, something else.

scott
fun times

Offline SimonD

*
  •  143 143
    • View Profile
Re: Turning on Spindle in a set direction...
« Reply #2 on: May 12, 2008, 01:25:06 PM »
Scott,

The spindle forward and reverse already work fine from the M3 and M4 commands in G-Code.
The brain is to handle the physical control panel buttons.
I was trying to use "spindle on" as the termination for the rung. I will try OUTPUT1 & OUTPUT2 as the termination. I thought I had tried that but I will double check.
I am not using modbus, just parallel ports.

Thanks
Simon

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Turning on Spindle in a set direction...
« Reply #3 on: May 12, 2008, 01:38:58 PM »
the M3/4 from code will only work with outputs 1-6. If you bringing it from outside, on the PP, take OEM1, and OEM2 for M3 and 4 respectivly.
OEM1 to Output1 (m3 for example), then OEM2 to output2 (m4 for example).

scott
fun times

Offline SimonD

*
  •  143 143
    • View Profile
Re: Turning on Spindle in a set direction...
« Reply #4 on: May 12, 2008, 04:03:38 PM »
This is what I have in my brain...

Rung 1 works fine and switches off the spindle if both buttons are pressed (odd I know but that is how the control panel works, a third button "stop" sends BOTH signals)

Rung2 and Rung3 both work and switch the spindle on in the correct direction. But as soon as it has switched on, it switches off again, if I keep my finger on the button it switches on/off/on/off/on/off etc etc.

What I need is something to replace the rung terminations with something that says "spindle on cw" and "spindle on ccw" instead of "output1" and "output2"

Thanks
Simon

Offline SimonD

*
  •  143 143
    • View Profile
Re: Turning on Spindle in a set direction...
« Reply #5 on: May 14, 2008, 01:55:56 PM »
I am struggling with this.
How do I send an "m03" command or run the m3 macro or "DoSpinCW()" at a rung termination?

Thanks
Simon