CAD CAM EDM DRO - Yahoo Group Archive

Re: EMC API?

Posted by shackle@x...
on 1999-06-16 05:51:25 UTC
> From ginger@... Tue Jun 15 22:45:25 1999
> Date: Tue, 15 Jun 1999 22:48:37 -0400
> From: Ron Ginger <ginger@...>
> To: CAD_CAM_EDM_DRO@onelist.com
> Mailing-List: list CAD_CAM_EDM_DRO@onelist.com; contact
CAD_CAM_EDM_DRO-owner@onelist.com
> Delivered-To: mailing list CAD_CAM_EDM_DRO@onelist.com
> List-Unsubscribe: <mailto:CAD_CAM_EDM_DRO-unsubscribe@...>
> Mime-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [CAD_CAM_EDM_DRO] EMC API?
>
> From: Ron Ginger <ginger@...>
>
> I am very interested in EMC. Id like to tinker with the GUI part of the
> system- Ive done a Mill Power kind of clone alerady under Win95, Id like
> to move that to EMC, maybe with Tk or Java. I assume there is a
> programmer interface- API- soewhere in EMC that can be used this way,
> but so far I havent found any docs about it.
>
> can soeone give me a pointer to the right docs?
>
> What seems to be really missing to me is a sort of overview doc that
> describes all the pieces and how they work together- the WEB page junps
> right to a description of an .ini file and lots of gory details, but
> never explains the basic structure of things.
>
> ron


The interface to EMC typically used by a gui is defined by the C++ header file
src/emcnml/emc.hh. and by the documentation for NML in
http://isd.cme.nist.gov/proj/rcs_lib/NMLcpp.html (C++ version) and
http://isd.cme.nist.gov/proj/rcs_lib/NMLjava.html (Java Version).

NML provides the API for sending/recieving any message and the
emc.hh file defines the particular messages that EMC uses.

There is a CodeGenerator that automatically converts emc.hh from C++ to
Java which is typically run by the Makefile in src/java/emc/nml.

For example to send a jog message in Java:

import rcs.*;
import rcs.nml.*;
import emc.nml.*;

. . .

// Setup the NML channel
nml_emc nml_emc_object = new nml_emc();
NMLConnection NCCommandChannel = new NMLConnection(nml_emc_object,
"emcCommand","emcJavaGui", "emc.nml");

// Create and send a message to start jogging the X axis.
EMC_AXIS_JOG jog_msg = new EMC_AXIS_JOG();
jog_msg.axis = 0; // X
jog_msg.vel = 1.0; // units per second (units specified with
EMC_STAT.motion.axis[axis].units )
NCCommandChannel.write(jog_msg);

The classes EMC_AXIS_JOG and nml_emc are automatically generated from emc.hh,
and are are imported with "import emc.nml.*" the class NMLConnection is part
of the RCS libary and imported with "import rcs.nml.*"

As far as I know there is no Tk interface and I would have no idea how to
create one, since I am not a Tk programmer.

The classes in emc.hh at least have good names that are mostly
self-explanatory, but sometimes it can be unclear what the units a variable
uses are or which mode you need to be in to use a particular command. We need
better documentation and we have made several attempts in the past to do this
but I am not sure if any of those documents are current.



-- Will

Discussion Thread

Ron Ginger 1999-06-15 19:48:37 UTC EMC API? Jon Elson 1999-06-15 23:30:10 UTC Re: EMC API? mike grady 1999-06-16 01:08:46 UTC Re: EMC API? shackle@x... 1999-06-16 05:51:25 UTC Re: EMC API?