Hello Guest it is June 24, 2019, 05:53:12 AM

Author Topic: How to resume after G code is stopped safely - problem  (Read 3274 times)

0 Members and 1 Guest are viewing this topic.

Re: How to resume after G code is stopped safely - problem
« Reply #30 on: January 22, 2018, 04:05:28 AM »
RICH , garyhlucas, wmgeorge,  guys , just so I do not need to write 3 separate posts...

RICH I moved forward, long time ago (there is video on top of this page where I showed that I made changes in post processor as I planed) because I know Mach3 will not be updated or will be no changes, I am using CSMIO IP S motion controller for my CNC lathe and because of that I am using some older version of Mach3 because guys from CS Lab recommended to use it otherwise they can not help me with my other problems that I had because then there is no sense, I wanted to tell you, when I bought my Mach3 license I envision that newest Mach3 version is the best, apparently I was wrong (I listen always people who have more experience then me).

Now back on topic, "how you want or envision how something  should work", so I went to Mach3 Turn manual I went to find what it say what is function of each button , so it say:

Cycle Start: This will run the part program from the current block (line) or continue after a feed hold or an M00 or M01 command.

Feed Hold: Will stop the part program running as soon as possible but in a totally controlled way so that it can be restarted. Spindle and Coolant will stay on if they were on at the time of the Feed Hold. During Feed Hold you can perform whatever operation, such a jogging, updating Wear offsets in the tool table, altering spindle speed etc. that is required to overcome a problem with the machining. Cycle Start will resume the run of the program.

Stop: Will stop the run of the part program as quickly as possible. Resumption of the run will not generally be possible and the axes may have lost or gained steps due to the rapid stop so the lathe needs to be re-referenced.

I also went to find in Mach3Turn manual pdf document word "buffer" and zero finds.

So under Feed Hold it say : "Cycle Start will resume the run of the program."  I am just trying to find out how and to be sure so I can stick to that principle. And also wanted to find why, and we started to talk about that only on third page after we went through about machining techniques.

wmgeorge you say : "It runs the buffer out and stops and will restart at the next line." So you say that buffer is ran out , does that means it is empty?

garyhlucas you say : "When you pressed feed hold it was already too late!  The speed change was already in the buffer."

And I say that makes sense to me , not just because I understand how thousand of other machine operate , because I saw that on my machine with Mach3 ,from some reason Mach3 continues with feed 300 mm/min(which is 8 to 10 lines down) instead 40 mm/min.
I am not trying to argue I am just trying to figure out what is going on, if it works like that I do not see solution other then write my G code like I said I would and apparently I will, it looks there must be feed command with every G01 command if I expect to resume with feed with which I activated Feed Hold button.

then you say :"... because you lack the necessary programming skills to do it correctly". I also asked did I wrote something wrong in my G code that maybe I do not see , I do not claim that I know much about G code programming because I use CAM all the time and I just make minor corrections in already made  G code manually.

So if somebody know some good link about Mach3 buffer please let me know.

And last thing what it say for Stop file ?

Stop: Will stop the run of the part program as quickly as possible. Resumption of the run will not generally be possible and the axes may have lost or gained steps due to the rapid stop so the lathe needs to be re-referenced.

will not generally be possible  ,    may have lost

Like I wrote from my experience I generally can continue from Stop file and did not lose anything, probably because when I drill I do not use rapid federate.

So basically maybe I should name this topic how Mach3 buffer works and what all you know about it :)



Offline RICH

*
  • *
  •  7,338 7,338
    • View Profile
Re: How to resume after G code is stopped safely - problem
« Reply #31 on: January 22, 2018, 05:15:14 AM »
How the buffer actually functions "internally" in Mach I do not know. It's just transparent to me and frankly don't care.

RICH

Offline Davek0974

*
  •  2,539 2,539
    • View Profile
    • DD Metal Products Ltd
Re: How to resume after G code is stopped safely - problem
« Reply #32 on: January 22, 2018, 06:56:21 AM »
There was a document floating on the 'net from Art IIRC it was very in depth as to the internals of M3 and very interesting reading reading, M3 is indeed a very clever bit of software.

Think i can find it now :(

Of course not.
Bridgeport Mill, Mach3 V062, CSMIO-IP/A controller, AC Servo Drives

Offline olf20

*
  •  317 317
    • View Profile
Re: How to resume after G code is stopped safely - problem
« Reply #33 on: January 22, 2018, 07:17:01 AM »
What is your "look ahead" setting? The higher the
number the longer it takes for M3 to empty the buffer.
olf20 / Bob
Mach3, Atlas Knee Mill, 4th Axis, VcarvePro, ESS, Super PID.
Been Heating with corn since 1998
Re: How to resume after G code is stopped safely - problem
« Reply #34 on: January 22, 2018, 07:32:12 AM »
What is your "look ahead" setting? The higher the
number the longer it takes for M3 to empty the buffer.
olf20 / Bob

Hi BoB, my look ahead is set on 20, never change it because did not know what it does, but now I have some idea for what is serves. So I assume I should set it on 3 and would in that case still have feed 40 mm/min ?

Offline Davek0974

*
  •  2,539 2,539
    • View Profile
    • DD Metal Products Ltd
Re: How to resume after G code is stopped safely - problem
« Reply #35 on: January 22, 2018, 07:38:14 AM »
I would not go lower than 20, I think mine is on 100 IIRC, a setting of 3 could upset the trajectory planner i reckon.
Bridgeport Mill, Mach3 V062, CSMIO-IP/A controller, AC Servo Drives
Re: How to resume after G code is stopped safely - problem
« Reply #36 on: January 22, 2018, 08:30:12 AM »
Since your using an older version of Mach its possible some of your concerns were addressed in the later or final versions.  Once again if Feed Hold is working for others, your controller or the older version might be an issue.  Have you contacted the vender for your controller?
« Last Edit: January 22, 2018, 08:36:41 AM by wmgeorge »
Retired Master Electrician, Commercial HVAC/R Service and lots of Hobbys.
Re: How to resume after G code is stopped safely - problem
« Reply #37 on: January 22, 2018, 09:12:51 AM »
Since your using an older version of Mach its possible some of your concerns were addressed in the later or final versions.  Once again if Feed Hold is working for others, your controller or the older version might be an issue.  Have you contacted the vender for your controller?
Guys which work  in CS LAB told me to use version of Mach 3 :Version R3.043.053, because with that version there is only few problems which are tolerable, and they professionally retrofit machines with Mach3 and their motion controller so they for sure have much more experience then me.

I am using Mach3 few years and last year pretty often so as I create more and more different G code programs I have opportunity to notice some thing for which when I started thought they are normal , or in most cases did not want to gamble so lot of time just to be sure I rewind program and start from start if I had some problems, or in some cases I would reload program and load it again, or I even was not aware what would happen if I press cycle start , pure lack saved me. So after some time you manage to notice some things that do not seams normal. So, for example, when I use G code version of program from page 1  where there do not exist command S300 F300 there is no problem, you can say even with my version of Mach3 feed hold works as intended , but when I write command at the end of G code program, S300 F300 and I press Feed Hold at line where I have command G01 -20 F40  then you can notice /say that Mach 3 does not work as you thought that it works, so I am just trying to find out how it works in order not to experience some nasty surprise.

Like I wrote I found workaround with editing post processor so I will have for each G01 command F (feed) command, I make all G codes with CAM, so it is no problem how Mach3 works, it works how it works , I am just curious to find out how it works in order to  know what I can expect from each situation I am in.
Re: How to resume after G code is stopped safely - problem
« Reply #38 on: January 22, 2018, 10:54:11 AM »
I would not go lower than 20, I think mine is on 100 IIRC, a setting of 3 could upset the trajectory planner i reckon.

Well I do not know nothing about that how it works, hope somebody will explain .

Offline Davek0974

*
  •  2,539 2,539
    • View Profile
    • DD Metal Products Ltd
Re: How to resume after G code is stopped safely - problem
« Reply #39 on: January 22, 2018, 01:45:47 PM »
I would not go lower than 20, I think mine is on 100 IIRC, a setting of 3 could upset the trajectory planner i reckon.

Well I do not know nothing about that how it works, hope somebody will explain .

AS I understand it....

Inside Mach (and probably all CNC controllers) there is a thing called the trajectory planner - its responsible for calculating the deceleration and acceleration for constant velocity (CV) moves as the code runs, amongst other things, probably works out radii from different input as well and so on - it plans the trajectory of the tool path on the machine.

The planner does its calculations and feeds the results into the code buffer, this is like a safety net so the machine can keep running smoothly - if the buffer empties on the job, you get a "Buffer Underrun" and the motion will stop or stall for an amount of time until there is sufficient code to make more moves - this is ALWAYS a bad thing and will make a mess.

Now, to stop an underrun Mach has to work in front of where the machine currently is - it takes time to do its calculations - measurable time, so to stop a risk of under run as well as correctly plan the trajectory, Mach has to "Look Ahead" a set amount of code lines - the look ahead setting. Its really not that vital now as PC's are pretty damn fast these days and 20 lines ahead seems ok, mine is 100 but i cant recall why now.

You can force an underrun if you like, just use the PC for something like a screen-saver or anything that will divert processor cycles away from Mach3's intensive use and your machine will stall and stutter like hell - this is why we use bare-bones setups for running Mach3. There is a very fine line between OK and underrun and it takes little to upset it, setting the look ahead too short will make it worse. If using the parallel port things get even tighter as the PC has to generate millions of stepper pulses and control the LPT port as well as updating the user interface - DRO's and the path indicator etc

Mach3 is a brilliant bit of software and i'm glad i have access to it really.


An analogy (of sorts) - the trajectory planner in a racing car - the drivers brain.

You are driving along and see a corner, you have no trajectory planner, so you drive to the corner and either take it at full speed (CV) or stop then take the corner (exact stop) - chances are you will crash with taking it at full speed and exact stop will annoy other racers as you stop and then turn.

Now, with the trajectory planner installed in your head, your eyes give it "look-ahead" - you can see the corner approaching a way off, your brain assesses a safe speed in which to take the corner, you slow in time (decelerate), take the corner and then accelerate away at feed-rate again.

The buffer kind of lets you see the next corner and the one after it.
« Last Edit: January 22, 2018, 01:56:04 PM by Davek0974 »
Bridgeport Mill, Mach3 V062, CSMIO-IP/A controller, AC Servo Drives