Re: how does Tcl/Tk work?
On Tue, 13 Mar 2001, Till wrote:
> Hallo List, especially Ray and Fred!
> I was trying to understand how TKEMC connects to the EMC and i expected
> the tcl/tk
> code to show how this works. I thought there would have to be the
> command "socket"
> somewhere in order to connect to the emcserver. Buur I didnt find it in
> the files.
Hallo Till
These are only my understanding of how these things work.
Tcl/Tk normally runs in a shell of some sort. Tclsh (tclsh) is the standard
way to run tcl. Wish (wish) is the standard way to run tk enhanced tcl
stuff. From either of these shells, a socket can be written to directly
connect to other devices.
> What is the purpose of emcsh?
The file emcsh.cc when compiled into emcsh is a "wish like" shell with the
NML extensions that are used to communicate with other EMC processes. All
of these extensions begin with emc_. So for example you can use
the command [emc_estop off] within a Tcl/Tk script when emcsh is started
using that script and emcsh will form the NML command and pass it to any
EMC processes that are listening.
A fairly complete list of these emc commands that are added to Tcl/Tk by
emcsh are contained in a comment near the top of the src/emctask/emcsh.cc
file.
I suspect that there is more behind your question than this. I get this
impression from seeing the pair of switches for each axis on your new
haxapod.
There is a second shell that has been written by NIST. It is iosh and
it works like emcsh except that it is designed to connect I/O to the EMC
using NML commands.
You can read some about using it a comment near the top of the file
src/emcio/iosh.cc but this is pretty cryptic description. It will help to
study how these commands are used in the file tkio.tcl in the same
directory. The files tcl/scripts/IO_Show and IO_exercise also use iosh.
> Why doesnt tkemc handle the tcp/ip-stack
> on its own?
> Or does it?
If your question is not how to connect devices to the EMC but how to
connect a remote HMI to the EMC, Henkka has written some excellent stuff on
his site - http://www.yty.net/cnc/
gute gluck
Ray
Date Index |
Thread Index |
Back to archive index |
Back to Mailing List Page
Problems or questions? Contact