Hello Guest it is April 16, 2024, 05:09:18 AM

Author Topic: PROBLEM WITH LASER START-UP POWER WITH PMW MACH4 AND POKEYS  (Read 1977 times)

0 Members and 1 Guest are viewing this topic.

PROBLEM WITH LASER START-UP POWER WITH PMW MACH4 AND POKEYS
« on: November 21, 2021, 02:38:57 PM »
Hello everyone ,
I do not know if I am in the correct discussion...

I am French (sorry :) ) and I have already built my cn 2000 * 1500 * 250 in size with motors with encoders and pokeys57cnc and 4 axes.
I have mach4 and it is great for me.
now i have built a machine with electric laser, with pokeys57cnc and mach4.
I use a pmw output at 20000hz just like with my spindle of my gantry milling machine.
the laser is ordered for m03 and for power S ....
but during the increase of power, for example S0 .... S10000 or S5000 or another, I have a starting point which marks and can cross the balsa support.
I tried several settings, several post processor, but I know more.
Have you ever had the problem?
Thanks for your help

For exemple my gcode:
T1
G17
G21
M03 S0
G1 F1600.0
G0Z0.1000
G0X0.0000Y0.0000
G0X8.6869Y8.0177
G1X9.5806Y7.4906F1600.0S10000
G1X10.3921Y7.0339
G1X11.1969Y6.6265
G1X12.0061Y6.2644

Offline Tweakie.CNC

*
  • *
  •  9,195 9,195
  • Super Kitty
    • View Profile
Re: PROBLEM WITH LASER START-UP POWER WITH PMW MACH4 AND POKEYS
« Reply #1 on: November 22, 2021, 01:15:04 AM »
You should be using the dedicated laser switching commands M62Px / M63Px (where x is the Output# controlling the laser) to switch your laser ON/OFF as these commands allow switching without any delays. The S### command (and M03 / M05) unfortunately breaks the CV chain and causes a delay which will create excessive and unwanted burn marks in the work.

Some of the postings in this thread refer to the issue;   https://www.machsupport.com/forum/index.php?topic=12444.msg280664#msg280664

Tweakie.
PEACE
Re: PROBLEM WITH LASER START-UP POWER WITH PMW MACH4 AND POKEYS
« Reply #2 on: November 22, 2021, 02:27:51 AM »
Yes I understand but by controlling this output by M62Px we cannot vary the pmw power?
The output activates the laser power supply only, (OC on pokeys on / off)?
For me, I wanted to control the laser power supply by a relay so M03 and the pmw power by Sxx.
?
In the posts, I don't see that we are talking about variation with a pmw output.
Thanks
GréG

Offline Tweakie.CNC

*
  • *
  •  9,195 9,195
  • Super Kitty
    • View Profile
Re: PROBLEM WITH LASER START-UP POWER WITH PMW MACH4 AND POKEYS
« Reply #3 on: November 22, 2021, 03:23:46 AM »
Hi GréG

There have been a number of recent developments within Mach4 to enable better laser handling but I am still not certain if controlling laser switching using the S### word can be done without breaking the CV chain (and causing delays). You would need to install the latest Mach4 build and see if this function has yet been implemented.
If it has not then…
It requires a bit of work but you need to ‘gate’ the PWM signal (pulse width set with the S### word) with the M62/M63 signal. This post (and linked posts) refer to the solution which I currently use. https://www.machsupport.com/forum/index.php?topic=12444.msg265104#msg265104
The laser is enabled with the M03 command but the actual switching is always done with the M63/M63.
If you require a change to the S### word then this is done during the period when the laser is switched OFF (by the M63Px command) then there will be no excessive burn and the laser can, for example, be switched between cut and engrave power levels without issue.  Although this was done at a time before the M62/M63 command were implemented (I used my A axis direction signal) this video demonstrate the principle of laser power control. https://www.youtube.com/watch?v=8fUg6ebWut0&ab_channel=PaulMott

Hope this helps.

Tweakie.
PEACE
Re: PROBLEM WITH LASER START-UP POWER WITH PMW MACH4 AND POKEYS
« Reply #4 on: November 22, 2021, 04:38:29 AM »
Hi

I will try to put Sxx before M62 / M63.
I would really like to vary the laser power with pmw while engraving.
Currently, the M03 command activates my laser power relay and Sxx gives it power.
example
M03 S0 here the laser is operating at 0 power
G1 F1600.0 ok
G0Z0.1000 ok
G0X0.0000Y0.0000 ok
G0X8.6869Y8.0177 ok
G1X9.5806Y7.4906F1600.0S10000 and this is where the laser create excessive and unwanted burn marks
G1X10.3921Y7.0339
G1X11.1969Y6.6265

At each line executed we see a point of impact when I go from S0 to Sxx as the laser starts fully and the movement is not yet done, but it is very fast and not easy to see it but we can see the result in the photos.

Here is my problem and the question: how to vary the laser power with pwm and M62 / M63 during machining?

And what do you mean by "breaks the CV chain"  ...CV ?

Thank for your help tweakie

Offline Tweakie.CNC

*
  • *
  •  9,195 9,195
  • Super Kitty
    • View Profile
Re: PROBLEM WITH LASER START-UP POWER WITH PMW MACH4 AND POKEYS
« Reply #5 on: November 22, 2021, 07:35:25 AM »
Hi GréG,

You have to bear with me here because I am better at doing things than I am at explaining them but…

CV = Constant Velocity.

You can have a Gcode file containing many G1********* commands on many lines of Gcode which will be performed as one seamless operation within the rules of your Mach4 Constant Velocity settings. If you then insert an M3 or M5 command within those lines of Gcode the CV chain will be broken and a delay will be introduced. This delay may not be that noticeable with conventional machining but it will be noticed when using a laser.
For this reason the M62/M63 commands were introduced within Mach4 so they can be inserted into the Gcode and the file will run without breaking the CV chain. As mentioned previously I do not know about the latest Mach4 build (I haven’t tried it) but previously the S### command also broke the CV chain and that is what you are seeing in your excessive burn marks – the delay it introduces is noticeable.
It is only within the last couple of months that the Pokeys Mach4 plugin has supported the use of the M62/M63 command set so you will need to be using their latest build of the plugin and also the latest Mach4 build.

Quote
Here is my problem and the question: how to vary the laser power with pwm and M62 / M63 during machining?

If you want reliable laser operation then my best suggestion is to do as I have done and incorporate a simple circuit to gate the PWM signal with the M62/M63 signal, as I explained earlier.

Tweakie.
PEACE
Re: PROBLEM WITH LASER START-UP POWER WITH PMW MACH4 AND POKEYS
« Reply #6 on: November 22, 2021, 10:51:54 AM »
hi tweakie

No problem for your explain, me too. ;)
I understand CV better and I am going to modify a gcode this evening to make a test with M62 / 63 and above all to update all mach4 and pokeys.
Great  :)
Thank you for your help .
I'll tell you again.

GréG
Re: PROBLEM WITH LASER START-UP POWER WITH PMW MACH4 AND POKEYS
« Reply #7 on: December 07, 2021, 04:27:21 AM »
Hello
Sorry for my english.
I am coming back to you because; with mach 4 and pokeys57;
I block a little with this config with laser and pokeys and M62Px

What do you associate M62P1 with? turn on spindle?

I have to manage the supply of the spindle in 12v -> I put M03, spindle operation which turns on the laser but not the diode control (normally this is done with the pmw input)
It is also necessary to manage the power in pmw> I put a pmw pokey output (terminal 18) on the pmw input of the laser

But, how do you manage and associate M62Px so the OC relay and how to wire it?
What should he control physically, if you have an example of wiring?

I understand this Gcode:
(Tweakie.CNC)
G00G21G17G90G40G49G80
G71G91.1
T1M06
S12000M03 -> power output pmw and power on laser 12v -> it's ok
G94 M63P1 F1016.0 -> power off OC
X0.000Y0.000
G00X0.033Y15.914M63P1 -> power off OC
G1X0.033Y15.914M62P1 -> power on OC
G1X13.855Y13.140M62P1
G1X8.012Y1.013

See my picture

Thanks
GréG

Offline Tweakie.CNC

*
  • *
  •  9,195 9,195
  • Super Kitty
    • View Profile
Re: PROBLEM WITH LASER START-UP POWER WITH PMW MACH4 AND POKEYS
« Reply #8 on: December 07, 2021, 10:31:58 AM »
Hi GréG

Quote
What do you associate M62P1 with? turn on spindle?

Just make sure you have M03 in your Gcode before the M62Px is called (as in the example Gcode you have posted). M03 turns on your relay and applies power to your laser. The M03 command also enables the M62Px/M63Px commands to operate.

I appreciate the language differences here & I have tried to explain things as clearly as I can but please read my earlier Reply#5 again as this describes what you have to do.

Tweakie.
PEACE
Re: PROBLEM WITH LASER START-UP POWER WITH PMW MACH4 AND POKEYS
« Reply #9 on: December 07, 2021, 02:50:34 PM »
Hello again
I reread your post and understood that M3 allows M62Px to work so the gcode is ok.
S12000M03 -> power output pmw and power on laser 12v -> it's ok
G94 M63P1 F1016.0 -> power off OC
X0.000Y0.000
G00X0.033Y15.914M63P1 -> power off OC
G1X0.033Y15.914M62P1 -> power on OC
G1X13.855Y13.140M62P1
G1X8.012Y1.013

But I don't know if I am configuring M62Px correctly.
I associated Spindle on (therefore M3) with relay 1 and spindle forward with relay OC 1.
But how and where is it declared that M3 = spindle on and where is written that M62P1 + = *********X?
Following the tests M62 / M63Px does not work with the gcode (above), M3 activates relay 1 and relay OC but M63P1 does not cut OC.

I saw that some added scripts to associate M62Px with the OC relay of pokeys?
Also following the last version of mach4 I have a very strange screen.

See my photos
Thank you for your patience