Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: Davek0974 on May 04, 2016, 02:42:22 PM
-
I'm tweaking the post-processor for Vectric Aspire for use on my mini-mill, by default it puts a tool change at the start of each file, I don't really want this.
This is the start of a file...
N240 G00 G21 G17 G90 G40 G49 G80
N250 G71 G91.1
N260 T2 M06
N270 (T2 - 5mm Carbide YG)
N280 G00 G43 Z20.000 H2
N290 S19000 M03
N300 (Toolpath:- Apertures Roughing)
N310 ()
N320 G94
N330 X0.000 Y0.000 F1000.0
When edited I get this...
N240 G00 G21 G17 G90 G40 G49 G80
N250 G71 G91.1
N260 G00 Z20.000
N270 S19000 M03
N280 (Toolpath:- Apertures Roughing)
N290 ()
N300 G94
N310 X0.000 Y0.000 F1000.0
Seems ok to me, I tried running it but the mill started running the file with the spindle off, luckily I e-stopped early enough to stop damage.
I then reset and tried an M03 in the MDI box and I got "Compiler error in M03.m1s" message, could not get spindle to start, rebooted and suspecting the code was wrong I returned the file to it's original state and tried again to get the job done - it worked ok this time.
So, I don't know until i try again if the code change was wrong or it was just some sort of duff boot-up first time round??
-
That is a problem that a few people have seen, I have never seen it myself but a friend in Glasgow suffered with it for a while.
Don't know why it happens but doesn't seem to be related to whether you use the PP or an external controller.
One thing you can try is open your m3 macro in notepad (not Mach VB editor) and see if there are any extra characters after the DoSpin(CW), if there are delete them and hopefully that will be the end to your problem, it worked for him.
Sad thing is however it seems to run fine lots of times then suddenly one time it wont, so you may not know for a while whether that cured it or not :(
Hood
-
Ok, good to know i'm not going nuts;)
I will check the M03 macro.
My removal of the tool change looks correct though??
-
Why do you have to remove the toolchange?
On the general configuration tab you can tell mach3 to ignore m06 toolchange commands (top left hand side from memory)
I have found with vbscript (macropump etc) that you need one carriage return after the last command (press keyboard "enter" after the dospin(cw) )
-
I want to remove it because my job sequence is -
mount plate on mill bed
fit first tool
zero work coordinates
zero Z axis to plate surface
run job
When i start the job running, having a tool change wastes time as it just runs through what i have done already, I prefer to know that I have the first tool correctly set before running, my jobs always start with the first tool loaded and set.
I can't simply ignore tool changes as most jobs have multiple tools in use. The excellent 2010 screen-set with its semi-auto tool change macros gets a good workout on my stuff;)
-
Happened again today - started the run without starting the spindle, not so lucky this time and the tool took one for the team :(
I had a look in the M03 macro and there were no characters after the do-spin bit but there was also no carriage return and I seem to remember reading that the macros like to have a return on the last line?
I put one in and after a reboot it run the job fine, will keep an eye on this one.
-
Do you have spindle feedback to Mach?
Hood
-
No. ;)
-
Ah ok, shame as I had a macropump a long time ago that would look at the commanded speed and the true speed and if not within a certain percentage it would Halt the code.
It worked well but only when I was not using Modbus, sadly I needed Modbus for my PLC so couldnt use it.
Hood
-
Ah, but, yes, but no, but, I could maybe get a run signal from the VFD back into Mach?
Then it would halt if no run feedback was seen before issuing the first Gxx code??
I'm using the VFD relay configured as "VFD Output On" to control the cooling pump, it would only take a relay in parallel to do this, I think there is a soft output as well on the VFD.
Maybe worthwhile?
-
If you could get the run signal to Mach then you could have the M3 macro look at it before allowing code to run, problem likely would be when you get the problem with the macro not being read Mach just continues anyway I think.
So that would not work :(
Ok so maybe you could add a custom macro after each M3 and have that custom macro look for the signal and if not present within a set time do an E-Stop.
Hood
-
I'm sure there is a way forwards here, will look further, odd that the plasma has never done it though.
-
I don't know why some people get it and others, like me, never see it.
I have used Mach since the Mach2 days and have had a manual Bridgeport conversion, a CNC Bridgeport, Beaver NC5 mill, Computurn lathe, Conect lathe, Chiron VMC and a coil winder and I have never once had that problem.
Might be worthwhile making a new profile from scratch and seeing if that helps, or even deleting the macro folder and starting Mach up and it will create new macros for you.
Hood
-
Hmm, odd.
I'm using the 2010 screenset so the macros came with that, not sure about the M03 though I think thats standard.
I'll give her a bit longer before reinstalling as its all working well apart from this very intermittent issue.
-
Well if you can get a spindle running signal from the VFD to Mach then you can make a macro and you wont have to worry.
Hood
-
would seem to be a reasonable addition, it is pretty important that the spindle is running i guess ;)
-
Delete the M3 completely, and create a new one from scratch in Notepad or whatever editor you use.
Just type
DoSpinCW()
and save as "m3.m1s"
From what I've seen, if you create a new one, it usually stays OK.
And no, I don't supply that macro with the screenset. only the ones unique to the screenset.
-
And fwiw, it's never happened to me either.
-
Weird init ;)
Will try with my edited version tomorrow.
-
I had it randomly on my lathe. I also had it once where it turned the spindle off instead of reducing speed. That one wouldn't of been so bad, but it knocked both the turret and spindle out of alignment, as well as shattering a relatively new drill >:(
I've got to admit, I definitely don't miss Mach on my lathe!
-
I had a problem with a macro that would not complete the function, and tracked it down to not having a carriage return after the last function.
Try it with a number of dry cuts and see if it now works, presume you have the two cypress basic mach3 manuals, can't remember if it was in there or on here or a known issue with basic...
(It was a THC macro not a dospin() function though)
-
As i said, i did read it somewhere, just buggered if i can remember where - it needed a carriage return at the end of the do-spin line.
I have added one as it was missing and will be running again tomorrow, see what happens.