On 7/21/2013 9:52 PM, Troy Jacobson wrote:
> One of the things I've been experimenting with is a bit of python code to
> help figure out the PID values for printer extruders.  I have it working in
> Axis.  Since that requires edits to the main hal file, I was hoping to get
> it to work all by itself.
> 
> Everything seems to be working, except the bbb's PWM generator.  Below is a
> subset of the hal file I'm using.  What is missing/wrong?

I don't see anything seriously major wrong, but there are a few minor
glitches...comments in-line:

> I execute the file with
> halrun -I test.hal
> 
> 
> loadusr -w /home/linuxcnc/linuxcnc/configs/BeagleBone/BeBoPr/setup.sh
> loadrt trivkins
> loadrt motmod servo_period_nsec=1000000 num_joints=1
> loadrt hal_pru_generic
> prucode=/home/linuxcnc/linuxcnc/rtlib/pru_generic.bin num_pwmgens=1
> num_stepgens=1
> 
> 
> addf hal_pru_generic.capture-position servo-thread
> addf hal_pru_generic.update servo-thread
> addf motion-command-handler servo-thread
> addf motion-controller servo-thread

The hal_pru_generic.update thread should come after the motion threads,
just like in the BeBoPr.hal file

> setp hal_pru_generic.pwmgen.00.pwm_period 1000000

Note that I have one more zero in the PWM period in my HAL file than you
have above.  That shouldn't keep it from working, however.

> setp hal_pru_generic.pwmgen.00.out.00.pin       0xAD
> setp hal_pru_generic.pwmgen.00.out.00.enable    1
> setp hal_pru_generic.pwmgen.00.out.00.value     0.5

Where did you get the 0xAD pin value?  That's not setup by the setup.sh
script and corresponding device tree files I provided(*), unless you
edited them too.  Valid pin numbers would be 0xA1 for Extruder 0 and and
0xA0 for Extruder 1, or 0x70 for the bed heater.

Make sure you have the latest code, I've been tweaking the configuration
files quite a bit as I get things setup and working with my existing
printer:

  cd $/linuxcnc
  git pull origin
  cd src
  make
  sudo make setuid

(*) 0xAD might have been in an older hal file, before I got everything
working.  It is not currently a valid pin number for either the BeBoPr
or the BeBoPr-Bridge configuration.

-- 
Charles Steinkuehler
[email protected]

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to