Re: questions concerning emc-0.9-25.src.tgz



"Terry L. Ridder" wrote:

> i have several quesions concerning emc-0.9-25.
> after looking over a portion of the source code
> it is apparent that inisim is not suppose to be built.

inisim should be built, as far as I know. This sends the simulation
communication parameters from the .ini file, which are these:

; Parameters for Inland Motor BMHS-0701 X 20
TORQUE_UNITS =			OZ_IN
ARMATURE_RESISTANCE =		1.10
ARMATURE_INDUCTANCE =		0.0120
BACK_EMF_CONSTANT =		0.0254
ROTOR_INERTIA =			0.0104
DAMPING_FRICTION_COEFFICIENT =	0.083
SHAFT_OFFSET =			0
REVS_PER_UNIT =			10
; Parameters for generic amplifier
AMPLIFIER_GAIN =		1
MAX_OUTPUT_CURRENT =		10
LOAD_RESISTANCE =		1
; parameters for generic encoder
COUNTS_PER_REV =		4096

There aren't any NML messages for setting these parameters, so they are
stuffed into a separate shared memory buffer directly.

I asked Will Shackleford about this, and he said that it was disabled in
the Makefiles since he was testing it, but that it was probably OK to
enable it. Will, is this right?

> that being said generic.run, which is called by sim.run,
> clearly states that simmod.o 'needs' inisim to be run.
> yet there is no error checking to see if inisim even exists.

There should be a check, better yet inisim should be built.

> there is also an interesting feature of generic.run.
> it ignores the 'PLAT' setting in the sim.ini file.
> if USE_INIFILE_PLATS is not set to anything generic.run
> uses the derived values of PLAT and RTPLAT.

Another Will Shackleford feature. I'm not sure why this is done. Will,
can you let us know?

> now my questions:
> 
> should inisim be built?

Sure.

> should generic.run be changed to show that inisim is not
> being built?

I think inisim should be built, in which case generic.run won't need any
special handling of this.

> under /usr/local/nist/emc/plat/rtlinux_2_2/bin
> there are no executables. should there be executables?

No. The bin directory holds full-blown executables, while the lib
directory holds relocatable object (.o) files. The only way to run RT
Linux code is as .o files, loaded with insmod. So, no binaries.

There are binaries that only make sense if you have a real-time Linux
system. inisim is one. It communicates with the real-time simulator
simmod.o, sending the simulated motor parameters down. However, inisim
is not a real-time module itself. It's run from normal Linux, so it
lives in the plat/linux_XXX/bin directory.

If real-time modules could access the file system directly, we wouldn't
need to have programs like inisim (or inimot, which sends the other .ini
file parameters in the [TRAJ] and [AXIS_#] sections). simmod.o could get
them itself. Since RT Linux is so restrictive, we have to use other
means to get information down.

--Fred



Date Index | Thread Index | Back to archive index | Back to Mailing List Page

Problems or questions? Contact