All pastes #1490015 Raw Edit

load.hal

public text v1 · immutable
#1490015 ·published 2009-07-09 20:22 UTC
rendered paste body
# kinematics
loadrt trivkins

# motion controller, get name and thread periods from ini file
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES

# hostmot2 driver
loadrt hostmot2
#  debug_idrom=1 debug_module_descriptors=1 debug_pin_descriptors=1 debug_modules=1

# load low-level driver
loadrt [HOSTMOT2](DRIVER) config=[HOSTMOT2](CONFIG)
# read everything
addf hm2_[HOSTMOT2](BOARD).0.read          servo-thread

# motion
addf motion-command-handler                servo-thread
addf motion-controller                     servo-thread

# standard components
loadrt pid num_chan=3 
addf pid.0.do-pid-calcs                    servo-thread
addf pid.1.do-pid-calcs                    servo-thread
addf pid.2.do-pid-calcs                    servo-thread

#various stuff - mainly spindle/gearchange related

loadrt mux4 names=mpgmux,spinmux1,spinmux2
addf mpgmux servo-thread
addf spinmux1 servo-thread
addf spinmux2 servo-thread

loadrt lowpass names=spin-lpf
addf spin-lpf servo-thread

loadrt limit2 names=spin-alimit,spin-limit1,spin-limit2,spin-limit3
addf spin-alimit servo-thread
addf spin-limit1 servo-thread
addf spin-limit2 servo-thread
addf spin-limit3 servo-thread

loadrt mult2 names=rps2rpm,spingain
addf rps2rpm servo-thread
addf spingain servo-thread

loadrt abs count=2
addf abs.0 servo-thread
addf abs.1 servo-thread

loadrt near names=spin-near0,spin-nearspeed
addf spin-near0 servo-thread
addf spin-nearspeed servo-thread


#classicladder

loadrt classicladder_rt numPhysInputs=30 numPhysOutputs=30 numS32in=10 numS32out=10 numFloatIn=10 numFloatOut=10
addf classicladder.0.refresh servo-thread

#output everything
addf hm2_[HOSTMOT2](BOARD).0.write         servo-thread
addf hm2_[HOSTMOT2](BOARD).0.pet_watchdog  servo-thread

#load user space stuff
loadusr classicladder colchester.clp
loadusr halscope