Machsupport Forum

G-Code, CAD, and CAM => G-Code, CAD, and CAM discussions => Topic started by: lawrencek on October 04, 2019, 12:52:42 PM

Title: sainsmart 3018 MX3 laser does not immediately honour M3/M5
Post by: lawrencek on October 04, 2019, 12:52:42 PM
The laser does not immediately obey M2 and M5.
(I'm Using Freecad, which does not issue motor off when G0.
So I edited the file and added M3/M5 at the correct places.)

Problem - the laser comes on before the G0's are complete, and
goes off before the cutting is complete.

I have added G4 P 2 commands and this fixes the problem, but the
laser is on for a short time before moving and after stopping.

Why do I need these delays (using PWM). Can I not turn the laser off/on
immediately. I also notice the delay when I press "spindle CW F5".

I saw that I could use M10 or M11 to do this but I cannot set this up.

Sainsmart say that Drufel (another CNC controller S/W does not have this problem.

Lawrence
Title: Re: sainsmart 3018 MX3 laser does not immediately honour M3/M5
Post by: Tweakie.CNC on October 05, 2019, 02:52:16 AM
Hi Lawrence,

The M3/M5 commands are far too slow for laser work and that is why the M11/M10 commands were introduced.
The M11/M10 commands need to specify an Output# and be followed by an axis (any axis) movement to take effect then the laser is only turned ON and OFF consistent with an axis movement.

In my case I am using Output#1 to switch my laser and so my commands would be M11P1 to turn the laser ON and M10P1 to turn the laser OFF. To initialise the laser I also need an M3 at the start of the Gcode.

If it is any help I have attached your code which has been modified to suit the M11/M10 commands.

Tweakie.
Title: Re: sainsmart 3018 MX3 laser does not immediately honour M3/M5
Post by: lawrencek on October 05, 2019, 04:50:56 AM
Thanks for the reply, and especially for modifying my code for me.

Since iy is a OEM board I do not know which output to select for the M10/M11.

How do I find the output for the laser? I do not have a manual for the board. I could just do trial and error, especially as I have your working code. Are there any settings in MACH3 I should change?

Thanks

Lawrence
Title: Re: sainsmart 3018 MX3 laser does not immediately honour M3/M5
Post by: Tweakie.CNC on October 05, 2019, 05:01:26 AM
Quote
Are there any settings in MACH3 I should change?

Hi Lawrence,

Are you using the LPT Parallel Port or are you using an external Motion Controller ?
Can you post a picture of your OEM board so it can be identified ?

Tweakie.
Title: Re: sainsmart 3018 MX3 laser does not immediately honour M3/M5
Post by: lawrencek on October 05, 2019, 07:07:08 AM
Thanks for your reply.

I am using USB, and I enclose photos of the board. It is "MACH3 controller for mini CNC" and I have versions 1.3 and 3.1. They look basically the same.

If I use drufel CNC :( it shows the board USB number. I am told the Drufel does not have the M3/M5 delay, but I doubt it.

It looks as if output1 is active, and this might be the laser. I will try your file and let you know.

Are there any MACH3 setting I should know aboit? I have tried them all with M3 and M5.

I would love to get a manual for the board, and even a schematic: 2 boards blew up and I changed the regulator, but I could then find out why.

Thanks for your help.

Lawrence
Title: Re: sainsmart 3018 MX3 laser does not immediately honour M3/M5
Post by: Tweakie.CNC on October 05, 2019, 08:26:02 AM
Hi Lawrence,

Your USB board does not support the use of the M11/M10 command set so it looks like you are back to the beginning.

Your options would seem to be...

Get another (higher spec) motion controller  (US or EU origin not Chinese) suitable for use with Mach4.

Try Drufel. Unfortunately this is a low-end controller using HPGL1 for it's image to Gcode conversions but it does have built-in laser routines.

Sorry I can't be of much help with finding a solution.

Tweakie.
Title: Re: sainsmart 3018 MX3 laser does not immediately honour M3/M5
Post by: lawrencek on October 08, 2019, 04:18:34 PM
Do you know where I can get info on this board? A manual?

It has an option jumper for M3/Z, apparently you can switch the laser on with Zaxis control.But I cannot get it to even come on at all with this option.

Lawrence
Title: Re: sainsmart 3018 MX3 laser does not immediately honour M3/M5
Post by: Jdlong27 on November 10, 2019, 12:23:44 PM
Hi Lawrence! Did you ever come up with a fix? I have the same mx3 and their 5.5 w laser. I got it set up to have zero lead in or out and close the burn fully without turning off early. But I have not been able to get it to not burn in each start. Lots of research shows its the "spindle spool up" time built into the m03. So did you ever get an m10px to work or swap boards or...? Thanks!

Jason
Title: Re: sainsmart 3018 MX3 laser does not immediately honour M3/M5
Post by: lawrencek on July 19, 2020, 04:57:04 PM
I have posted before on this subject and am now trying again.

It seems as if the commands overlap, the laser does not come on immediately on M<on>G1 and on M<off>G0.#

I had hoped (it may yet) that the G4<pause> command would have forced this. A pause does seem to help as I am restarting the project.

What synchronizing commands are there in MACH3?

How can determine the ports and pins for the M10/M11 commands?

BTW, do you know of any other MACH3 boards for the Sainsmart 3018MX3?

Lawrence

Title: Re: sainsmart 3018 MX3 laser does not immediately honour M3/M5
Post by: Tweakie.CNC on July 20, 2020, 01:21:01 AM
Hi Lawrence,

The M11 / M10 commands are followed with Px (where x is the Output# set with the Port and Pin number that is connected to the laser trigger). For example M11P1 will switch Output#1 ON and the Pin that is specified for Output#1 (Config / Port & Pins / Output Signals) will be switched accordingly but only at the instant of axis (any axis) movement. There is an additional safeguard that M3 must be active at the same time. Likewise M11P1 turns Output#1 OFF. This all happen without the delays associated with the other M commands.

It may sound a little complicated to start with but it is usually all taken care of by the Post Processor being used with the CAD/CAM.

Tweakie.
Title: Re: sainsmart 3018 MX3 laser does not immediately honour M3/M5
Post by: lawrencek on July 20, 2020, 04:26:32 AM
I will try that. I did not realise that the M10/M11 needed to be followed by the P1 command (in this case). I had used G4 with P, then of course the P was the parameter to G4.

I had tried S********* for ON and S0 for off, and was looking at the motor tuning for speed ram

Lawrence
Title: Re: sainsmart 3018 MX3 laser does not immediately honour M3/M5
Post by: Tweakie.CNC on July 20, 2020, 05:43:19 AM
I will try that. I did not realise that the M10/M11 needed to be followed by the P1 command (in this case). I had used G4 with P, then of course the P was the parameter to G4.

I had tried S********* for ON and S0 for off, and was looking at the motor tuning for speed ram

Lawrence

As I mentioned in an earlier posting your existing controller does not support using the M11/M10 commands.
 

This SainSmart blog mentions using the Z axis but if, like me the Z axis is used for laser focus then an imaginary axis (the A or B axis) can be used.
https://docs.sainsmart.com/article/xjgmz9pvni-how-to-laser-engrave-with-the-mx-3

However, be aware that gating the signals may be necessary to enable EStop to switch the laser OFF and ensure operator safety.
This post relates; https://www.machsupport.com/forum/index.php?topic=12444.msg265104#msg265104


Tweakie.


Title: Re: sainsmart 3018 MX3 laser does not immediately honour M3/M5
Post by: lawrencek on July 23, 2020, 05:54:44 AM
Hi there,

Yes you did mention the board not supporting M10/M11 commands.

I have tried the ZDIR, and this tums in the LED on the board, but not the laser. Did you get it to work and did you have special settings
I have made a sample test, and this toggles the LED on the board, but does not turn on the laser.

By this I claim that their application note does not work.
Have you got it to work?

Lawrence
Title: Re: sainsmart 3018 MX3 laser does not immediately honour M3/M5
Post by: lawrencek on July 25, 2020, 11:59:50 AM
Hi there Tweakie,

I have been playing with the Mach3 Macros and found out why the M10 and M11 commands do not work. It's not the board, it's just because the macros M10 and M11 work on output9 and this is not set up for this board. They also do not refer to the first parameter P either.

I have written two other macros based on these, and these seem to have fixed the problem.

Do you still use this board? Then you can try them. What a labour!! Separates the men from the boys I suppose!

Sainsmart do not know MACH3 evidently, so they could not help, but I
am waiting on their reply to the ZDIR problem.

Lawrence
Title: Re: sainsmart 3018 MX3 laser does not immediately honour M3/M5
Post by: Tweakie.CNC on July 26, 2020, 01:13:36 AM
Hi Lawrence,

I am pleased to hear that you have found a solution to the problem.

Tweakie.
Title: Re: sainsmart 3018 MX3 laser does not immediately honour M3/M5
Post by: lawrencek on July 26, 2020, 04:34:46 AM
Do you still use that board, and what are you doing right now?
Do you still have that problem?
You could test my ideas

Lawrence
Title: Re: sainsmart 3018 MX3 laser does not immediately honour M3/M5
Post by: Tweakie.CNC on July 26, 2020, 05:22:39 AM
Hi Lawrence,

Sorry but I do not have the SainSmart board so cannot test your idea.

Tweakie.