M66 problem - doesn't work without Q parameter

More
11 years 9 months ago #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.

Attachment not found


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

Please Log in to join the conversation.

More
11 years 9 months ago #55445 by PCW
why not just set Q3600 or so...

Please Log in to join the conversation.

More
11 years 9 months ago #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 to join the conversation.

More
11 years 9 months ago #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)

Please Log in to join the conversation.

More
11 years 9 months ago #55449 by nebelnoir

PCW wrote: (Q31557600 will wait a year)

:laugh: , ok it's work. SOLVED

PCW wrote: 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 )

Please Log in to join the conversation.

Time to create page: 0.083 seconds
Powered by Kunena Forum