Hi Richard,

sorry it took a while to reply...

> Could someone explain or point me to documentation that explains the
> following:
>
> 1.What does the motion controller do? Is is part of HAL? How is it
> built? I see that the file motion.c has a 'main' function but the
> Makefile does not link it, only compiles it to an object file. How is
> this object file used?

The motion controller is the software component which controls all motion of 
the machine.
It takes care of jogging (when in free mode), coordinates moves along one or 
more joints in coordinated mode and takes care of handling lots of other 
motion related things (like homing, limit switches, software limits, 
feedrate override, adaptive feedrate, spindle control, etc.)
The motion controller is a realtime kernel module, that gets built from 
sources around emc2/src/emc/motion and then some (kinematics, ...), all 
resulting in a .ko kernel module. The kernel module gets inserted by the emc 
runscript, and it runs in realtime context.
The motion controller also is a HAL component, as it exports a lot of HAL 
pins which are used for making connections to hardware drivers (for example 
parport for the step motor interface, or a hardware card for servo DAC 
interface).
The main function you see is part of a testing support, which allows 
building the motion controller as a userspace component, for debugging 
purposes. Not sure if this functionality is still used.

> 2. It's unclear to me if there is one or more shared memory 'areas'. I
> had originally understood that only one shared memory area existed
> that all user space and kernel space programs communicated through.

There are probably a couple shared memory areas, but the most interesting 
one is the one used for communication between the task planner (emctask) and 
the motion controller. These two need to use a shared memory because on 
component (emctask) is in userspace, while the motion controller is a 
realtime kernel component.

> 3. Why use NML? Why not use just shared memory? Is NML an attempt at
> standardizing communication between software entities, i.e.
> user-kernel, user-user, kernel-kernel?

NML is the mechanism which is used for defining the dataset and 
communication paths between the various userspace components.
If you look at the (slightly outdated) overview of EMC: 
http://www.linuxcnc.org/content/view/42/13/
you'll see that there are basicly 4 components part of EMC (the GUI, the 
task controller EMCTASK, the motion controller EMCMOT and the IO controller 
EMCIO).

the GUI is basicly one or more of: tkemc, mini, AXIS, xemc, keystick (and a 
couple others which I'll leave resting in pieces ;)
The GUI's can run on the same machine as the rest of the components, or on 
different machines. You can attach more than one GUI to a running EMC 
machine.

The task controller EMCTASK is the component which contains the g-code 
interpreter, and takes care of communications with the different components 
(motion, IO, GUI).

NML is basicly used at the moment for various reasons:
* it was developed by NIST, and EMC was built around it as an example 
application (it longly outgrew that phase, but that's a sideissue)
* it allows various configurations (multi machine span of components, even 
multiple platforms - with enough nerve to hack it)
* there were (every couple of years) talks about replacing it with something 
else, but:
    * it is a really big job to change it with something else
    * while there are a couple alternatives, I'm not sure anyone studies 
them deeply enough to really understand which would fit best
    * if a system is working (and working pretty good), why change it ;)

If you want, subscribe to emc-developers, and we can go into further details 
about this issue.

> Thanks for your patience in advance.
>
> -Rich
>
Regards,
Alex


------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to