M66 problem - doesn't work without Q parameter

More
29 Jan 2015 21:59 #55444 by nebelnoir
I don't need Q parameter. I want wait only until digital input will change.
It does not matter how much time it will take.
M66 in 2.6.5 version works only with Q.

Is there another way, maybe? (O codes (with WHILE LOOP) or own M code).
Could you get me some examples, pls?
Attachments:

Please Log in or Create an account to join the conversation.

More
29 Jan 2015 22:23 #55445 by PCW
why not just set Q3600 or so...

Please Log in or Create an account to join the conversation.

More
29 Jan 2015 22:43 #55446 by nebelnoir
or
(user code)
M66 P0 L3 Q3600
M66 P0 L3 Q3600
M66 P0 L3 Q3600
(user code)

Ok. Вut what if this is a technical equipment in the production line, which can only work once a day?
Or (more generally) I need different branches of Gcode, depending on the input signals.
How can I use digital input as a parameter in O codes? (I've tried to use motion.digital-in-00 (pin) or din-00 (signal) as parameter but it doesn't work)

Please Log in or Create an account to join the conversation.

More
29 Jan 2015 22:50 #55448 by PCW
If you need to branch then read immediate and then run conditional code
if you want to wait just use a long q value (Q31557600 will wait a year)
The following user(s) said Thank You: nebelnoir

Please Log in or Create an account to join the conversation.

More
29 Jan 2015 22:56 - 29 Jan 2015 23:39 #55449 by nebelnoir

(Q31557600 will wait a year)

:laugh: , ok it's work. SOLVED

read immediate and then run conditional code

ok it's work too. SOLVED

g21 g90
g0 x0 y0 z0
g4 p3
g0 x100
M66 P1 L0 Q100
o100 if [#5399 EQ 0]
g0 X0
o100 endif
o110 if [#5399 EQ 1]
g0 z50
o110 endif
g0 y100
g4 p3
g0 x0 y0 z0
m2

Thank you!
(L- - Mode 0: IMMEDIATE - no waiting, returns immediately. The current value of the input is stored in parameter #5399
linuxcnc.org/docs/html/gcode/m-code.html#sec:M66-Input-Control )
Last edit: 29 Jan 2015 23:39 by nebelnoir.

Please Log in or Create an account to join the conversation.

Time to create page: 0.089 seconds
Powered by Kunena Forum