M115 Firmware detect!

430 views
Skip to first unread message

Eric Norton

unread,
Feb 12, 2021, 11:54:08 PM2/12/21
to OpenPnP
Hi All,

 Can I change the M115 command to $I command? I use a custom grbl firmware and I can add the M115 command but wanted to see if I can change the M115 to $I first.

Thanks

Eric

ma...@makr.zone

unread,
Feb 13, 2021, 3:55:58 AM2/13/21
to ope...@googlegroups.com

Hi Eric

Unfortunately not. Discovery using M115 is the only command that must be used with zero knowledge about the controller. Chicken and Egg situation.

Note, the system should run without M115. The insights gained from M115 are only used for some extra firmware awareness on the part of Issues & Solutions i.e. it can then generate specific G-code dialect and some optimized settings. Otherwise it will generate the "most common" G-code and settings.

Once you have figured out the best settings for your custom Grbl and assuming you manage to implement the minimal feature set described here, you can send me the machine.xml and I will then add support for it to Issues & Solutions...

... while you can add some lines in the Wiki here to document and link the source code etc. here ;-)

https://github.com/openpnp/openpnp/wiki/Motion-Controller-Firmwares

_Mark

--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/b6fc11f3-b52d-46f0-a44d-49792627f8ben%40googlegroups.com.

Eric Norton

unread,
Feb 13, 2021, 10:54:40 AM2/13/21
to ope...@googlegroups.com
Hi Mark,

 Ok ill dismiss the M115 firmware detect.

Thanks,

Eric



ma...@makr.zone

unread,
Feb 13, 2021, 12:51:31 PM2/13/21
to ope...@googlegroups.com

Hi Eric,

So you don't want to make your custom Grbl a "good citizen" of OpenPnP?

;-)

_Mark

Eric Norton

unread,
Feb 13, 2021, 2:24:38 PM2/13/21
to ope...@googlegroups.com
Hi Mark,

 Ok you got me on that one :-). If you tell me the exact string I need to send to open pnp I'll incorporate the change tonight and let you know if it works :-)...

Thanks,

Eric

ma...@makr.zone

unread,
Feb 14, 2021, 5:37:20 AM2/14/21
to ope...@googlegroups.com

Cool!

> you tell me the exact string I need to send to open pnp I'll incorporate the change tonight and let you know if it works :-)...

There is no real standard (as far as I know), just conventions. There is this

https://reprap.org/wiki/M115_Keywords

but it seems nobody really adheres to it or maintains it.

These are known responses:

FIRMWARE_NAME:Smoothieware, FIRMWARE_URL:http%3A//smoothieware.org, X-SOURCE_CODE_URL:https%3A//github.com/markmaker/Smoothieware/tree/feature/best-for-pnp, FIRMWARE_VERSION:feature/best-for-pnp-c82d0b45, X-FIRMWARE_BUILD_DATE:Oct 22 2020 21:21:58, X-SYSTEM_CLOCK:120MHz, X-AXES:5, X-PAXES:5, X-GRBL_MODE:0, X-CNC:0, X-MSD:1

FIRMWARE_NAME: RepRapFirmware for Duet 3 MB6HC FIRMWARE_VERSION: 3.2-RC1+1 ELECTRONICS: Duet 3 MB6HC v1.01 or later FIRMWARE_DATE: 2020-12-23

FIRMWARE_NAME:TinyG, FIRMWARE_URL:https%3A//github.com/synthetos/TinyG, FIRMWARE_VERSION:0.97, FIRMWARE_BUILD:440.21, HARDWARE_PLATFORM:1.00, HARDWARE_VERSION:8.00

Note: as the ":" is used as a delimiter, you can't use it inside values. Therefore encode those as "%3A".

I guess you get the idea. There are essential properties such as FIRMWARE_NAME and FIRMWARE_VERSION that Issues & Solutions uses. Other than that, you're pretty free. If there are important compile time defines or configuration options, it would be cool to communicate these through custom properties (tell me how to interpret). As an example Issues & Solutions interprets the X-AXES and X-PAXES properties on Smoothie as explained here, plus X-GRBL_MODE, because it affects the homing command.

Don't forget to implement M114 too ;-)

Can you tell us more about your Grbl port?

_Mark

Eric Norton

unread,
Feb 14, 2021, 10:36:44 AM2/14/21
to ope...@googlegroups.com
Hi Mark,

 Ok just so I understand you correctly Open PnP expects to see at the minimum FIRMWARE_NAME: XXXX and FIRMWARE_VERSION: X.XXX is this correct? I can easily make this as two ASCII strings output from my custom grbl version and try it to see if it works. I'll let you know how it goes. Right now I just want to add the minimum and will add more to it later.

Now that you mention M114 how does that get handled in Open PnP? Do you have a sample GET POSITION string that Open PnP expects to see so I can write a custom output string? GRBL already reports position information to Open Pnp so not sure if this is a duplicate or not.

My GRBL port is based off of 1.1f with quite a few modifications to how it works and how fast it can go. I have made some major improvements to the serial communication because it was not as reliable before. Alot of the firmware functions have been moved to hardware such as how the step pulse and the direction signals are generated. It's an eight axes version with a ninth slave Y axis. I also have another micro that is a stripped down version of grbl which just uses the gcode parser which handles all of the other commands like reading the vacuum, vacuum solenoid control, vacuum pump control and RS-485 feeder communication. I wanted to have it separate from the main grbl micro so it does not interfere with the motion side of things because of interrupts etc... All of this is wrapped up into a custom board I designed for the pick and place machine.

Thanks,

Eric

ma...@makr.zone

unread,
Feb 14, 2021, 1:07:44 PM2/14/21
to ope...@googlegroups.com

Hi Eric

> at the minimum FIRMWARE_NAME: XXXX and FIRMWARE_VERSION: X.XXX is this correct?

Yes.

> Now that you mention M114 how does that get handled in Open PnP? Do you have a sample GET POSITION string that Open PnP expects to see so I can write a custom output string?

X:0.0000 Y:0.0000 Z:160.0000 A:0.0000 B:0.0000 C:0.0000

For a more general command/response documentation, I recommend using these two references:

https://www.reprap.org/wiki/G-code

http://linuxcnc.org/docs/2.7/html/gcode/g-code.html
+
http://linuxcnc.org/docs/2.7/html/gcode/m-code.html

Or for the most often-used controller for OpenPnP:

https://smoothieware.org/supported-g-codes

You can also set your driver to tcp and the use "GcodeSever" as the IP address (without the quotes). This will simulate a "common controller" inside OpenPnP. So you can play around with that. Just switch back to serial when you want to connect to the real Grbl controller.

_Mark

Eric Norton

unread,
Feb 14, 2021, 2:13:39 PM2/14/21
to ope...@googlegroups.com
Excellent thank you Mark :-)!!

Eric Norton

unread,
Feb 15, 2021, 12:20:19 PM2/15/21
to ope...@googlegroups.com
Hi Mark,

 I tried to implement the M115 last night but keep getting unknown firmware Grbl in the issues and solutions. I tried FIRMWARE_NAME:Grbl and FIRMWARE_VERSION:3.1 and a whole host of other combinations to no avail. Is the firmware version too high? I have higher numbers because I have other versions of Grbl and didn't want those version numbers to conflict. Do you have the EXACT string Open PnP expects to see for the different supported firmwares Open PnP expects to see and then I can format my string to that instead of guessing what it is? I really appreciate all the help thus far and hope to implement the M114 GET_POSITION tonight.

Thanks,

Eric

ma...@makr.zone

unread,
Feb 15, 2021, 12:32:55 PM2/15/21
to ope...@googlegroups.com

Hi Eric

This is a misunderstanding. Your efforts are for the future, for the next guy using your custom Grbl.

Once you have everything in place you can send me the machine.xml and I will then implement Issues & Solutions it into OpenPnP. There's no AI in there, it can't learn how to handle a new controller "automagically". ;-)

_Mark

Eric Norton

unread,
Feb 15, 2021, 12:53:00 PM2/15/21
to ope...@googlegroups.com
Ooooh ok I got ya... I was chasing my tail last night trying to figure out if I was doing something wrong scratching my head lol. Ok no problem we can address this at a later date :-). Thanks Mark!!

Reply all
Reply to author
Forward
0 new messages