Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: tmead on January 06, 2011, 06:38:22 PM

Title: Spindle speed not changing until overide button pressed
Post by: tmead on January 06, 2011, 06:38:22 PM
Another interesting 'feature' that I've bashed up against.

our machine was working well during development, but recently I've generated a new profile cloned from a previous one. Now the spindle speed doesn't quite work as expected. M3 S400 turns it on, but only at the last running speed, it seems to ignore the s word for speed until a feedrate override button is pressed (163 or 164), and then the speed jumps to the speed requested.

not quite sure how to get round this one !

I will try issuing further S words in the morning to see if they change the speed in the same way as pressing the overide buttons.

I'll also try winding back to the previous configuration to see if that makes it work.

All other suggestinos welcome !

Tim
Title: Re: Spindle speed not changing until overide button pressed
Post by: Hood on January 06, 2011, 06:56:59 PM
Are you issuing the M3S400 from code? Certainly never a problem here either on mills or lathe.
If you are issuing the M3S400 from VB then probably you need to enter the S400 then A sleep to let the DRO update then issue the M3.
Hood
Title: Re: Spindle speed not changing until overide button pressed
Post by: tmead on January 07, 2011, 12:12:04 PM
thanks Hood, but it's not that. Once the spindle is running (after pressing the override button) I can issue a further S word, and the DRO (817) updates happily, but the change is not implemented until the override button is pressed again, and then it is implemented with the overide up or down as relevant.

Tim
Title: Re: Spindle speed not changing until overide button pressed
Post by: Hood on January 07, 2011, 01:28:56 PM
Thats a strange one, not sure if it could/would affect it but have a look on General Config page and see if you have "No FRO on Queue" checked.

Hood
Title: Re: Spindle speed not changing until overide button pressed
Post by: BR549 on January 07, 2011, 02:21:21 PM
I think you have piece of VB code working against you constantly updating the Sdro. The tip is that the FRO works as it is totally different from the GcodeSpeed.

Just a thought, (;-) TP
Title: Re: Spindle speed not changing until overide button pressed
Post by: tmead on January 07, 2011, 03:34:08 PM
hmmm - thanks folks.

TP - there's no VB doing anything with speeds except issuing an M3 S... command to start the spindle at a speed and then run a series of G81 cycles at scipt defined locations. Certainly nothing trying to override the speed or adjust it once it's started. Seems strange, because I have had the spindle starting and stopping correctly from VB script and the MDI, but now it simply wont !

Hood - "No FRO on Que" is not checked - should it be ?

Ta, Tim
Title: Re: Spindle speed not changing until overide button pressed
Post by: BR549 on January 07, 2011, 03:47:10 PM
I did not say override or adjust(;-) I said over write. I have done the very same thing long ago had a script running that ended up in a loop constantly overwriting the S DRO. NOTHING could change it BUT the SSO function. TOOK DAYS to run that one down.

Other than that I have never HEARD of what you are seeing happen.

Just a thought, (;-)
Title: Re: Spindle speed not changing until overide button pressed
Post by: tmead on January 09, 2011, 07:05:38 AM
Sure, i can see where you're headed, but it can't be that.

DRO 817 is deisplayed, and that updates nicely as expected when an S word is entered either through script or MDI, but the change doesn't happen until an overide up/down button is pressed.

There's no VB that addresses any of the DROs that could affect the spindle - I've just double checked. I have looked for the following DROs - 39, 57, 74, 99, 117, 121, 202, 817.

Thanks for your thoughts, It certainly is odd.


Tim
Title: Re: Spindle speed not changing until overide button pressed
Post by: BR549 on January 09, 2011, 01:52:35 PM
Do you have any Brains or a macropump running?

(;-) TP
Title: Re: Spindle speed not changing until overide button pressed
Post by: BR549 on January 09, 2011, 04:28:35 PM
Does this happen anytime mach is running or just during running after a button push?

A duplicate DRO# can do the same thing.

Just some thoughts, (;-) TP
Title: Re: Spindle speed not changing until overide button pressed
Post by: tmead on January 11, 2011, 04:56:25 PM
Hi TP,

no brains, (and that's just me !) but there is a macropump that updates some user DROs. Definitley not anything to do with the spindle.

The issue is always there, as soon as the machien is turned on and the axes refernced, I've tried using the MDI with an M3 S400 command, and nothing happens until the overide buton is pressed. Same as the issue that occurs when the M3 is issued by the VB from button.

Tim

Tim
Title: Re: Spindle speed not changing until overide button pressed
Post by: BR549 on January 11, 2011, 06:24:48 PM
The only thing running when Mach first starts up is the macropump and Brains . I have looked at your macropump it is NOT a simple macropump. ALSO check for duplicate DROs THAT can cause the same problem..

I have looked BACK throught the old trouble notes and those 2 things were the only things I ever saw that could cause what you see.

Might want to use Mach Screen and double check for duplicate DROs

DID your old machine do the same process?? If so then try that setup on the new machine.

(;-) TP

Title: Re: Spindle speed not changing until overide button pressed
Post by: BR549 on January 11, 2011, 06:47:48 PM
After you getmach upand running what screen do you end up at that you can do the MDI testing???
Title: Re: Spindle speed not changing until overide button pressed
Post by: tmead on January 12, 2011, 09:01:33 AM
We're using our own screenset, as attached.

The first screen (Page 1) runs a simple script when the image button is pressed that references all axes and then sorts out a few variables. It then opens page 2, which should use a sensor to determine the position of the clamps as diifferent sizes of material can be used. the third screen allows the user to enter a particular mix of orders and start the cutting. this is the only script place that starts teh simpndle.
there are MDIs on pages 2,3,4 and 5.

Tim
Title: Re: Spindle speed not changing until overide button pressed
Post by: BR549 on January 12, 2011, 01:24:02 PM
OK once you start the program cutting, HOW are you trying to adjust the Sspeed. I do not see anywhere you have the SSO function on screen.

(;-) TP
Title: Re: Spindle speed not changing until overide button pressed
Post by: Hood on January 12, 2011, 01:56:53 PM
Terry I think he said FRO in the first post which would make things even weirder and thats why I thought maybe no FRO on queue may have had something to do with it.

Hood
Title: Re: Spindle speed not changing until overide button pressed
Post by: BR549 on January 12, 2011, 02:29:56 PM
I believe he will have to comb through ALL the VB code to find the  problem (;-)  In my opinion a total VB controlled motion control is NOT the ideal setup. BUT that is just my opinion. MACH as a Gcode controller is very dependable.  ADD in VB and it gets very computer dependant on timings.

IT could be that having the entire control running from VB prevent some Gcode interactions?? I have seen stranger things.

BUT so far I hold at a duplicate DRO or a peice of udating code in a loop.

Hope that helps, (;-) TP

Title: Re: Spindle speed not changing until overide button pressed
Post by: tmead on January 13, 2011, 10:05:48 AM
My apologies - I've read the OP again, and I did slip up and write feedrate override, rather than spindle override.

There are spindle override buttons on the bottom of page 2 I believe (can't open the screenset from here). I orignially identified the issue by switching to the 1024 screenset and using the buttons there.
I have the same issue when entering the M3 S400 command in the 1024 screeenset, which is not running anythign else in the background. Yes, my code does organise some motion, but even without the code doing anything, or using a screenset that has minimal code it still doesn't work. I will have a go at turning off the macropump in the general config, and then starting and stopping the spindle and changing speed from the 1024 screenset, just to check that there is no strange interaction there.

I'll try opening in Mach Screen and looing through for duplicate DROs, is there an easy way to do this ? I'm not quite sure what you mean, as there are two versions of one user DRO on a page, one as a readout and one as a slider.

Tim
Title: Re: Spindle speed not changing until overide button pressed
Post by: M250cnc on January 13, 2011, 11:19:36 AM
Quote
I'll try opening in Mach Screen and looking through for duplicate DROs, is there an easy way to do this ? I'm not quite sure what you mean, as there are two versions of one user DRO on a page, one as a readout and one as a slider.

Open MachScreen select view from the menu bar select overview

You can sort on a function etc make the tables wider etc

Phil
Title: Re: Spindle speed not changing until overide button pressed
Post by: tmead on January 13, 2011, 05:59:13 PM
There are only three occasions where a DRO appears twice on one page, and those are the X, Y and Z position DROs.

They are also on an unused screen (17) that was used temporarily for some layout work and trialing.

No access to the machine at present, so testing the presence/absence of the macropump will have to wait.

Tim
Title: Re: Spindle speed not changing until overide button pressed
Post by: BR549 on January 13, 2011, 07:35:36 PM
IF you ran the 1024 screen and it did the same thing that would eliminate anything screen related and tends to point to an automated process still running.

Just a thought, (;-) TP
Title: Re: Spindle speed not changing until overide button pressed
Post by: tmead on February 11, 2011, 05:43:48 AM
Sorry for the delay - new job means this has taken a back seat fro a while.

I took a good look last night, and still have no idea ! I disabled the macropump and loaded the unmodified 1024 screenset, the reaction was still the same - any spindle S words were accepted, the DRO was updated, but the physical spindle speed did not change until a spindle speed override button was pressed.   >:(

i gave up ! :'(

The xml and other bits/pieces were copied out, and a complete uninstall/reinstall of mach completed, using the same version (3.042.025). It works now !  ;D

So, as I said - I'm no further forward in fault diagnosis, but the symptoms are fixed, using the same macropump, same gcode, same bitmaps and same screenset. There must have been a setting in there somewhere that i'd accidentaly changed.   ???

Anyway - thanks for all the people that thought about this, and offered suggestions.

Tim
Title: Re: Spindle speed not changing until overide button pressed
Post by: Sparky_NY on February 11, 2011, 08:47:04 AM
Sounds like the same problem others have reported, yet unresolved.      http://www.machsupport.com/forum/index.php/topic,9314.0.html

I am having the same problem myself now on a new lathe build.  No cure/fix in sight.   This one has been around and I found reports back to 2007

ALSO..... try issuing a duplicate S*********x command, that will also cause the speed to go to the correct commanded value.   Its only the FIRST M3 S********* command that intreprets wrong.  All subsequent speed commands execute properly!!

Another data point worth noting :   So far, EVERY report of this I have seen has been with a PWM controlled spindle.   Step/Dir controlled spindles have not had the issue.   Is yours PWM controlled?  (bet it is ! )
Title: Re: Spindle speed not changing until overide button pressed
Post by: thosj on February 11, 2011, 05:30:34 PM
I have no problem seeing this. It's been there for months, at least. Initially there was some mention of the bug, but it's died a peaceful, unfixed, death. There's a doc out on the web someplace penned by Chris Humphris, dated July of 2010, on how to setup a PWM spindle and that's where I first saw this mentioned.  Top of page three, big as life for all to read, and it has it exactly as stated here and everywhere else.

http://www.cnctar.hunbay.com/HJozsi/Mach3/PWM%20Spindle%20Control%20using%20Mach3.pdf

I've given up on it getting fixed and just live with it, but mine only changes by 4/5%!! Life is too short and EMC2 is too big a PITA/learning curve to switch!!! But I always consider it when this stuff comes up and goes unfixed. But.............just wait for Mach v4, by George.

Tom
Title: Re: Spindle speed not changing until overide button pressed
Post by: Sparky_NY on February 11, 2011, 06:02:24 PM
Hang in there Tom !     I got Brians attention on this and he is looking at it right now.    I am betting a fix will be out very fast.
Title: Re: Spindle speed not changing until overide button pressed
Post by: tmead on February 14, 2011, 07:11:11 AM
Thanks for all the comments !

The machine runs with a step/direction spindle, so is perhaps a little different to the PWM issue ?

The key feature that we've seen is that the spindle will only run at the previous speed when an M3 S ********* is issued, although the DRO will show the requested speed. There is no change until a spindle speed override is pressed, then it picks up the new speed as shown on the DRO. I have not tried running a VB script that issues an S word, pauses and then issues the relevant DoOEMButton........ that might have been a work-around !

However, a complete removal and re-install of mach3 fixed the issue. (remembering to grab a copy of the xml, macros, bitmaps, and gcode directories first  ;)  )

Tim
Title: Re: Spindle speed not changing until overide button pressed
Post by: Sparky_NY on February 15, 2011, 03:28:59 PM
Its fixed !!!
Link to file here:

http://groups.yahoo.com/group/mach1mach2cnc/message/125366
Title: Re: Spindle speed not changing until overide button pressed
Post by: thosj on February 15, 2011, 06:45:07 PM
Seems good here, too! Two fixes for me in one day.

My 8 speed BP now has 4 pulleys that run in reverse as they should, and speed comes up at the speed it should be and stays there.

Great, thank Brian!!

Tom