Jeff, Thanks for the input. For the first cut, I think straight C should be more than adequate because the functions already exist in emcsh.c to perform the needed operations (Estop off, Machine on, jog, start/pause/resume/stop, etc.) via a simple call to the associated function. As to the serial protocol, while string manipulation may not exactly be one of C's strong points, sending and parsing strings to / from a serial port does not seem too onerous either (something I have already done with the telnet interface).
OTOH, I am not too sure about the best approach to genericize these types of interfaces. Whether adapting or implementing something like term/tty (say similar to the way the various VTxxx protocols are implemented), or (non-exclusive)through some sort of class library. I can see where something like Python could be advantageous here, at least in contrast to the complexity of C++ which would probably be the better approach when attempting to abstract this type of functionality. Regards, Eric > I wrote the python 'emc' interface with the idea that many > programs could use it to send and receive NML messages, not > just the AXIS GUI. > It is GUI agnostic, and can also be used for commandline > programs like mdi.py and jdi.py > <http://axis.unpy.net/01167419757>. (however, there are > probably some parts of the NML message set that aren't > implemented yet because nobody's asked for them) Python has > a nice serial (and presumably usb-serial) interface module, pyserial. > > If you prefer tcl, I believe it's a small amount of work to > turn emcsh.cc into a module that can be 'load'ed into tclsh > *or* wish, enabling you to use it for GUI or non-GUI > applications written in tcl, including applications which > embed tcl. basically, a new function with a name like > '_emc_init' is added which is called when _emc.so is loaded > by the tcl 'load' command. 'emc_init' registers all the > commands. I started on this but I'm not sure where I got > bogged down. incomplete > patch: > http://emergent.unpy.net/files/sandbox/tcl-emc-shared-module.patch > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
