EMC simulation, etc.
Posted by
Fred Proctor
on 1999-09-17 15:04:29 UTC
EMC folks,
I worked over the EMC simulation that some of you reported having
problems with. In the latest distribution I fixed the batch of files,
sim.*, that are set up for running the EMC in simulation. This doesn't
require any setup of RT-Linux, so if you install Red Hat Linux 5.2 and
get X windows going, you can stop there and try:
cd /usr/local/nist/emc
./sim.run
You can take it out of estop, turn it on, jog the axes (home doesn't
work, for some reason), put it in auto, run a program, etc.
This includes a simulation of the properties of DC servomotors, using
difference equations relating motor current, torque constant, damping
coefficient, etc. You will notice that the actual numbers move about a
bit, due to servo lag, overshoot, etc. I "tuned" these. You can play
with the PID gains if you want to.
Another way to run the EMC in simulation, if you have RT-Linux
installed, is to run the stepper motor controller with nothing on your
parallel port. This behaves exactly like it would if steppers were
attached, since we don't get any feedback from the steppers except for
limit and home switches. You can change the polarities on these in the
ini file if the limits always show as being set, or the home switch
never shows as being tripped and homing keeps going...
I added a README file in emc/README that briefly covers this and other
EMC matters. If you have any suggestions let me know.
I also worked on the automatic testing program I set up,
emc/src/emctask/autoemc.cc, that takes Tcl scripts and runs them. The
idea was to script a bunch of tests and then run them before I put a
release out. I did a quick update of this to support Tcl/Tk, the
graphical scripting part, and I'm considering redoing the X GUI in
Tcl/TK for several reasons:
1. The X GUI is terrible to modify. Check out emc/src/emctask/xemc.cc if
you don't believe me.
2. Tcl/Tk has more widgets, menu accelerators, etc. so you can use
keystrokes to navigate menus. The X Toolkit doesn't have any of this,
which is why xemc is so annoying to use.
3. Java proved to be a problem early on. It has improved but you still
need to download it (Tcl/Tk comes with Red Hat and you already have it).
It is also totally interpreted. With Tcl/Tk much of the interface to the
EMC is done in C/C++, and the scripts deal solely with presentation.
Hence it's faster.
4. A GUI based on Tcl/Tk can be easily supplemented with graphical
scripts for conversational programming.
Look at the RELEASE_NOTES in emc/doc, or emc-17-Sep-1999.txt, for more
details on this release. It's on the WEB site at:
http://www.isd.mel.nist.gov/projects/emc/distributions/linux_2_0_36/
dated 17-Sep. Comments, please.
--Fred
I worked over the EMC simulation that some of you reported having
problems with. In the latest distribution I fixed the batch of files,
sim.*, that are set up for running the EMC in simulation. This doesn't
require any setup of RT-Linux, so if you install Red Hat Linux 5.2 and
get X windows going, you can stop there and try:
cd /usr/local/nist/emc
./sim.run
You can take it out of estop, turn it on, jog the axes (home doesn't
work, for some reason), put it in auto, run a program, etc.
This includes a simulation of the properties of DC servomotors, using
difference equations relating motor current, torque constant, damping
coefficient, etc. You will notice that the actual numbers move about a
bit, due to servo lag, overshoot, etc. I "tuned" these. You can play
with the PID gains if you want to.
Another way to run the EMC in simulation, if you have RT-Linux
installed, is to run the stepper motor controller with nothing on your
parallel port. This behaves exactly like it would if steppers were
attached, since we don't get any feedback from the steppers except for
limit and home switches. You can change the polarities on these in the
ini file if the limits always show as being set, or the home switch
never shows as being tripped and homing keeps going...
I added a README file in emc/README that briefly covers this and other
EMC matters. If you have any suggestions let me know.
I also worked on the automatic testing program I set up,
emc/src/emctask/autoemc.cc, that takes Tcl scripts and runs them. The
idea was to script a bunch of tests and then run them before I put a
release out. I did a quick update of this to support Tcl/Tk, the
graphical scripting part, and I'm considering redoing the X GUI in
Tcl/TK for several reasons:
1. The X GUI is terrible to modify. Check out emc/src/emctask/xemc.cc if
you don't believe me.
2. Tcl/Tk has more widgets, menu accelerators, etc. so you can use
keystrokes to navigate menus. The X Toolkit doesn't have any of this,
which is why xemc is so annoying to use.
3. Java proved to be a problem early on. It has improved but you still
need to download it (Tcl/Tk comes with Red Hat and you already have it).
It is also totally interpreted. With Tcl/Tk much of the interface to the
EMC is done in C/C++, and the scripts deal solely with presentation.
Hence it's faster.
4. A GUI based on Tcl/Tk can be easily supplemented with graphical
scripts for conversational programming.
Look at the RELEASE_NOTES in emc/doc, or emc-17-Sep-1999.txt, for more
details on this release. It's on the WEB site at:
http://www.isd.mel.nist.gov/projects/emc/distributions/linux_2_0_36/
dated 17-Sep. Comments, please.
--Fred
Discussion Thread
Fred Proctor
1999-09-17 15:04:29 UTC
EMC simulation, etc.
Ron Ginger
1999-09-19 20:41:22 UTC
Re: EMC simulation, etc.
Fred Proctor
1999-09-27 09:47:59 UTC
Re: Re: EMC simulation, etc.
Paul Corner
1999-09-27 13:57:10 UTC
Re: Re: EMC simulation, etc.