Hi all, I've been hacking on the puma robot modules and
kinda got a stepper step and direction version of the puma config going.
But in converting the hal file to stepper control I broke the link to the 
robot simulation and the joint rotation dial indicators.  I can't figure out
how to re-enable them without getting errors about parameters being already 
linked.  
Here's my hal hack...
 
Eric
 
Sorry about the formatting, it didn't paste the same.
 
# core HAL config file for simulation - 6 axis
# load RT modulesloadrt pumakinsloadrt [EMCMOT]EMCMOT 
base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD 
traj_period_nsec=[EMCMOT]TRAJ_PERIOD key=[EMCMOT]SHMEM_KEY 
num_joints=[TRAJ]AXESloadrt ddt count=12
loadrt probe_parportloadrt hal_parport cfg=0x378setp parport.0.reset-time 
4000loadrt stepgen step_type=0,0,0,0,0,0
addf parport.0.read base-threadaddf stepgen.make-pulses base-threadaddf 
parport.0.write base-threadaddf parport.0.reset base-thread
addf stepgen.capture-position servo-threadaddf motion-command-handler 
servo-threadaddf motion-controller servo-threadaddf stepgen.update-freq 
servo-thread
net J0dir => parport.0.pin-02-outnet J0step => parport.0.pin-03-outsetp 
parport.0.pin-03-out-reset 1net J1dir => parport.0.pin-04-outnet J1step => 
parport.0.pin-05-outsetp parport.0.pin-05-out-reset 1net J2dir => 
parport.0.pin-06-outnet J2step => parport.0.pin-07-outsetp 
parport.0.pin-07-out-reset 1net J3dir => parport.0.pin-08-outnet J3step => 
parport.0.pin-09-outsetp parport.0.pin-09-out-reset 1
#net estop-ext <= parport.0.pin-10-in-not#net both-home-x <= 
parport.0.pin-11-in#net both-home-y <= parport.0.pin-12-in#net both-home-z <= 
parport.0.pin-13-in
setp stepgen.0.position-scale [AXIS_0]SCALEsetp stepgen.0.steplen 1setp 
stepgen.0.stepspace 0setp stepgen.0.dirhold 35000setp stepgen.0.dirsetup 
16000setp stepgen.0.maxaccel [AXIS_0]STEPGEN_MAXACCELnet J0pos-cmd 
axis.0.motor-pos-cmd => stepgen.0.position-cmdnet J0pos-fb 
stepgen.0.position-fb => axis.0.motor-pos-fbnet J0step <= stepgen.0.stepnet 
J0dir <= stepgen.0.dirnet J0enable axis.0.amp-enable-out => stepgen.0.enablenet 
both-home-J0 => axis.0.home-sw-innet both-home-J0 => axis.0.neg-lim-sw-innet 
both-home-J0 => axis.0.pos-lim-sw-in
setp stepgen.1.position-scale [AXIS_1]SCALEsetp stepgen.1.steplen 1setp 
stepgen.1.stepspace 0setp stepgen.1.dirhold 35000setp stepgen.1.dirsetup 
16000setp stepgen.1.maxaccel [AXIS_1]STEPGEN_MAXACCELnet J1pos-cmd 
axis.1.motor-pos-cmd => stepgen.1.position-cmdnet J1pos-fb 
stepgen.1.position-fb => axis.1.motor-pos-fbnet J1step <= stepgen.1.stepnet 
J1dir <= stepgen.1.dirnet J1enable axis.1.amp-enable-out => stepgen.1.enablenet 
both-home-J1 => axis.1.home-sw-innet both-home-J1 => axis.1.neg-lim-sw-innet 
both-home-J1 => axis.1.pos-lim-sw-in
setp stepgen.2.position-scale [AXIS_2]SCALEsetp stepgen.2.steplen 1setp 
stepgen.2.stepspace 0setp stepgen.2.dirhold 35000setp stepgen.2.dirsetup 
16000setp stepgen.2.maxaccel [AXIS_2]STEPGEN_MAXACCELnet J2pos-cmd 
axis.2.motor-pos-cmd => stepgen.2.position-cmdnet J2pos-fb 
stepgen.2.position-fb => axis.2.motor-pos-fbnet J2step <= stepgen.2.stepnet 
J2dir <= stepgen.2.dirnet J2enable axis.2.amp-enable-out => stepgen.2.enablenet 
both-home-J2 => axis.2.home-sw-innet both-home-J2 => axis.2.neg-lim-sw-innet 
both-home-J2 => axis.2.pos-lim-sw-in
setp stepgen.3.position-scale [AXIS_3]SCALEsetp stepgen.3.steplen 1setp 
stepgen.3.stepspace 0setp stepgen.3.dirhold 35000setp stepgen.3.dirsetup 
16000setp stepgen.3.maxaccel [AXIS_3]STEPGEN_MAXACCELnet J3pos-cmd 
axis.3.motor-pos-cmd => stepgen.3.position-cmdnet J3pos-fb 
stepgen.3.position-fb => axis.3.motor-pos-fbnet J3step <= stepgen.3.stepnet 
J3dir <= stepgen.3.dirnet J3enable axis.3.amp-enable-out => stepgen.3.enablenet 
both-home-J3 => axis.3.home-sw-innet both-home-J3 => axis.3.neg-lim-sw-innet 
both-home-J3 => axis.3.pos-lim-sw-in
setp stepgen.4.position-scale [AXIS_4]SCALEsetp stepgen.4.steplen 1setp 
stepgen.4.stepspace 0setp stepgen.4.dirhold 35000setp stepgen.4.dirsetup 
16000setp stepgen.4.maxaccel [AXIS_4]STEPGEN_MAXACCELnet J4pos-cmd 
axis.4.motor-pos-cmd => stepgen.4.position-cmdnet J4pos-fb 
stepgen.4.position-fb => axis.4.motor-pos-fbnet J4step <= stepgen.4.stepnet 
J4dir <= stepgen.4.dirnet J4enable axis.4.amp-enable-out => stepgen.4.enablenet 
both-home-J4 => axis.4.home-sw-innet both-home-J4 => axis.4.neg-lim-sw-innet 
both-home-J4 => axis.4.pos-lim-sw-in
setp stepgen.5.position-scale [AXIS_5]SCALEsetp stepgen.5.steplen 1setp 
stepgen.5.stepspace 0setp stepgen.5.dirhold 35000setp stepgen.5.dirsetup 
16000setp stepgen.5.maxaccel [AXIS_5]STEPGEN_MAXACCELnet J5pos-cmd 
axis.5.motor-pos-cmd => stepgen.5.position-cmdnet J5pos-fb 
stepgen.5.position-fb => axis.5.motor-pos-fbnet J5step <= stepgen.5.stepnet 
J5dir <= stepgen.5.dirnet J5enable axis.5.amp-enable-out => stepgen.5.enablenet 
both-home-J5 => axis.5.home-sw-innet both-home-J5 => axis.5.neg-lim-sw-innet 
both-home-J5 => axis.5.pos-lim-sw-in
# add motion controller functions to servo thread#addf motion-command-handler 
servo-thread#addf motion-controller servo-thread#addf ddt.0 servo-thread#addf 
ddt.1 servo-thread#addf ddt.2 servo-thread#addf ddt.3 servo-thread#addf ddt.4 
servo-thread#addf ddt.5 servo-thread#addf ddt.6 servo-thread#addf ddt.7 
servo-thread#addf ddt.8 servo-thread
# create HAL signals for position commands from motion modulenewsig J0pos 
float#linksp J0pos <= axis.0.motor-pos-cmd#newsig J1pos float#linksp J1pos <= 
axis.1.motor-pos-cmd#newsig J2pos float#linksp J2pos <= 
axis.2.motor-pos-cmd#newsig J3pos float#linksp J3pos <= 
axis.3.motor-pos-cmd#newsig J4pos float#linksp J4pos <= 
axis.4.motor-pos-cmd#newsig J5pos float#linksp J5pos <= axis.5.motor-pos-cmd
# loop position commands back to motion module feedback#linksp J0pos => 
axis.0.motor-pos-fb#linksp J1pos => axis.1.motor-pos-fb#linksp J2pos => 
axis.2.motor-pos-fb#linksp J3pos => axis.3.motor-pos-fb#linksp J4pos => 
axis.4.motor-pos-fb#linksp J5pos => axis.5.motor-pos-fb
# send the position commands thru differentiators to# generate velocity and 
accel signals# define the signals, and hook them up#newsig J0vel float#newsig 
J0acc float#linksp J0pos => ddt.0.in#linkps ddt.0.out => J0vel#linksp J0vel => 
ddt.1.in#linkps ddt.1.out => J0acc
#newsig J1vel float#newsig J1acc float#linksp J1pos => ddt.2.in#linkps 
ddt.2.out => J1vel#linksp J1vel => ddt.3.in#linkps ddt.3.out => J1acc
#newsig J2vel float#newsig J2acc float#linksp J2pos => ddt.4.in#linkps 
ddt.4.out => J2vel#linksp J2vel => ddt.5.in#linkps ddt.5.out => J2acc
#newsig J3vel float#newsig J3acc float#linksp J3pos => ddt.6.in#linkps 
ddt.6.out => J3vel#linksp J3vel => ddt.7.in#linkps ddt.7.out => J3acc
#newsig J4vel float#newsig J4acc float#linksp J4pos => ddt.8.in#linkps 
ddt.8.out => J4vel#linksp J4vel => ddt.9.in#linkps ddt.9.out => J4acc
#newsig J5vel float#newsig J5acc float#linksp J5pos => ddt.10.in#linkps 
ddt.10.out => J5vel#linksp J5vel => ddt.11.in#linkps ddt.11.out => J5acc
# estop loopbacknet estop-loop iocontrol.0.user-enable-out 
iocontrol.0.emc-enable-in
# create signals for tool loading loopbacknet tool-prep-loop 
iocontrol.0.tool-prepare iocontrol.0.tool-preparednet tool-change-loop 
iocontrol.0.tool-change iocontrol.0.tool-changed
# amp control#newsig xena bit#linksp xena axis.0.amp-enable-out#newsig yena 
bit#linksp yena axis.1.amp-enable-out#newsig zena bit#linksp zena 
axis.2.amp-enable-out#newsig aena bit#linksp aena axis.3.amp-enable-out#newsig 
bena bit#linksp bena axis.4.amp-enable-out#newsig cena bit#linksp cena 
axis.5.amp-enable-out
#newsig xflt bit#linksp xflt axis.0.amp-fault-in#newsig yflt bit#linksp yflt 
axis.1.amp-fault-in#newsig zflt bit#linksp zflt axis.2.amp-fault-in#newsig aflt 
bit#linksp aflt axis.3.amp-fault-in#newsig bflt bit#linksp bflt 
axis.4.amp-fault-in#newsig cflt bit#linksp cflt axis.5.amp-fault-in
loadusr -W pumagui
loadrt scale count=6
addf scale.0 servo-thread#addf scale.1 servo-thread#addf scale.2 
servo-thread#addf scale.3 servo-thread#addf scale.4 servo-thread#addf scale.5 
servo-thread
linksp J0pos scale.0.in#linksp J1pos scale.1.in#linksp J2pos scale.2.in#linksp 
J3pos scale.3.in#linksp J4pos scale.4.in#linksp J5pos scale.5.in
setp scale.0.gain 1#setp scale.1.gain 1#setp scale.2.gain 1#setp scale.3.gain 
1#setp scale.4.gain 1#setp scale.5.gain 1
net J0scaled scale.0.out pumagui.joint1#net J1scaled scale.1.out 
pumagui.joint2#net J2scaled scale.2.out pumagui.joint3#net J3scaled scale.3.out 
pumagui.joint4#net J4scaled scale.4.out pumagui.joint5#net J5scaled scale.5.out 
pumagui.joint6
#net j0 axis.0.joint-pos-fb pumagui.joint1#net j1 axis.1.joint-pos-fb 
pumagui.joint2#net j2 axis.2.joint-pos-fb pumagui.joint3#net j3 
axis.3.joint-pos-fb pumagui.joint4#net j4 axis.4.joint-pos-fb 
pumagui.joint5#net j5 axis.5.joint-pos-fb pumagui.joint6#net j6 
axis.6.joint-pos-fb pumagui.grip
 
 
 
 
_________________________________________________________________
Want to read Hotmail messages in Outlook? The Wordsmiths show you how.
http://windowslive.com/connect/post/wedowindowslive.spaces.live.com-Blog-cns!20EE04FBC541789!167.entry?ocid=TXT_TAGLM_WL_hotmail_092008
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to