Sebastian,

I am getting close. I generated a single hal file for a two stepper and one
pwm configuration. Currently in the ini file I have it configured for only 2
axes and references only the single hal file. The error I am getting is a
following error any time I try to move an axis. I have included the minimal
hal file below. What am I still missing?

----------------------HAL FILE------------------


loadrt trivkins
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 num_joints=[TRAJ]AXES

loadrt hostmot2 debug_idrom=1 debug_module_descriptors=1
debug_pin_descriptors=1 debug_modules=1
loadrt hm2_5i20 config="firmware=hm2/5i20/SVST8_4.BIT num_stepgens=2
num_pwmgens=1 num_encoders=0"

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

addf hm2_5i20.0.pet_watchdog  servo-thread
addf hm2_5i20.0.read          servo-thread
addf hm2_5i20.0.write         servo-thread

# set up the watchdog
# setp hm2_5i20.0.watchdog.timeout_ns 10000000

# create a signal for the estop loopback
net estop-loop iocontrol.0.user-enable-out iocontrol.0.emc-enable-in

# create signals for tool loading loopback
net tool-prep-loop iocontrol.0.tool-prepare iocontrol.0.tool-prepared
net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed

# connect position commands from motion module to step generator
net Xpos-cmd axis.0.motor-pos-cmd => hm2_5i20.0.stepgen.00.position-cmd
net Ypos-cmd axis.1.motor-pos-cmd => hm2_5i20.0.stepgen.01.position-cmd
# net Zpos-cmd axis.2.motor-pos-cmd => stepgen.2.position-cmd

# connect position feedback from step generators
# to motion module
net Xpos-fb hm2_5i20.0.stepgen.00.position-fb => axis.0.motor-pos-fb
net Ypos-fb hm2_5i20.0.stepgen.01.position-fb => axis.1.motor-pos-fb
# net Zpos-fb stepgen.2.position-fb => axis.2.motor-pos-fb

# connect enable signals for step generators
# net Xen axis.0.amp-enable-out => stepgen.0.enable
# net Yen axis.1.amp-enable-out => stepgen.1.enable
# net Zen axis.2.amp-enable-out => stepgen.2.enable

# set stepgen module scaling - get values from ini file
setp hm2_5i20.0.stepgen.00.position-scale [AXIS_0]SCALE
setp hm2_5i20.0.stepgen.01.position-scale [AXIS_1]SCALE
# setp stepgen.2.position-scale [AXIS_2]SCALE

# set stepgen module accel limits - get values from ini file
# setp hm2_5i20.0.stepgen.00.maxaccel [AXIS_0]STEPGEN_MAXACCEL
# setp hm2_5i20.0.stepgen.01.maxaccel [AXIS_1]STEPGEN_MAXACCEL
# setp stepgen.2.maxaccel [AXIS_2]STEPGEN_MAXACCEL

setp hm2_5i20.0.stepgen.00.dirsetup        0.0000002
setp hm2_5i20.0.stepgen.00.dirhold         0.0000002
setp hm2_5i20.0.stepgen.00.steplen         0.000040
setp hm2_5i20.0.stepgen.00.stepspace       0.000040

setp hm2_5i20.0.stepgen.01.dirsetup        0.0000002
setp hm2_5i20.0.stepgen.01.dirhold         0.0000002
setp hm2_5i20.0.stepgen.01.steplen         0.000040
setp hm2_5i20.0.stepgen.01.stepspace       0.000040

----------------------END HAL FILE------------------

Regards,
Eric

Excellent, thanks for trying it out!  What you did looks almost right, the
only problem I see there is the firmware part of the config argument.

There are several hostmot2 firmwares available for the 5i20, and the
"firmware=" part needs to name a specific one, located where the driver can
find it.  The hostmot2 driver uses the standard kernel firmware loading
mechanism, which means the firmware must be accessible in /lib/firmware.

The first step is putting the firmwares where the loader can find them:

     If you installed EMC2 from the Debian package, the firmwares are
already there and you dont need to do anything.

     If instead you checked out the CVS tree and are using run-in-place, you
need to symlink the hostmot2 firmware directory to /lib/firmware with a
command like this:

         sudo ln -s
$HOME/my/emc2/sandbox/src/hal/drivers/mesa-hostmot2/firmware
/lib/firmware/hm2
         (change the source path to point to your actual sandbox)


Once that's done we can pick a firmware file to load.  You can see the
available files by looking in /lib/firmware/hm2/5i20; each .BIT file is a
firmware file you can tell the driver to load.  The firmwares available in
2.2.6 are:

0 [EMAIL PROTECTED] /home/seb>  ls -1 /lib/firmware/hm2/5i20/*.BIT
/lib/firmware/hm2/5i20/SV12.BIT /lib/firmware/hm2/5i20/SVST2_8.BIT
/lib/firmware/hm2/5i20/SVST8_4.BIT

"SV12" means 12 servo channels.  "SVST2_8" means 2 servos and 8 steppers.
"SVST8_4" means 8 servos and 4 steppers.  Either of the last two would work
with the rest of the config line you specified; let's say you want
SVST8_4.BIT.  You'd use a loadrt line like this:

     loadrt hm2_5i20 config="firmware=hm2/5i20/SVST8_4.BIT num_stepgens=2
num_pwmgens=1 num_encoders=0"


Give that a try and let me know how it goes.  :-)

Oh yeah, and if it doesnt work, please attach the file /var/log/syslog to
the next email.


--
Sebastian Kuzminsky
Cryogenic travel has improved since then...  I woke screaming in a
translucent box.  "There, there," said the box. "Everything will be all
right. Have some coffee."  -- Ken Macleod, "Who's afraid of Wolf 359"
<http://outofthiseos.typepad.com/blog/files/KenMacleodWhosAfraidofWolf359.ht
m>

-------------------------------------------------------------------------
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
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users



-------------------------------------------------------------------------
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
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to