Using basic stepper setup file I added the the following: newsig Xen1 bit linkps motion.in-position Xen1
And I get this error report: Print file information: RUN_IN_PLACE=no EMC2_DIR= EMC2_BIN_DIR=/usr/bin EMC2_TCL_DIR=/usr/share/emc/tcl EMC2_SCRIPT_DIR= EMC2_RTLIB_DIR=/usr/realtime-2.6.15-magma/modules/emc2 EMC2_CONFIG_DIR= EMC2_LANG_DIR=/usr/share/emc/tcl/msgs INIVAR=/usr/bin/inivar HALCMD=/usr/bin/halcmd EMC2_EMCSH=/usr/bin/emcsh EMC2_IOSH=/usr/bin/iosh EMC2 - 2.1.1 Machine configuration directory is '/home/jack/emc2/configs/stepper' Machine configuration file is '3teststep.ini' INIFILE=/home/jack/emc2/configs/stepper/3teststep.ini PARAMETER_FILE=stepper.var EMCMOT=motmod EMCIO=io TASK=milltask HALUI= DISPLAY=axis NML_FILE=emc.nml Starting EMC2... Starting EMC2 server program: emcsvr Loading Real Time OS, RTAPI, and HAL_LIB modules Starting EMC2 IO program: io Running HAL config file /home/jack/emc2/configs/stepper/3teststep.hal HAL: ERROR: pin 'motion.in-position' not found HAL:71: link failed HAL config file /home/jack/emc2/configs/stepper/3teststep.hal failed. Shutting down and cleaning up EMC2... Killing task emcsvr, PID=28298 Removing HAL_LIB, RTAPI, and Real Time OS modules Cleanup done Which indicates that the pin "motion.inpos" doesn't exist. Did I improperly try to use this function? How would I implement an enable signal that is only present during the time that the motor is commanded? Here are my 2 hal files: 3teststep.hal # core HAL config file for steppers # first load the core RT modules that will be needed # kinematics loadrt trivkins # motion controller, get name and thread periods from ini file loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD traj_period_nsec=[EMCMOT]TRAJ_PERIOD key=[EMCMOT]SHMEM_KEY # stepper module, three step generators, all three using step/dir loadrt stepgen step_type=0,0,0 # hook functions to base thread (high speed thread for step generation) addf stepgen.make-pulses base-thread # hook functions to servo thread addf stepgen.capture-position servo-thread addf motion-command-handler servo-thread addf motion-controller servo-thread addf stepgen.update-freq servo-thread # connect position commands from motion module to step generator newsig Xpos-cmd float linksp Xpos-cmd <= axis.0.motor-pos-cmd linksp Xpos-cmd => stepgen.0.position-cmd newsig Ypos-cmd float linksp Ypos-cmd <= axis.1.motor-pos-cmd linksp Ypos-cmd => stepgen.1.position-cmd newsig Zpos-cmd float linksp Zpos-cmd <= axis.2.motor-pos-cmd linksp Zpos-cmd => stepgen.2.position-cmd # connect position feedback from step generators # to motion module newsig Xpos-fb float linksp Xpos-fb <= stepgen.0.position-fb linksp Xpos-fb => axis.0.motor-pos-fb newsig Ypos-fb float linksp Ypos-fb <= stepgen.1.position-fb linksp Ypos-fb => axis.1.motor-pos-fb newsig Zpos-fb float linksp Zpos-fb <= stepgen.2.position-fb linksp Zpos-fb => axis.2.motor-pos-fb # connect enable signals for step generators newsig Xen bit linksp Xen <= axis.0.amp-enable-out linksp Xen => stepgen.0.enable newsig Yen bit linksp Yen <= axis.1.amp-enable-out linksp Yen => stepgen.1.enable newsig Zen bit linksp Zen <= axis.2.amp-enable-out linksp Zen => stepgen.2.enable # connect signals to step pulse generator outputs newsig Xstep bit newsig Xdir bit newsig Ystep bit newsig Ydir bit newsig Zstep bit newsig Zdir bit linkps stepgen.0.step Xstep linkps stepgen.0.dir Xdir linkps stepgen.1.step Ystep linkps stepgen.1.dir Ydir linkps stepgen.2.step Zstep linkps stepgen.2.dir Zdir # make signal for my special enable requirement newsig Xen1 bit linkps motion.in-position Xen1 # set stepgen module scaling - get values from ini file setp stepgen.0.position-scale [AXIS_0]INPUT_SCALE setp stepgen.1.position-scale [AXIS_1]INPUT_SCALE setp stepgen.2.position-scale [AXIS_2]INPUT_SCALE # set stepgen module velocity limits - get values from ini file setp stepgen.0.maxvel [AXIS_0]STEPGEN_MAXVEL setp stepgen.1.maxvel [AXIS_1]STEPGEN_MAXVEL setp stepgen.2.maxvel [AXIS_2]STEPGEN_MAXVEL # set stepgen module accel limits - get values from ini file setp stepgen.0.maxaccel [AXIS_0]STEPGEN_MAXACCEL setp stepgen.1.maxaccel [AXIS_1]STEPGEN_MAXACCEL setp stepgen.2.maxaccel [AXIS_2]STEPGEN_MAXACCEL 3testpinout.hal # standard pinout config file for 3-axis steppers # using a parport for I/O # # first load the parport driver loadrt hal_parport cfg="0x0378" # # next connect the parport functions to threads # read inputs first addf parport.0.read base-thread 1 # write outputs last addf parport.0.write base-thread -1 # # finally connect physical pins to the signals linksp Xstep => parport.0.pin-03-out linksp Xdir => parport.0.pin-02-out linksp Ystep => parport.0.pin-05-out linksp Ydir => parport.0.pin-04-out linksp Zstep => parport.0.pin-07-out linksp Zdir => parport.0.pin-06-out # create a signal for the estop loopback linkpp iocontrol.0.user-enable-out iocontrol.0.emc-enable-in # create signals for tool loading loopback linkpp iocontrol.0.tool-prepare iocontrol.0.tool-prepared linkpp iocontrol.0.tool-change iocontrol.0.tool-changed # create a signal for "spindle on" newsig spindle-on bit # connect the controller to it linkps motion.spindle-on => spindle-on # connect it to a physical pin linksp spindle-on => parport.0.pin-09-out ### ### You might use something like this to enable chopper drives when machine ON ### the Xen signal is defined in core_stepper.hal ### linksp Xen1 => parport.0.pin-08-out ### Jack Ensor ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
