Jump to content

Recommended Posts

Posted · Strange behavior of GCode M140 @ UMO ??

It seems that M140 has no effect on my UMO...

The display does not show any temperature set nor any clicking of my relais using the M140 command.

I´ll try to use this commands for switching on/off a laser attachement via M140 S100 and M140 S0.

Here is a code snip for a 100x100mm square that I generated via an modified postprocessor for testing purposes:

;HEADER

G21 ;metric values

G90 ;absolute positioning

G28 X0 Y0 ;move X/Y to min endstops

G28 Z0 ;move Z to min endstops

M106 ;heatsink assistance - fan ON

;RAPID MOVE

M104 S0 ;laser off

G0 X49.960 Y49.960 Z8.000

;Plunge Move

M140 S0 ;laser off

G1 Z1.000

;FIRST_FEED_MOVE

M140 S100 ;laser on

G1 Y150.040

;FEED_MOVE

G1 X150.040

;FEED_MOVE

G1 Y49.960

;FEED_MOVE

G1 X49.960

;Plunge Move

M140 S0 ;laser off

G1 Z0.000

;FIRST_FEED_MOVE

M140 S100 ;laser on

G1 Y150.040

;FEED_MOVE

G1 X150.040

;FEED_MOVE

G1 Y49.960

;FEED_MOVE

G1 X49.960

;Retract Move

M140 S0 ;laser off

G1 Z8.000

;FOOTER

M140 S0 ;laser off

;FOOTER

M140 S0 ;laser off

G91 ;relative positioning

G1 Z+5 X-20 Y-20 ;move Z up a bit aside

G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way

G90 ;absolute positioning

G0 Z80 ;move platform down

M107 ;heatsing assistance - fan OFF

M84 ;steppers off

Does anybody have an idea??

Any hints/advices???

 

  • Link to post
    Share on other sites

    Posted · Strange behavior of GCode M140 @ UMO ??

    Japp, sure, I place a switch in my heated bed wiring to change between heated bed and laser depending on the task.

    Nevertheless, it seems that M140 has no effect...

    I think, I should see at least the temperature change at the display.

    Did a further trial today but honestly, my knowledge ends rapidly... :sad:

     

  • Link to post
    Share on other sites

    Posted · Strange behavior of GCode M140 @ UMO ??

    Ok, today I made a new attempt - soldered a few LEDs to the UMO to see what happens...

    It seems that the M140 command switches the HB with a delay of a few seconds and that´s too slow for controlling the a laser on/off.

    Don´t know why...

    Next trial was to set a Pause between the M140´s and there at least the Ulticontroller acted as expected - again, the output was too slow to follow...

    So, seems that good advice is absolutely needed... but unfortunately something rare...

    Any hints appreciated !!

     

  • Link to post
    Share on other sites

    Posted · Strange behavior of GCode M140 @ UMO ??

    Strange that it does that. If I were you, I would look at using one of the unused I/O pins and manipulate it via M42

    Just know that some pins are "protected". Typically, they are the ones in use.

     

  • Link to post
    Share on other sites

    Posted · Strange behavior of GCode M140 @ UMO ??

    That might be worth trying... But afaik this is only a 5V supply and I thought connecting my laser directly at 19V...

    Pin13 should be easy to use. I'll try...

  • Link to post
    Share on other sites

    Posted · Strange behavior of GCode M140 @ UMO ??

    Yes, those are 5V pins and can't sink/source a lot of current so you will need some kind of high capacity drive like a MOSFET / transistor depending on what you are driving like http://www.instructables.com/id/Connecting-a-12V-Relay-to-Arduino/

     

  • Link to post
    Share on other sites

    Posted · Strange behavior of GCode M140 @ UMO ??

    HAHAAAAA.... it was so simple but took a loooooot of time figure it out.

    Finally I tried it with the unused Pin10 and the M42 command as anon recommended - but also nothing happened....

    After a lot of research and trial&error (mostly error) I found out that M42 commands are not buffered (ref to https://github.com/ErikZalm/Marlin/issues/666), therefore it seems that nothing happens when switching on/off - but it happens, just too fast.

    Solution: place an M400 "wait for the buffer to clear" before the M42 and Marlin will first perform all the remaining steps in the buffer and then move forward to perform the M42...

    Tadaa... swiching my dummy led on and off the right time for "cutting"...

    Unfortunately it does not work with M140, but with M42.

    NOTE: Workarroud without any warranty - but it seems to work...

    Thought it might be helpfull for somebody else...

     

  • Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    • Our picks

      • UltiMaker Cura 5.9 stable released!
        Here comes Cura 5.9 and in this stable release we have lots of material and printer profiles for UltiMaker printers, including the newly released Sketch Sprint. Additionally, scarf seams have been introduced alongside even more print settings and improvements.  Check out the rest of this article to find out the details on all of that and more
          • Like
        • 5 replies
      • Introducing the UltiMaker Factor 4
        We are happy to announce the next evolution in the UltiMaker 3D printer lineup: the UltiMaker Factor 4 industrial-grade 3D printer, designed to take manufacturing to new levels of efficiency and reliability. Factor 4 is an end-to-end 3D printing solution for light industrial applications
          • Heart
          • Thanks
          • Like
        • 4 replies
    ×
    ×
    • Create New...