Hello Guest it is October 19, 2019, 03:56:52 AM

Author Topic: M code script and Exact stop  (Read 2269 times)

0 Members and 1 Guest are viewing this topic.

M code script and Exact stop
« on: April 23, 2014, 03:38:29 PM »
Hi, i have a strange problem. I have wrote a Basic script that take care of changing the tool and calibrating after that. When the M code (M991 in my case) is executed, the machine will retract to a known position and ask the user to manually change the tool, after the change is made the user needs to confirm that by hitting OK. After that the script will automatically calibrate the tool and continue working. BUUUUT after running the script the machine will enter in Exact Stop mode. The problem is that i do not like that. I have tried inserting G64 after the script and also from script with "Code "G64""  but no effect, the machine will remain in Exact Stop mode until the next M script is executed. The problem is that my machine vibrate (go-stop-go-stop...) and i dont like that Because it will destroy the mechanical part. The moves are very short because my pieces are small. It is like the mach3 enter in a strange stage/settings because if i stop the execution of file while it is in Exact Stop mode (after executing M code) it will remain in Exact stop mode for the next file. If i look in General Config the mode is Constant Velocity, but it works like it is in Exact Stop mode...

Anyone know what the problem would be?
If someone want the script i will send it on private message.

I have mach3 r43.50 (i guess) and it works well on other jobs... i will change it only if this is a known bug and was repaired on the higher versions.
I use professional drivers from Wantai, and motors. My machine runs fast and smooth and dont lose steps. I use a Laptop HP 6530b, the pulse stream is steady within +/- 1 pulse. The test program say Excellent. Pulse frequency is 45Khz.  I use Windows 7 Pro 32 bit with license. 4GB ram, dual core 2.53 Ghz.

Offline ger21

*
  • *
  •  6,288 6,288
    • View Profile
    • The CNC Woodworker
Re: M code script and Exact stop
« Reply #1 on: April 23, 2014, 07:05:27 PM »
What's in your M991 code?

Why aren't you using M6 for this? That's what M6 is for.
Gerry

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

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: M code script and Exact stop
« Reply #2 on: April 25, 2014, 02:18:04 PM »
Hi ger21, i have sent you the script as you requested, did you managed to reproduce the problem or find any solution ?

Also i want to add that the NC file is generated using Delcam Powermill, and after that i modify it with a software writen by me in C# to adapt it to my machine and to Mach3. The modifications made are just deleting some rows and inserting others, some of rows are copied on other location in the file.

Thank You for Your help.

Offline ger21

*
  • *
  •  6,288 6,288
    • View Profile
    • The CNC Woodworker
Re: M code script and Exact stop
« Reply #3 on: April 25, 2014, 02:28:30 PM »
I don't see anything that would cause the Exact Stop? What is the active mode when you call the macro? Are you drilling?
Also, after every "Code" line, you should have a
While IsMoving
Wend

You don't need the Sleep(100).
Gerry

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

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline BR549

*
  •  6,902 6,902
    • View Profile
Re: M code script and Exact stop
« Reply #4 on: April 25, 2014, 06:25:58 PM »
IF you are Drilling using a canned cycle thenThe exact stop is from the Canned cycle. Art/Brian never fixed the problem of it leaving Mach3 in exact stop mode on exit. You need to apply a G64 after every canned cycle to make SURE it is reset to CV mode.

NOT every canned cycle does it, (;-) TP
« Last Edit: April 25, 2014, 06:33:43 PM by BR549 »
Re: M code script and Exact stop
« Reply #5 on: April 26, 2014, 11:38:26 PM »
Hi, i have made the changes sugested by ger 21 and now it works well, no exact stop mode now. I have removed sleep 100 from the code and inserted While IsMoving Wend after each line of ”Code”. Also i have deleted the Function from the code and moved that logic in the body of the script, and deleted ”G0” from code an used only ”X10 Y123 Z456”.

Thank you for all Your help.
If anyone needs the script please let me know and i will post it here. On the CNC laptop i dont have internet...