Macros causing motion pauses

A place to get answers about which CNC products to look at for your specific application. We have everything from complete controllers in different sizes and in both stepper and servo configurations. A good place to start and get basic answers
beefyandzee
Posts: 22
Joined: Sun Sep 29, 2013 4:25 pm

Macros causing motion pauses

Post by beefyandzee »

I have a much older Candcnc system, a basic MP3000-DTHC.

Running a macro during motion generally causes a pause in motion, e.g. turning THC on or off (during motion) would result in a divot when the motion paused.

I was under the impression that the latest ethernet system uses a modified Smoothstepper box, and this box would not give these motion pauses when any macro was run while the machine was under motion.

This thread on Plasmaspider seems to say otherwise:
http://www.plasmaspider.com/viewtopic.php?f=55&t=11780

Corfabrication seems to be saying he is getting a pause in motion when trying to switch the torch off before the end of cut to prevent a divot when cutting circles.

Could I get some concrete information on what the latest system can and cannot do regarding pauses in motion caused by running macros. I'm wanting to upgrade my Candcnc system when funds allow.

Thanks very much,

Keith.
beefyandzee
Posts: 22
Joined: Sun Sep 29, 2013 4:25 pm

Re: Macros causing motion pauses

Post by beefyandzee »

Another thread with this issue:

http://www.plasmaspider.com/viewtopic.p ... 2&start=25

Keith
admin13o5
Site Admin
Posts: 5806
Joined: Tue Sep 03, 2013 5:39 pm

Re: Macros causing motion pauses

Post by admin13o5 »

beefyandzee wrote:I have a much older Candcnc system, a basic MP3000-DTHC.

Running a macro during motion generally causes a pause in motion, e.g. turning THC on or off (during motion) would result in a divot when the motion paused.

I was under the impression that the latest ethernet system uses a modified Smoothstepper box, and this box would not give these motion pauses when any macro was run while the machine was under motion.
A Macro executes in g-code the same way weather it is conventional parallerl port OR Ether-Cut. It has to do with the way the control software (MACH) reads and acts on code. A macro is treated like any other line of code and it has to fully execute before the next line is executed/


For that reason we DO NOT use macros to turn the DTHC (not the THC in MACH) on and off or to do any other DTHC function. We started that in the DTHII 4 years ago. Macros are fine if they are not run in motion code.
The only commands in G-Code that are not executed separately as a separate command are the "S" (speed) and "F" feedrate. Feedrate is required so all we have is S. We use a series of special S numbers to execute commands (including DTHC On?OFF) The original MACH paused on the S commands to give the spindle time to change speeds (on a router) we had to get that fixed first. Then we had to write a custom plugin to take the S commands and call the right functions in MACH. We can do anything from load the DTHC II/IV presets to change things dynamically as it cuts (fully supporting the new CUT RULES in SHeetCAM REL 6) There is an added challenge because the ESS is not in sync with the MACH so there is a time lag between when MACH reads the command and when the ESS is at the position it needs to be to execute that code. Since MACH and the plugin have to execute the code the ESS cannot act on them as it runs mitionout if its buffer. That issue was causing a noticeable delay in the actions like turning off the DTHC before the end of a cut. We had to work with the ESS guys , the MACH guys and our programing crew to resolve it and the result was a new plugin and new version of MACH. Not the timing is is with in 20msec.

The PS members are well meaning but they mostly just go on what they have heard and seen posted.



This thread on Plasmaspider seems to say otherwise:
http://www.plasmaspider.com/viewtopic.php?f=55&t=11780

Corfabrication seems to be saying he is getting a pause in motion when trying to switch the torch off before the end of cut to prevent a divot when cutting circles.
Yes and he will from the above details. we are looking at providing a special S code to turn the torch off outside the normal OUTPUTS but there is a question about timing and feedrates. It would only work with the DTHCIV system beause it is the only one that can control the torch ON/OFF independently from MACH
Could I get some concrete information on what the latest system can and cannot do regarding pauses in motion caused by running macros. I'm wanting to upgrade my Candcnc system when funds allow.
Thanks very much,

Keith.
vmax549
Posts: 22
Joined: Sun Sep 29, 2013 4:25 pm

Re: Macros causing motion pauses

Post by vmax549 »

Hiya Tom,

iF you watch the dwell LED when you execute M3/M5 you can see a Dwell being applied when the M3 or M5 runs. IF you change out the script from DoSpinCW() to ActivateSignal(output1) /DeactivateSignal(output1) you do NOT see the dwell activate on the M3/M3 calls.

Does the M10/M10 codes work with your version of the ESS ?

Just a thought, (;-) TP
admin13o5
Site Admin
Posts: 5806
Joined: Tue Sep 03, 2013 5:39 pm

Re: Macros causing motion pauses

Post by admin13o5 »

ANY M code cause a pause in motion whether it uses the activateOuput() or the dospinCW command.or counts to 100 and rings a bell. Its the way the parsing engine works in MACH

The M10 is not handled as a valid motion code so the parsing engine basically does not want for execution and return.

The M10 will not not work with the EtherCut. It would have been a simple solution for the timing issues we saw and saved me several thousands dollars I paid out in fees, but even that will not total resolve the delay between the MACH and ESS plugin.
vmax549
Posts: 22
Joined: Sun Sep 29, 2013 4:25 pm

Re: Macros causing motion pauses

Post by vmax549 »

Interesting , one would think because the ESS handles the actual motion that it would be no problem to eliminate the pause. The ESS does run a buffer right ?

I thought I had read on Warp9's site where the M10 did work with a standard ESS ?? Could be wrong I guess(;-)

Would the CandCNC/ ESS have the same problem in LinuxCNC ?

(;-)TP
beefyandzee
Posts: 22
Joined: Sun Sep 29, 2013 4:25 pm

Re: Macros causing motion pauses

Post by beefyandzee »

vmax549 wrote:Interesting , one would think because the ESS handles the actual motion that it would be no problem to eliminate the pause. The ESS does run a buffer right ?
(;-)TP
That's what I thought the ESS was all about, and the reason it's called a "smooth" stepper. Is this not something the ESS lads can rectify.

For now is there any way in Mach to enable/disable an output with gcode without using a macro (time delay). My thoughts are to have a normally de-energised relay and the TORCH ON signal goes through a normally closed contact of this relay. A path rule can be used to enable/disable this output (relay) thereby controlling the torch off without a pause.

Keith.
admin13o5
Site Admin
Posts: 5806
Joined: Tue Sep 03, 2013 5:39 pm

Re: Macros causing motion pauses

Post by admin13o5 »

I has to do with how MACH handles the MACRO and does the execution. Its not done in the ESS and they are not on the same page of the hymn. If the ESS handled the M codes itself it would work fine. For our application the M10 was one command that could be mapped to one output and that is all it will do. You cannot write an M10 macro to add in other stuff. Even the P parametric is ignored by the ESS You can get cute and have it call an OEM trigger and do something but once again that is happening back in MACH
The ESS fills and empty's its buffer based on the parameters you set in the ESS config and its takes in trajectory commands (not G code) to use to translate and generate pulses. The ESS plugin runs in the 100 ms loop in MACH so that is as fast as it can call an internal function.

Since we have a whole slew of G-Code commands that need synchronized execution with toolpath position we have to look at the MACH buffer that may be a second old and then the ESS buffer and match them up

The ESS will not work with Linux. He is working with passion on the MACH4 plugin , we are not.

In Linux you do not need a separate buffer on the motion cards so most of the delay and sync problems all vanish.
admin13o5
Site Admin
Posts: 5806
Joined: Tue Sep 03, 2013 5:39 pm

Re: Macros causing motion pauses

Post by admin13o5 »

beefyandzee wrote:
vmax549 wrote:Interesting , one would think because the ESS handles the actual motion that it would be no problem to eliminate the pause. The ESS does run a buffer right ?
(;-)TP
That's what I thought the ESS was all about, and the reason it's called a "smooth" stepper. Is this not something the ESS lads can rectify.

For now is there any way in Mach to enable/disable an output with gcode without using a macro (time delay). My thoughts are to have a normally de-energised relay and the TORCH ON signal goes through a normally closed contact of this relay. A path rule can be used to enable/disable this output (relay) thereby controlling the torch off without a pause.

Keith.
Its a "smooth stepper" because IT generates nice even spaced pulses with no jitter. It does the motion stuff beautifully. It handles inputs less so. Technically our new DTHCIV is a smooth stepper too because when its running the Z from the DTHC code it is able to move it almost twice as fast because the waveform is pure. There are vendors that are hooking up an ESS to a PROMO THC (that uses relays for the UP & DOWN signals) and turning on the THC option in the ESS that lets you use the MACH inputs to control the Z motor. They call that good.

The ESS guys can only do so much. Part of it is the MACH3 code. You cannot get the guys at MACH to do anything with MACH3 I had to hire Art out of retirement to fix the last issue we had.

G-Code is pretty primitive and simple (on purpose) There is no G code to energize an output. I guess you could make up a G code and change the parser in MACH to do something with that G code and not break motion BUT see my statement above about that course!

Two relays in series to form an AND gate so BOTH have to be on to fire the torch. one connected as NC and tied to another output BUT how do you trigger it based on a CUT Rule without using a macro? All a cut roule does is allow you to break the XY chain and insert a G-Code "snip" that has to be valid G-Code. Then you have to deal with the fact relays turn on/off rather slowly .2 sec does not sound like a lot of time but sit down and figure out how far a torch will travle in that time with a feedrate of 225IPM (3.75 inches per second)
vmax549
Posts: 22
Joined: Sun Sep 29, 2013 4:25 pm

Re: Macros causing motion pauses

Post by vmax549 »

Tom have you thought about the OLD method (before the M10/M11/EPO.EP1 came along.

Using the direction pin of a phantom axis . Laser guys used it before art did the M10/M11 thing.

(;-) TP
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest