Hello Guest it is March 29, 2024, 07:07:56 AM

Author Topic: Odd behaviour?  (Read 5977 times)

0 Members and 1 Guest are viewing this topic.

Offline Davek0974

*
  •  2,606 2,606
    • View Profile
Odd behaviour?
« 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??

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Odd behaviour?
« Reply #1 on: May 04, 2016, 06:58:59 PM »
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
« Last Edit: May 04, 2016, 07:10:05 PM by Hood »

Offline Davek0974

*
  •  2,606 2,606
    • View Profile
Re: Odd behaviour?
« Reply #2 on: May 05, 2016, 02:15:44 AM »
Ok, good to know i'm not going nuts;)

I will check the M03 macro.

My removal of the tool change looks correct though??
Re: Odd behaviour?
« Reply #3 on: May 05, 2016, 02:11:31 PM »
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) )
Rob

Albert Einstein ― “If you can't explain it to a six year old, you don't understand it yourself.”

Offline Davek0974

*
  •  2,606 2,606
    • View Profile
Re: Odd behaviour?
« Reply #4 on: May 05, 2016, 02:28:32 PM »
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;)

Offline Davek0974

*
  •  2,606 2,606
    • View Profile
Re: Odd behaviour?
« Reply #5 on: May 14, 2016, 08:49:49 AM »
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.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Odd behaviour?
« Reply #6 on: May 14, 2016, 11:27:07 AM »
Do you have spindle feedback to Mach?

Hood

Offline Davek0974

*
  •  2,606 2,606
    • View Profile
Re: Odd behaviour?
« Reply #7 on: May 14, 2016, 11:52:47 AM »
No. ;)

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Odd behaviour?
« Reply #8 on: May 14, 2016, 11:56:35 AM »
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

Offline Davek0974

*
  •  2,606 2,606
    • View Profile
Re: Odd behaviour?
« Reply #9 on: May 14, 2016, 12:09:36 PM »
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?
« Last Edit: May 14, 2016, 12:11:15 PM by Davek0974 »