questions concerning emc-0.9-25.src.tgz



hello;

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.

<begin emc/src/emcsim/makefile snippet>
SRCS = \
	amplifier.c \
	dcmotor.c \
	encoder.c \
	extsimdio.c \
	extsimaio.c \
	extsimmot.c \
	simmot.c \
	simdio.c \
	simaio.c \
	inisim.cc \
	simmot_n.cc

HEADERS = \
	amplifier.h \
	encoder.h \
	dcmotor.h \
	sim.h \
	simmot_n.h

BINS =	

OBJS = \
	amplifier.o \
	dcmotor.o \
	encoder.o \
	extsimdio.o \
	extsimaio.o \
	extsimmot.o \
	simmot.o \
	simdio.o \
	simaio.o
# Add these when inisim is more solid.	
# inisim.o \
# 	simmot_n.o

endif
endif
<end   emc/src/emcsim/makefile snippet>

<begin emc/src/emcsim/makefile snippet>
include ../Makefile.inc


simmot_n.cc: simmot_n.h simmot_n.gen amplifier.h dcmotor.h encoder.h
	-(if  test -e $-at-; then chmod a+w $-at-; fi)
	-$(NML_CODEGEN) script=simmot_n.gen display_on=false 


$(DEVP_LIB_DIR)/simmot_n.o: simmot_n.cc

$(DEVP_BIN_DIR)/inisim: $(DEVP_LIB_DIR)/inisim.o \
	$(DEVP_LIB_DIR)/simmot_n.o \
	$(DEVP_LIB_DIR)/encoder.o \
	$(DEVP_LIB_DIR)/dcmotor.o \
	$(DEVP_LIB_DIR)/amplifier.o \
	$(DEVP_LIB_DIR)/libemc.a
	($(COMPILER_SETUP); \
	$(CPLUSPLUS) \
	$^ \
	$(RCS_LINK_FLAG) \
	$(CLINK) $(CPLUSPLUSLINK) -o $-at-;)

inisim: $(DEVP_BIN_DIR)/inisim

.PHONY: inisim
<end   emc/src/emcsim/makefile snippet>

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.

<begin generic.run snippet>

# run emcmot in background
echo -n "starting EMC MOTION PROGRAM -- $emcmot..."
....
  simmod.o)
# Real-time simulation module needs inisim to be run.
  if ! /sbin/insmod -f plat/$emcmot_plat/lib/$emcmot; then
    echo "can't install it"
    cleanup
    exit 1
  else
    echo "Running inisim to send INIFILE simulation parameters to the real-time simulator."
    plat/$PLAT/bin/inisim -ini $INIFILE
    echo "done"
  fi
  ;;
....
esac
<end   generic.run snippet>

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.

<begin generic.run snippet>
#
# Determine the current platfrom from uname and set symbolic links to it.
#

PLATBASE=`uname -s | gawk '{ printf ( "%s",tolower ( $1 ) ) }'`
PLAT=`uname -sr | sed "y/ /_/" | sed "y/./_/" | sed s/-.\*\$// | gawk '{ printf ( "%s",tolower ( $1 ) ) }'`
RTPLAT=`uname -r | sed s/\^.\*-// | sed s/rtl/rtlinux_/ | sed "y/ /_/" | sed "y/./_/"`
k1=`uname -r | sed s/-.\*\$// | gawk -F . '{print $1}'`
k2=`uname -r | sed s/-.\*\$// | gawk -F . '{print $2}'`
if test $k1 = "2" -a $k2 = "0"; then RTPLAT=rtlinux_09J; fi
.....

# get emcmot information
emcmot=`$inivar -ini $INIFILE -var EMCMOT -sec EMCMOT`
if [ ! -n "$emcmot" ] ; then
    echo "Can't find variable EMCMOT in section [EMCMOT] of file $INIFILE.";
fi
if [ -n "$USE_INIFILE_PLATS" ] ; then
    emcmot_plat=`$inivar -ini $INIFILE -var PLAT -sec EMCMOT`;
else
    case $emcmot in
	emcmotsim | emcmotsim.tc)
	emcmot_plat=$PLAT;
	;;
	*)
	emcmot_plat=$RTPLAT;
	;;
    esac
fi
......
  simmod.o)
# Real-time simulation  module needs inisim to be run.
    if ! /sbin/insmod -f plat/$emcmot_plat/lib/$emcmot; then
      echo "can't install it"
      cleanup
      exit 1
    else
      echo Running inisim to send INIFILE simulation parameters to the real-time simulator.
      plat/$PLAT/bin/inisim -ini $INIFILE
      echo "done"
    fi
  ;;
......
<end   generic.run snippet>

now my questions:

should inisim be built?
should generic.run be changed to to show that inisim is not
being built?
under /usr/local/nist/emc/plat/rtlinux_2_2/bin
there are no executables. should there be executables?


-- 
Terry L. Ridder
Blue Danube Software (Blaue Donau Software)
"We do not write software, we compose it."

digging deep, i feel my conscience burn
i need to know who and what i am
this hunger jolts me from complacency
rocks me, makes me meet myself
----kendall payne---closer to myself---




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

Problems or questions? Contact