Synchronising G01 and M106 command (laser engraving)

Post Reply
Tparent
Posts: 39
Joined: Sun Sep 30, 2018 3:54 pm

Synchronising G01 and M106 command (laser engraving)

Post by Tparent » Sun Aug 04, 2019 10:49 pm

Dear all,

I'm trying to synchronise the start/stop of an engraving laser.

The code looks like the following :

Code: Select all

M107 P2 
G28 
G0 Z50
G0 X127.6479 Y140.893923 F1200
M106 P2 S100 ; Laser ON
...
What is happening is the activation of the M106 P2 S100 (laser ON) just after the G28 (home completion) and therefore before the completion of the expect move to position the head :

Code: Select all

G0 Z50
G0 X127.6479 Y140.893923 F1200
All ideas are welcome

Thanks
i3 B + i3 C + i3 M201 + A10 + A10m + A30
(+3 x Kossel)
Mostly PLA

User avatar
_kaktus_
Site Admin
Posts: 1260
Joined: Fri Dec 15, 2017 10:06 pm
Location: PL
Contact:

Re: Synchronising G01 and M106 command (laser engraving)

Post by _kaktus_ » Mon Aug 05, 2019 1:51 am

Hello.
:mrgreen:

Which printer are you trying to use to execute this code :?:

While working on M201 I noticed a similar discrepancy in the execution of commands. :roll:

When I was developing the test script, from time to time I was sending a message to the LCD. The effect was that all messages were performed earlier than expected.
I haven't investigated the reason for this yet. However I expect that firmware interprets some commands differently.

The puzzling thing is that so far I haven't noticed this happening during normal printing. :lol:

Did you try G1 code instead of G0?
On the forum I help to use the rod, I don't give fish.
Geeetech Prusa I3 M201 Dual extruder Mixcolor 3D printer, bought 2017-12-19, already built, in the cognitive and improvement phase
Geeetech filament, ABS only
Geeetech 3D WiFi Module for 3D Printer, bought 2018-04-15, He got a new life, and still lies in a drawer.
Positively frenzied customer of Getech Technology.

Tparent
Posts: 39
Joined: Sun Sep 30, 2018 3:54 pm

Re: Synchronising G01 and M106 command (laser engraving)

Post by Tparent » Mon Aug 05, 2019 3:39 am

Hi,

Thank you for your fast answer.

Yes the printer is a M201 with a GTM32 pro VB board. I tried two version of FW (1.03 and 1.04) without improvement.

Numerous test with a lot of M and G command (delay waiting etc..) in interactive or SD card execution without finding any solution.
At the end, to avoid the laser inconvenience, I replace the M106 by M115 (display message on LCD) and confirm your diagnostics (G command execution is not performed in the same thread (or with a buggy synchronization) than main GCODE flow.

It's looking like :
- M106 (FAN ON) executed)
- "a buffer" filled with G command (until the buffer full) executed whatever they will be the M107 insert between them
- when the buffer is empty, execution of the M107

Too bad. If it is a bug, I dont believe that any support/development team is still active

Yes I tried G1
i3 B + i3 C + i3 M201 + A10 + A10m + A30
(+3 x Kossel)
Mostly PLA

User avatar
William
Site Admin
Posts: 6340
Joined: Tue Jun 07, 2016 9:38 am

Re: Synchronising G01 and M106 command (laser engraving)

Post by William » Mon Aug 05, 2019 9:53 am

Hi, Are the fans you are referring to as cooling fans?
The cooling fan needs to be turned on for heat dissipation when printing.
-Keep your mind and try to test it. :)
-Everything will be fun!-Support all Getech printer.
-You can ask me the questions and I will kindly reply.
-Respect others is the best way you can get help!

User avatar
_kaktus_
Site Admin
Posts: 1260
Joined: Fri Dec 15, 2017 10:06 pm
Location: PL
Contact:

Re: Synchronising G01 and M106 command (laser engraving)

Post by _kaktus_ » Mon Aug 05, 2019 1:49 pm

Tparent wrote:
Mon Aug 05, 2019 3:39 am
...
I replace the M106 by M115 (display message on LCD) and confirm your diagnostics G command execution is not performed in the same thread (or with a buggy synchronization) than main GCODE flow.
...
You mean M117?

I'd love to see what Gcode looks like after your adjustments.

I can unofficially say that I expect good changes for M201, in some time. They will also cover firmware changes.
However, GT will no longer develop the old firmware for M201.
Once there were attempts to develop firmware. However, the project was unexpectedly terminated in strange circumstances.
If I could gather a group of advanced, trusted M201 users, I could try to do something about it. :D
William wrote:
Mon Aug 05, 2019 9:53 am
...
The cooling fan needs to be turned on for heat dissipation when printing.
...
.
Yes, William, you're right.
However, a colleague speaks of an alternative application.
The fan control is used for other purposes.
On the forum I help to use the rod, I don't give fish.
Geeetech Prusa I3 M201 Dual extruder Mixcolor 3D printer, bought 2017-12-19, already built, in the cognitive and improvement phase
Geeetech filament, ABS only
Geeetech 3D WiFi Module for 3D Printer, bought 2018-04-15, He got a new life, and still lies in a drawer.
Positively frenzied customer of Getech Technology.

Post Reply