Waiting for operator.

More
19 Nov 2011 00:02 #14934 by sheetmetal
Hi,
I'm a long term cnc user and have done a lot of cnc repair, but am just becoming familiar with the amazing power of EMC.
One of the first projects that I am contemplating would be rather non-standard. The easiest way to envision it is to imagine a normal knee mill with X and Y conrolled. but with manual Z.
Ignoring safety issues, since this isn't really what I want to do, but imagine the controller positioning X and Y, but then an M code which would wait for the operator to move Z which would close a switch,
and then the program would continue. Most M codes just output and go, or with set delay, but here I'd want to wait for input, and then go.
This doesn't look too hard, and if I look hard at the probing routines, I might be able to figure it out, but other suggestions of examples would be appreciated.

The further refinement which I think would be much harder to implement is as follows:
Controller positions X and Y, operator manually moves Z, and when it is within a tolerance zone "near in hal parlance" of a programmable value, the program would continue.
I guess one way would be to figure out how to get EMC to not error out for excess following error on the Z axis, and pretend it was controlled. I'd obviously need the encoder input for Z, so I guess that as far as EMC is concerned, I'd have a 3 joint machine already.

Any ideas on an elegant way to accomplish the second scenario?
Thanks. I look forward to actually getting EMC to move some hardware.
lm

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

More
19 Nov 2011 02:38 #14937 by andypugh
Replied by andypugh on topic Re:Waiting for operator.
sheetmetal wrote:

Most M codes just output and go, or with set delay, but here I'd want to wait for input, and then go.

M66 L1 waits for a pin to change state, that pin state could be linked to almost anything in HAL (Z less than threshold is trivial)
www.linuxcnc.org/docview/html/gcode_main...ec:M66-Input-Control

Controller positions X and Y, operator manually moves Z, and when it is within a tolerance zone "near in hal parlance" of a programmable value, the program would continue.

M66 L1 and the HAL "near" component, mayhaps?
www.linuxcnc.org/docview/html/man/man9/near.9.html

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

More
19 Nov 2011 03:18 #14938 by sheetmetal
Replied by sheetmetal on topic Re:Waiting for operator.
Yes, perfect.
Thanks for the nudge in the right direction.
Pays to read the documentation all the way to the end. I've not seen that M code before.
lm

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

Time to create page: 0.059 seconds
Powered by Kunena Forum