fra589/grbl-Mega-5X

Digital Inputs add M66 "Wait on Input" GCode

fra589 opened this issue · 10 comments

Discussed in #280

Originally posted by mcinquino July 29, 2022
Hello,

I see that in the pinout diagram there are 4 digital inputs on pins 27,29,31 and 33 that are shown. I see that we have M codes - M62, M63, M64, M65 to set the outputs that are shown above these inputs. In linuxCNC we would use M66 to wait on an input. I don't see that M66 is implemented in the list of G codes. Is there a way to use these inputs in G code?

image

Thanks,
Mike

M66 is not yet implemented since nobody have asked it for now :)
Normally, it will be not so difficult to add M66 to the GCode interpreter...

Considering all my occupations, I could probably look into the matter after mid-October...

@++;
Gauthier.

@fra589
So, as I understand, those digital inputs can't be used right now?

I'd like to have a physical button press activate the homing sequence but I don't see a way to achieve this without digital inputs.

Hi @zalexzperez,

The use digital inputs can be used by your GCode sender software as there are reported in the accessory state Grbl's output. See https://github.com/fra589/grbl-Mega-5X/wiki/grbl-Mega-5X-v1.2-interface

It's only the M66 "Wait on input", which will pause Grbl until the digital input trigger, which is not implemented today.

Your software can use the output status of accessory state digital input status to send the $H command when your button will be triggered.

@++;
Gauthier.

@fra589 I was actually thinking of being able to home the machine independently from the G-code sender program, as being able to turn on the machine and immediately pressing a button to home it would be more convenient (easier and time-saving).

I'm not seeing how my controlling programs (UGS and gSender, I prefer the latter) are able to react to (output status) accessory state changes. I barely managed to enable the visualization of output status messages on UGS by digging into the options and finding the "Show verbose output" option.
Are you sure these programs can be configured to send commands on reading the output status?

Thanks in advance,
Alejandro.

Hi @zalexzperez,

Since gsender and UGS are open source, you can make your contribution by adding the necessary code...

It's also possible to add code directly in Grbl by adding an input pin which react with homing or to performs the homing automatically when resetting Grbl (it's not too dificult do do).

@++;
Gauthier.

Hello, is there hope on implementing M66 wait for input, this would be a real use for my cnc embroidery machine as to wait for neddle up before sending movement

Thanks

Ed

Hi @Ams-Laser,

It's still on the TODO list...
I'm very busy at the moment, I'm going to raise the priority, but it's going to take time... Be patient!

@++;
Gauthier.

Thanks, ill hold on 😉

I need 259

Dprocess at 4 Val

Max 9D