In emc, there are lots of ways to interact with the running system
besides using gcode.

These two ways are called NML and HAL.  Using NML, for instance, any
userspace program can retrieve the current position of the machine and
lots of other details about it.  Any information displayed in the AXIS
GUI or in the "EMC Status" window comes from NML, and any action that
AXIS takes when you press a key or click a button is achieved through
NML.  If you want to script a series of actions like those taken in the
GUI (such as: home all axes, open gcode file, begin execution) then you
want to write a program to send NML messages.  Small examples of this in
Python are in the included "mdi" script, or another script I called
"jdi": http://axis.unpy.net/01167419757

Using HAL, you can read and write values such as hardware inputs and
outputs.  There are a large number of predefined realtime components
(such as 'and', 'or', 'compare', 'limit', 'timedelay', 'oneshot') as
well as ClassicLadder which allows you to draw ladder diagrams.  The
inputs can depend on such things as 'is a program running', 'is a
tool-change requested', and so on.

By writing a new userspace or realtime HAL component, then connecting it
with a ".hal file", you can do a wide range of things.  For instance,
"hal_input" is a userspace HAL component written in python which makes
any Linux-recognized input device into a series of HAL pins.  With the
proper .hal file, this allows you to jog your machine using a joypad,
assign its buttons to "cycle start", and so on.  If I had not already
written hal_input and had it bundled with emc2, anybody else who had the
idea and the exepertise could have too.

The problem is not that emc is not customizable and extensible in a wide
variety of ways -- the problem is a lack of documentation and examples
that are accessible to the typical user.

Jeff

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to