Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: morgan46 on March 21, 2017, 03:59:02 PM

Title: m11 and m10 commands
Post by: morgan46 on March 21, 2017, 03:59:02 PM
hi you lovely people
I am having trouble using the m10 and m11 commands
I have read a lot of threads but no luck
I am able to turn my laser on - off with the spindle or m3 m5 commands
in the motor outputs I have it set as step pin 2 step port 1
output signal is set to port1 pin3
spindle set up is use motor outputs pwm

so I tried m11p1
              g0 z1
to turn on laser and nothing

can somone please tell me what I am doing wrong
Title: Re: m11 and m10 commands
Post by: morgan46 on March 21, 2017, 04:12:05 PM
another question when I look at the m11 m10 commands most of them are rem out is this correct
Title: Re: m11 and m10 commands
Post by: Tweakie.CNC on March 22, 2017, 03:03:03 AM
Set Output#1 to the port and pin number which is connected to your laser trigger. Set active High / Low, as appropriate.

This Gcode will turn on Output#1 and activate the pin number you have specified above.

G0 Z0
M11P1
G0 Z1

(the G0 Z0 is only there to make sure that G0 Z1 is an actual movement as far as the DRO is concerned)

Can you explain what you mean by "when I look at the m11 m10 commands most of them are rem out" ???

Tweakie.



Title: Re: m11 and m10 commands
Post by: morgan46 on March 22, 2017, 05:11:50 PM
hi sorry for the delay in getting back to you had to go to work

when I have a look ie edit the m10 or m11 commands they look like this

rem #define DIGTRIGGER  0 rem #define ENABLE1     1 rem #define ENABLE2     2 rem #define ENABLE3     3 rem #define ENABLE4     4 rem #define ENABLE5     5 rem #define ENABLE6     6 rem #define EXTACT1     7 rem #define EXTACT2     8 rem #define EXTACT3     9  rem the following de-activates signal 9 (EXTACT3)  DeActivateSignal(  9 )

Title: Re: m11 and m10 commands
Post by: Tweakie.CNC on March 23, 2017, 02:23:02 AM
I now understand about the rem's  ;)

The only thing that the M10 / M11 are required to do is ActivateSignal(9) / DeActivateSignal(9)

Tweakie.
Title: Re: m11 and m10 commands
Post by: morgan46 on March 23, 2017, 01:26:55 PM
great thank you
still cant get the m commands to work but I am sure I will just a bit more reading
it will help me understand how everything works
Title: Re: m11 and m10 commands
Post by: Tweakie.CNC on March 23, 2017, 02:03:24 PM
This may help  http://hobbycncart.com/publ/cikkek/mach3_temaju_cikkek/switching_a_laser_under_mach_control/8-1-0-29

Tweakie.
Title: Re: m11 and m10 commands
Post by: morgan46 on March 23, 2017, 03:51:23 PM
I HAVE THE M11 COMMAND WORKING
IT IS TURNING PORT 1 ON AND OFF
I CAN CONTROL MY LASER ON AND OFF ALSO POWER UP AND DOWN WITH THE SPINDLE BUTTON OR DRO WHAT EVER ITS CALLED
MY MOTOR OUTPUT IS SET TO STEP PIN2   DIR PIN1    STEP PORT 1   DIR PORT1

SPINDLE SET UP I HAVE ENABLED RELAY CONTROLE OUTPUT1
WHEN I USE THE M11 COMMAND IT TURNS ON PORT 1
I HAVE OUTPORT 1 SET TO PORT1 PIN2

STILL CANT SEE WHAT I AM DOING WRONG

Title: Re: m11 and m10 commands
Post by: morgan46 on March 23, 2017, 03:56:10 PM
PS THANKS FOR THE LINK
I HAVE READ IT SEVERAL TIMES
USING AN AXIS DIR PORT TO TURN LASER ON AND OFF IS MY LAST RESORT
I AM DETURMINED TO USE THE SPINDLE PWM
PPS THANK YOU FOR YOUR HELP I THINK I HAVE READ JUST ABOUT ALL THE POST YOU HAVE POSTED ON MOST FORUMS
REGARDING M10 M11 AND HAVE LEARNED LOTS ABOUT MACH3
Title: Re: m11 and m10 commands
Post by: Tweakie.CNC on March 24, 2017, 02:52:43 AM
You cannot duplicate pin number functions without causing a conflict. If you are using Port1 Pin2 as your Spindle Step pin then you cannot also use Port1 Pin2 for Output#1.

You have probably seen this already but by far the simplest solution to using PWM laser power control is described here :  http://www.cooperman.talktalk.net/files/27_files/Page1020.htm
http://www.tweakie.byethost10.com/27_files/Page1020.htm

Tweakie.

EDIT; Link updated.
Title: Re: m11 and m10 commands
Post by: morgan46 on March 24, 2017, 11:49:49 AM
thank you for your patience
I think I now know how to get it working
Title: Re: m11 and m10 commands
Post by: Tweakie.CNC on March 25, 2017, 02:42:55 AM
Excellent.  ;)

Tweakie.
Title: Re: m11 and m10 commands
Post by: L2_use_cnc on March 25, 2018, 08:14:22 PM
Hi all,

I've been a lurker here for some time and always found what I was looking for.  However at present I'm coming up with a problem I cant seem to find an answer to, so hoping someone will point me in the right direction.

I've used Mach3 for a couple years now on a diy router without much problem.  However recently I decided to setup a laser diode to it and set it up using m3 & m5.  That worked but had to much delay creating burn spots at end points, so I've tried to go with M10P1 & M11P1.  M10P1 & M11P1 works much better and no longer have a delay, am able to burn simple line drawings and text engraving.  But the problem I have is when I exit Mach3 I persistently receive error 9991 asking me if I want to recover and then a second popup about the application crash asking to send the log to Microsoft.  I get this on my cnc control pc (Winxp Pro SP3) and a similar app crash on my CAD PC running Window 7 both have 3.043.066.  

I've tried a number of things to resolve, uninstalled all plugins, uninstalled Mach3 completely and reinstalled fresh clean version afer deleting the C:\mach3 folder,  Installed older version Mach3 3.043.062, Tried different Output#,  Tried different Pin#.   The way I've determined it's a problem with M10 & M11 was to take the same file and replace M10P1 & M11P1 with M3 & M5,  No error with M3 & M5 but always get it 100% of the time if I switch the code to M10 & M11.  

Thanks in advance for anything you can advise.
Title: Re: m11 and m10 commands
Post by: Tweakie.CNC on March 26, 2018, 01:36:35 AM
Are you using the LPT parallel port or an external motion controller ?

Tweakie.
Title: Re: m11 and m10 commands
Post by: L2_use_cnc on March 26, 2018, 01:58:06 AM
Hi Tweakie,

I've tried it with both LPT and UC100.   My CNC control machine has the UC100 and my CAD/CAM pc does not and is basically a simulator for me.  Since it seems to run fine at least up until I exit Mach3 it's making me think I may have something wrong with my post processor or syntax of gcode??  I don't know I'll attach a portion of the gcode I've been testing with maybe you can see something I'm missing.

Thanks
Title: Re: m11 and m10 commands
Post by: Tweakie.CNC on March 26, 2018, 02:39:34 AM
Your sample Gcode runs just fine here and no shutdown errors etc.

I think you should look at your post processor to remove the G4 P0 as these are not necessary and may cause problems also make sure that your Gcode finishes with M10P1 and an axis movement (perhaps G0 X0 Y0) then a null character such as % (to ensure the CR).

Tweakie.
Title: Re: m11 and m10 commands
Post by: L2_use_cnc on March 26, 2018, 02:52:28 AM
Thanks tweakie,

That's a small portion of the actual file only about 200 lines which is enough for me to get the error.  There are finishing moves at the end that turns off laser and homes the machine.  I thought the same about the dwell moves just haven't spent time to try to figure out how to remove it yet.  I'll work on that tomorrow and try to isolate the problem further.

Thanks
Title: Re: m11 and m10 commands
Post by: L2_use_cnc on March 26, 2018, 03:03:07 PM
To update on this I've found I've been fighting myself a bit on this testing on two dissimilar systems but neither having an actual physical LPT port and ending up with similar errors when exiting Mach3 when using M10 & M11.  I've taken my old cnc control pc which does have a LPT and re-established connectivity to the router & laser diode still using M10P1 & M11P1 and all worked fine.  In addition I've been able to remove the G4 from the Inkscape script. 

So my best guess is that although Mach3 moves and fires the laser via redirection of the UC100 there's possibly a remnant of code that requires a physical LPT port in Mach3 when using  the M10P# or M11P#???  IDK I'd be interested to know if anyone else has been able to utilize the M10P#, M11P# commands without error on any of their systems that don't physically have a LPT and using a UC100? 

Thanks
Title: Re: m11 and m10 commands
Post by: Vogavt on April 22, 2018, 09:47:05 PM
I have the XHC MK-IV v5 and haven't been successful yet but I have an email to their tech support.
Title: Re: m11 and m10 commands
Post by: chuck767 on July 03, 2019, 02:38:10 AM
Hi Tweakie
This link is no longer available, http://www.cooperman.talktalk.net/files/27_files/Page1020.htm

have you reposted it?

Thanks,
Chuck
Title: Re: m11 and m10 commands
Post by: Tweakie.CNC on July 03, 2019, 03:20:55 AM
Hi Tweakie
This link is no longer available, http://www.cooperman.talktalk.net/files/27_files/Page1020.htm

have you reposted it?

Thanks,
Chuck

Hi Chuck,

The re-post is here;  http://www.tweakie.byethost10.com/27_files/Page1020.htm

Tweakie.
Title: Re: m11 and m10 commands
Post by: chuck767 on July 03, 2019, 11:09:45 AM
Thanks Tweakie
 Great website, hadn’t seen this before.
Chuck