Jump to content
Ultimaker Community of 3D Printing Experts
Sign in to follow this  
drayson

Strange behavior of GCode M140 @ UMO ??

Recommended Posts

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???

 

Share this post


Link to post
Share on other sites

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:

 

Share this post


Link to post
Share on other sites

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 !!

 

Share this post


Link to post
Share on other sites

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...

 

Share this post


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
Sign in to follow this  

  • Our picks

    • Print Core CC | Red for Ruby
      Q: For some users, abrasive materials may be a new subject matter. Can you explain what it is that makes a material abrasive when you are not sure which print core to use?
      A: Materials which are hard in a solid piece (like metals, ceramics and carbon fibers) will generally also wear down the nozzle. In general one should assume...
      • 1 reply
    • "Back To The Future" using Generative Design & Investment Casting
      Designing for light-weight parts is becoming more important, and I’m a firm believer in the need to produce lighter weight, less over-engineered parts for the future. This is for sustainability reasons because we need to be using less raw materials and, in things like transportation, it impacts the energy usage of the product during it’s service life.
        • Like
      • 12 replies
×

Important Information

Welcome to the Ultimaker Community of 3D printing experts. Visit the following links to read more about our Terms of Use or our Privacy Policy. Thank you!