Hello Guest it is August 18, 2019, 12:05:44 PM

Author Topic: How to speed up simple G Code  (Read 21403 times)

0 Members and 1 Guest are viewing this topic.

How to speed up simple G Code
« on: February 04, 2013, 04:52:23 PM »
Here is my simple G code for a tying machine-M3, M7 and M8 run solenoids.
X and Y are servos for a wire feed and a wire twister -
The cycle takes about 3.5 Seconds - I need to run in 2.25 Seconds and most of the time seems to be in the execution between comands and not the servo speeds.
Anyone's help would be worth some money
Thanks
Jack Hoffa  714-990-5980  (cell 714-404-7159)
jack.darlene.hoffa@roadrunner.com


M3
G91G0X19
M8
G0X-13
G0Y.6
M7
M9M5
G0Y2.4
M30
Re: How to speed up simple G Code
« Reply #1 on: February 05, 2013, 05:47:46 PM »
Jack,
You might try the M10/P* / M11P* (off/on) commands.  They don't have a time delay associated with them as M3 (other Ms?) do.

I don't know if you can use more than one output though, but you might try replacing the M3 first to see if it helps.  I also haven't tried, but maybe also use E10/E11 commands for another output.  If I am wrong, someone will hopefully jump in with corrections/another suggestion.

Regards,
John Champlain

Offline Tweakie.CNC

*
  • *
  •  7,882 7,882
  • Super Kitty
    • View Profile
    • Tweakie.CNC
Re: How to speed up simple G Code
« Reply #2 on: February 06, 2013, 02:29:38 AM »
Hi Jack,

It is as John has said - these commands are indeed faster but the M11P*/ M10P* command set execute in a different way and are perhaps primarily intended for laser switching.

The M3/M7/M8 are ‘stand alone’ commands (they will execute when called).

The M11P1 (turn on Output #1), M11P2 (turn on Output #2) etc. are ‘linked’ commands (they will only execute after an axis has started it’s movement).

So it may be possible to increase speed by using these commands but it would depend on the design of your machine and the speed of the solenoid operation etc. etc.

Tweakie.
Success consists of going from failure to failure without loss of enthusiasm.  Winston Churchill.
Re: How to speed up simple G Code
« Reply #3 on: February 06, 2013, 02:19:45 PM »
 ::)
Thanks you guys

This is very important to us

Where do I find out about these commands, and how they work?

I am using a smooth stepper, so could use a second Breakout board I think

Any help on this would be greatly appreciated

Jack Hoffa
jack.darlene.hoffa@roadrunner.com
Re: How to speed up simple G Code
« Reply #4 on: February 06, 2013, 03:01:04 PM »
John What are E10/E11 commands

Jack
Re: How to speed up simple G Code
« Reply #5 on: February 06, 2013, 09:38:10 PM »
Jack,
I haven't used them, but same as M10/M11 commands as far as I know.  Tweakie does use them.  Both M10P*/M11P* and E10P*/E11P* are not well documented, and only work properly in later versions (post Ver. 057 ?) of Mach3.

To get M11 (or others) to work, enable an output (ex. Output1) and assign it to an output pin.  Then issue the command for Output1 On (M11P1) followed immediately by a G0 or G1 command, either on the same line or the next.  The G0/G1 command can be either a needed axis move or a dummy axis move (such as G1 C0).  The output1 pin will turn on immediately when the axis move begins.  Repeat to turn it off with the M10P1 command.

John
Re: How to speed up simple G Code
« Reply #6 on: February 06, 2013, 11:12:55 PM »
Thanks John
It sounds a little (more than a little) tricky, but I will be trying very hard tomorrow.
I think I have the latest version of Mach3
Tweakie - could you lend a hand with your expertise
It is very important and could lead to many Mach3 comercial units

waiting - but very excited

Jack

Offline Tweakie.CNC

*
  • *
  •  7,882 7,882
  • Super Kitty
    • View Profile
    • Tweakie.CNC
Re: How to speed up simple G Code
« Reply #7 on: February 07, 2013, 03:05:57 AM »
Hi Jack,

I think John has described the operation of these commands perfectly and I can only repeat what he has already said.

The M and E commands perform exactly the same function (M10P1 = E1P0 and M11P1 = E1P1) so to avoid confusion I will just stick with the M commands.

A typical GCode sequence could be something like this;

G0 B0   (zero imaginary Axis B)
M11P1 
G0 B1   (Output #1 switched on at this point)
M11P2 
G0 B0   (Outputs #2 switched on at this point)
M10 P1
G0 B1   (Output #1 switched off at this point)
M10 P2
G0 B0   (Output #2 switched off at this point)

Etc.

There has to be an axis movement following the M10 / M11 command in order for it to execute and I often use an ‘imaginary’ axis B which has been configured at minimal steps per unit with maximum Velocity and Acceleration if there is no ‘real’ axis movement to follow the M command (this may sound a bit strange but some software (such as DotG) requires a trigger point whilst the X,Y & Z axes are all stationary).

Execution time differences, measured some while ago, was 100mS for the M3 command and 2mS for the M11P1 command so there could be some advantage for your application and the best bet would be to just try it and see if you can achieve any improved results.

Tweakie.
Success consists of going from failure to failure without loss of enthusiasm.  Winston Churchill.
Re: How to speed up simple G Code
« Reply #8 on: February 07, 2013, 08:40:20 AM »
Thank you both soo much for your help

I'm off to try this

Jack

Offline Tweakie.CNC

*
  • *
  •  7,882 7,882
  • Super Kitty
    • View Profile
    • Tweakie.CNC
Re: How to speed up simple G Code
« Reply #9 on: February 07, 2013, 10:16:52 AM »
Good fortune Jack - I hope it works for you.  ;)

Do please let us know how it went.

Tweakie.
Success consists of going from failure to failure without loss of enthusiasm.  Winston Churchill.