Re: Commercial software
Posted by
Fred Proctor
on 1999-06-11 08:58:53 UTC
About EMC, writing PLC programs for things like tool changers, and
custom GUIs, Jon Pritchard wrote:
other machine control such as auto toolchangers etc? Or does EMC have
this built in?
controller, generically called "emcio" in the documentation, with
executables "shvio", "mmio", and others. These are Linux processes
(don't run real-time), cycling at a configurable rate that can run at
about 20 milliseconds per cycle at their fastest without resorting to
CPU soaking or hacking the Linux kernel (both which I've done). The
difference between shvio ("Shaver IO") and mmio ("Minimill IO") is that
shvio talks to the parallel port for digital control of spindle on/off,
speed increase/decrease, and direction, and for coolant, lube, and estop
handling; while mmio doesn't have any coolant or lube and uses an analog
control of the spindle.
These are coded in C++, using some templates that we at NIST use on many
of our projects. These templates follow our Real-time Control Systems
(RCS) methodology, with which us NIST people are familiar. Writing a new
PLC-like controller from scratch this way is a pain in the neck for most
people.
Any programming language can be used to build a PLC that works with EMC,
with the following constraints:
1. It has to run with Linux. Linux supports most languages, e.g., C,
C++, Perl, Tcl/Tk, Java, Python, FORTRAN, etc. but these are not PLC
languages. Does anyone know of a ladder logic programming environment
that runs in Linux? University code? Alternatively if a ladder or
IEC-1131 programming environment can generate C code as an output, this
could be copied to a Linux box, edited where necessary, compiled, and
run. Something like Wizdom's Paradym-31 could work like this.
2. It has to include some way to read commands and write status, using
any of the Unix interprocess communication methods, or sockets, or
something like that. If it's C/C++/Tcl/Tk/Java/Python code then no
problem. If it's a standalone PLC then it must have some way to send it
commands. If it uses a serial port then that would work also.
Ideally there would be a Linux version of a PLC programming environment
with a software interface for commands and status. Ideally also means
free, like some university project.
Also, question 2:
talking to EMC sort of like one sees on commercial CNC? Whats the
programming language that would typically be used to do this?
<
The EMC has an X Windows GUI with menus, buttons, etc. I wrote this in C
using the X Toolkit library. I modify this all the time but it's not
drag-and-drop GUI building, to say the least. We also have a Jave GUI,
and Matt Shaver has done some Java work too. This is a better way to go
than the X Toolkit. We had some problems with Java 1.1.X earlier, but
Java 1.2 is out and the problems seem to be solved.
One alternative that some have mentioned is Tcl/Tk, the scripting
language for building GUIs. Any Tcl/Tk programmers out there? There's
also the QT library from Troll Tech that can be used to build GUIs that
can be ported between Unix and Windows machines. The KDE desktop
environment that runs on Linux uses this.
--Fred
custom GUIs, Jon Pritchard wrote:
>1. Can a machine control "soft" PLC be incorporated with EMC to run
other machine control such as auto toolchangers etc? Or does EMC have
this built in?
>Matt Shaver gave a good synopsis of this. The current EMC has a PLC-like
controller, generically called "emcio" in the documentation, with
executables "shvio", "mmio", and others. These are Linux processes
(don't run real-time), cycling at a configurable rate that can run at
about 20 milliseconds per cycle at their fastest without resorting to
CPU soaking or hacking the Linux kernel (both which I've done). The
difference between shvio ("Shaver IO") and mmio ("Minimill IO") is that
shvio talks to the parallel port for digital control of spindle on/off,
speed increase/decrease, and direction, and for coolant, lube, and estop
handling; while mmio doesn't have any coolant or lube and uses an analog
control of the spindle.
These are coded in C++, using some templates that we at NIST use on many
of our projects. These templates follow our Real-time Control Systems
(RCS) methodology, with which us NIST people are familiar. Writing a new
PLC-like controller from scratch this way is a pain in the neck for most
people.
Any programming language can be used to build a PLC that works with EMC,
with the following constraints:
1. It has to run with Linux. Linux supports most languages, e.g., C,
C++, Perl, Tcl/Tk, Java, Python, FORTRAN, etc. but these are not PLC
languages. Does anyone know of a ladder logic programming environment
that runs in Linux? University code? Alternatively if a ladder or
IEC-1131 programming environment can generate C code as an output, this
could be copied to a Linux box, edited where necessary, compiled, and
run. Something like Wizdom's Paradym-31 could work like this.
2. It has to include some way to read commands and write status, using
any of the Unix interprocess communication methods, or sockets, or
something like that. If it's C/C++/Tcl/Tk/Java/Python code then no
problem. If it's a standalone PLC then it must have some way to send it
commands. If it uses a serial port then that would work also.
Ideally there would be a Linux version of a PLC programming environment
with a software interface for commands and status. Ideally also means
free, like some university project.
Also, question 2:
>2. Is it possible to put together some of the pretty screens for
talking to EMC sort of like one sees on commercial CNC? Whats the
programming language that would typically be used to do this?
<
The EMC has an X Windows GUI with menus, buttons, etc. I wrote this in C
using the X Toolkit library. I modify this all the time but it's not
drag-and-drop GUI building, to say the least. We also have a Jave GUI,
and Matt Shaver has done some Java work too. This is a better way to go
than the X Toolkit. We had some problems with Java 1.1.X earlier, but
Java 1.2 is out and the problems seem to be solved.
One alternative that some have mentioned is Tcl/Tk, the scripting
language for building GUIs. Any Tcl/Tk programmers out there? There's
also the QT library from Troll Tech that can be used to build GUIs that
can be ported between Unix and Windows machines. The KDE desktop
environment that runs on Linux uses this.
--Fred
Discussion Thread
Jon Pritchard
1999-06-08 21:43:33 UTC
Re: Commercial software
Matt Shaver
1999-06-08 22:23:56 UTC
Re: Commercial software
Tim Goldstein
1999-06-09 06:49:46 UTC
Re: Commercial software
Jon Pritchard
1999-06-10 21:37:57 UTC
Commercial software
Jon Elson
1999-06-11 00:13:14 UTC
Re: Commercial software
Matt Shaver
1999-06-11 00:19:30 UTC
Re: Commercial software
Fred Proctor
1999-06-11 08:58:53 UTC
Re: Commercial software