Hello Guest it is March 28, 2024, 07:00:53 AM

Author Topic: Turn laser on and off for reference.  (Read 2655 times)

0 Members and 1 Guest are viewing this topic.

Turn laser on and off for reference.
« on: December 21, 2019, 09:06:18 PM »
Hey guys I feel like this should be an easy fix but it’s not working for some reason for me. So I am using a ethernet smooth stepper with Mach3
And my laser is working great using M10/M11. All I am looking to do is turn the laser on at say 2% percent to jog it to my zero position for reference and then shut it off after I find my home zero position. My screen set  already has a button for laser on I just need to figure out how to trigger the laser on at 2% power and keep it on until I click the button again. I can use screen4 to edit the existing button but I’m not sure what commands to call to turn on the laser.
Any ideas?
Re: Turn laser on and off for reference.
« Reply #1 on: December 21, 2019, 09:20:20 PM »
I should follow up by saying I have tried M3 S2 in MDI no luck.
Re: Turn laser on and off for reference.
« Reply #2 on: December 21, 2019, 10:12:38 PM »
if my m11/10 only works at first movement how do I trigger my output 1"laser" at 2% PWM until I call for trigger off again? hmm...

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: Turn laser on and off for reference.
« Reply #3 on: December 22, 2019, 01:20:08 AM »
As with most things there is always more than one way.
My solution to switching my laser ON/OFF at any power setting is to gate the M10/M11 signal with the PWM signal. If it is any help to you this is described here; https://www.machsupport.com/forum/index.php?topic=12444.msg265104#msg265104

Tweakie.
PEACE
Re: Turn laser on and off for reference.
« Reply #4 on: December 22, 2019, 02:11:57 PM »
Thanks. I looked at that but I think it’s above my comprehension level right now. Just starting to learn laser side of things. And admittedly not really well-versed in Mach3 either. Been doing lots of reading so I’m learning quite a bit but I haven’t figured anything out yet with regards to simple on and off through Mach3 control. Is this a downside of using the M 10/11 commands? Seems like it should be very simple to call for the laser to turn on at a certain percentage of power.
« Last Edit: December 22, 2019, 02:13:30 PM by cdelicath »
Re: Turn laser on and off for reference.
« Reply #5 on: December 22, 2019, 07:13:41 PM »
Hi,

Quote
Seems like it should be very simple to call for the laser to turn on at a certain percentage of power.

It is, you call  Snnn in Gcode and your nominated PWM output pin will assume a voltage proportional to nnn. This is how a spindle
is controlled and can be used also to modulate a laser.

M10/M11 are to synchronize the laser output to axis movement, a refinement if you like. You might choose not to use M10/M11
in the first instance just the normal M3/M4/M5 commands. The reason for M10/M11 will become clear then.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Turn laser on and off for reference.
« Reply #6 on: December 22, 2019, 07:39:58 PM »
Is there anyway to assign G code to a on/off button in Mach3?

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: Turn laser on and off for reference.
« Reply #7 on: December 23, 2019, 02:02:42 AM »
Is there anyway to assign G code to a on/off button in Mach3?

Yes there is but you will need to add a VB button to your screen. This is done with a screen editor; https://www.machsupport.com/downloads-updates/screensets/

Then a VB script or macro is created and added to the new button. It's easy enough to do but there is some learning to be done.

Tweakie.
PEACE
Re: Turn laser on and off for reference.
« Reply #8 on: December 23, 2019, 05:43:10 PM »
Thanks guys I’m going to look into putting it in a script now. Need to read all about that. I guess I didn’t realize I had to run it as a G code. I was thinking it may be something native to Mach3 that I could use as a command directly in MDI. Thanks again now I got some reading to do..

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: Turn laser on and off for reference.
« Reply #9 on: December 24, 2019, 05:57:28 AM »
Quote
Thanks again now I got some reading to do..

 ;)
PEACE