Hello Guest it is November 08, 2024, 09:49:00 PM

Author Topic: M3 S500 doesn't start spindle, subsequent S changes do..... why?  (Read 6735 times)

0 Members and 1 Guest are viewing this topic.

I'm using a C32R5 board with an ESS to control a Wabeco lathe. The spindle is enabled by relay 1 and the speed is controlled by the 0-10v output generated by the PWM

I understand that this version of the board doesn't directly control the relay outputs, that's done by the presence of the PWM signal.

This is my simple test program...
M3 S500
G00 X8 Z9
G01 X8 Z9 F100

The program runs, the spindle speed shows as S500 in the DRO and the dwell light comes on for the 4 seconds I've programmed. At the end of the program, the spindle is shown as turned off and again the dwell comes on as expected. The spindle doesn't come on though!

The Spindle outputs for Step and Dir are set to 1.14 and 1.16, either way round gets the same result.

If I change the program to this...

M3 S500 (nothing happens)
S501 (the spindle starts)
G00 X8 Z9
G01 X8 Z9 F100

The problem seems to be that the PWM doesn't know when to turn on. If I try to turn on the spindle manually, a similar thing happens.

1) Click then Spindle button (nothing happens)
2) Type S500 in the DRO (nothing happens)
3) Click the spindle up arrow or type S501 say (the spindle starts)
4) Click the Spindle button (spindle stops)
5) Clich the Spindle button again (nothing happens)

So the key questions is.... What actually decides when the PWM signal starts? Clearly the enable M3 or spindle button doesn't do that. It only seems to output a PWM signal once it's been enabled and the speed is subsequently changed.

This sounds like a bug rather than a setup issue to me but I may be wrong.

Does anyone have any ideas on this? Maybe this is something you've experienced too?

Any help would be much appreciated.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
Re: M3 S500 doesn't start spindle, subsequent S changes do..... why?
« Reply #1 on: January 22, 2015, 05:12:44 PM »
Never run into that problem before, can you attach your xml and I will see if I can figure what is wrong, also zip and attach your macro folder for the profile you are using.
Hood
Re: M3 S500 doesn't start spindle, subsequent S changes do..... why?
« Reply #2 on: January 22, 2015, 05:24:31 PM »
Thanks for your reply, I'll sort that out in the morning. At the moment, the only way I can make it work is to cut and paste the contents of the spindlespeed.m1s macro onto the end of the m3.m1s macro. That forces it to start the PWM when it sees a line like M03S500. It still doesn't work when I click the spindle button though unless I go to the DRO and type S500. I imagined that the m3 macro would be called by the spindle button, but that's clearly not how it works.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
Re: M3 S500 doesn't start spindle, subsequent S changes do..... why?
« Reply #3 on: January 22, 2015, 06:52:19 PM »
The spindle button will only start the spindle, it will not set the speed.
For example if you do not have any previous value in the RPM DRO then pressing the Spindle button would result in no RPM. If you had a value there then it should start rotating.

Hood

Offline ger21

*
  • *
  •  6,295 6,295
    • The CNC Woodworker
Re: M3 S500 doesn't start spindle, subsequent S changes do..... why?
« Reply #4 on: January 22, 2015, 07:38:17 PM »
Try changing your code to S500 M03.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: M3 S500 doesn't start spindle, subsequent S changes do..... why?
« Reply #5 on: January 23, 2015, 03:00:52 AM »
The spindle button will only start the spindle, it will not set the speed.
For example if you do not have any previous value in the RPM DRO then pressing the Spindle button would result in no RPM. If you had a value there then it should start rotating.

Hood

This is true, but it ought to start the PWM if the spindle speed is already set. If the spindle is running and I stop it with the Spindle button, I think it's reasonable to expect the spindle to restart when I press the Spindle button again. That doesn't happen. There appears to be something in the code that only starts the PWM when there's a change in frequency.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
Re: M3 S500 doesn't start spindle, subsequent S changes do..... why?
« Reply #6 on: January 23, 2015, 03:14:10 AM »
All   I can say is,  that if you use Step/Dir or with the CSMIO/IP-A, which is analogue command, then pressing the start spindle button will start the spindle at the current RPM set in the DRO.

This may be an ESS issue, not sure, someone using PWM and the PP or for that matter any other controller,  would have to confirm whether it works or not.
Hood
Re: M3 S500 doesn't start spindle, subsequent S changes do..... why?
« Reply #7 on: January 23, 2015, 04:55:55 AM »
Ok, here are the files for the setup with the macros, a test program and explanation of the issue. Hopefully this will reproduce the problem. It's the PWM not turning on that's the problem, the relays only respond to that.
Thanks for looking at this for me, it's much appreciated.
Re: M3 S500 doesn't start spindle, subsequent S changes do..... why?
« Reply #8 on: January 23, 2015, 04:58:26 AM »
Try changing your code to S500 M03.

This doesn't work. If I do this...
M03 S500
S600

that works. It's the change in spindle speed after it's turned on that starts the PWM. If that second line is S500, it doesn't start

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
Re: M3 S500 doesn't start spindle, subsequent S changes do..... why?
« Reply #9 on: January 23, 2015, 02:14:14 PM »
Ok try this and see.
Go to Ports and Pins and the Spindle Setup. Enable the relays. Then go to OutPuts and Enable Output 1.  You should be able to leave it at port and pin 0 but possibly the ESS will complain. If it does just set it to any port/pin you are not using.
Hopefully that will help.
Hood