Rambo Serial Extension (Marlin)

Curious if anyone knows if the serial extension pins can be read from. I know I can inject gcode thru them using an Arduino. Wondering if I can send an M114 and get back the results. Same as if I were using repetier. For that matter is the current position being pushed out on the serial anyway and I would just have to parse it.

I have the concept of using the Arduino with a button to send M114, get the current position back and store it (maybe light up an LED to say it was stored or use an OLED display). Then have a second button (or same button) execute a move back to that location at later time. Like an auto return to a spot.

From what I understand, Marlin doesn’t send any positional info automatically (you need grbl or a CNC-specific firmware for that right now), but serial is usually bi-directional, so you should be able to get the data back. And if you’ve got an Arduino on the other end, it should be “simple” to parse and otherwise manage the data.

Alternately, you could use a combination of G53-59.3 and G92 to set the current location as 0,0,0 for one of the workspace coordinate spaces, then use those to return to it later. A little trickier, but you could store up to 10 “hotspots” natively in the firmware. And they can be stored to EEPROM…

That sounds like fun. I hope you call it MS and MR like a pocket calculator!

K’s recommendation probably would work too.

The one thing that could keep that expansion serial port from working is if it wasn’t enabled in the firmware.

2 Likes

This is actually being used by the newer touchscreen style LCD’s and Thinkyhead has warned against using it. He says it causes micro stuttering and a new solution is being worked on. You should look at the PR’s for Marlin, it was talked about on twitter a day or two ago.

This would only be during set up though, right? The M114 problems are related to the fact that Marlin was trying to do some work when you sent an M114, which caused it to think hard and not do it’s main job. The new version of M114 just echos back the current requested position. So if you are jogging around, and then after a second you send an M114, it would be correct, and not interfere with anything.

That’s how I understood it, at least.

1 Like

I think Marlin would save some trouble by providing a way to request periodic location measurements, similar to the temperature measurements.

Thanks. I just checked that out. Yes @jeffeb3 I am thinking of a different use case. No live updates during a run. Just a convenience button for use during setups and job progression. Though if it were spewing the data already, making use of it would be nice. The limited display on the LCD is not the best. I like my three decimal places. lol

1 Like

If you sent a G1 X100 command, then ask for a few M114s, the previous version would compute (when it received the M114) where it is along that 100mm line and report that. The trouble is, that would take enough cycles that it might miss it’s timing to do something else important. The next version would just say “I’m here, at X=100” right away, even if you hadn’t reached that area yet. Similar to how sometimes a “pause” takes a long time to actually stop the machine.

In the jogging use case, you can also use M400 to wait until all the moves are completely done, and only then ask for the position with M114.