Page 1 of 1

M66 waiting for an input RISE or FALL not working?

PostPosted: Tue Jul 07, 2020 3:38 pm
by Miaho
Hi,

I trying to get the M66 gcode to wait for a RISE or FALL input signal on PIN 2 PORT 1 of the UC300ETH-5LPT board.

I'm triggering the input using an digital IO pin on the Arduino by setting it HIGH, delay for a second, and setting it LOW again.

In UCCNC diagnostics I can confirm the Port #1 I2 goes from black, to green, to black again in sync with the Arduino output.

The G-code I'm using to wait for the input is:

G0 X10
M66 P2 E1 L1 (or L2)
G0 X0

The G-Code cycle does stop at the M66 line, but doesn't seem to recognize the input trigger, and therefore never moves to the next line.

Any ideas, what am I missing?

Thanks,
Miaho

Re: M66 waiting for an input RISE or FALL not working?

PostPosted: Tue Jul 07, 2020 7:29 pm
by ger21
Try adding a Q value.

Re: M66 waiting for an input RISE or FALL not working?

PostPosted: Tue Jul 07, 2020 8:36 pm
by Miaho
Thanks, but still no joy. Still ignoring the input signal, only waits for Q seconds and then moves onto the next line of g-code, which wouldn't be ideal.

Re: M66 waiting for an input RISE or FALL not working?

PostPosted: Tue Jul 07, 2020 9:02 pm
by Miaho
Got it working...

In the UCCNC_usersmanual.pdf it states the following...

P specifies the digital input pin number
E specifies the digital input port number

But using P as the PORT number and E as the PIN number works :D