On 12/21/2013 2:46 PM, Andrew wrote:
> 2013/12/21 Andrew
> 
>> Thanks for your help!
>> I used decimal numbers and it seems to work (though hex are more
>> convenient as you say). But there's another problem.
>> I configured 6 joints (ub3-ja4) to the following pins on P8:
>> joint 0 to 11 (step) and 12 (dir)
>> joint 1 to 15, 16
>> joints 3..5 to 39...46
>> Checking with the O-scope while jogging the corresponding axis I see step
>> signals on pins 11 and 15 but other step pins always output some kind of
>> noise.
>> I suspect that the pins should also be configured somewhere else besides
>> .hal file?
>>
> 
> OK, I see the string
> 
> CONFIG=prucode=/home/linuxcnc/linuxcnc/rtlib/xenomai/pru_generic.bin pru=1
> num_stepgens=6
> 
> I guess pins 11 and 15 belong to PRU0 and others to PRU1.
> Is it possible to run stepgens on both PRU0 and PRU1?

Yes, you can run stepgens on both PRUs...you'll just have to tweak the
HAL module to support this.  It's on my list of things to do some day,
but it's not real urgent.

The good news is you almost certainly don't need to run code on both
PRUs to do what you want.  If you are not seeing step/dir signals on the
newly added I/O pins, you probably have something simple wrong.

Some things to check:

* You are using the pins assigned to the on-board HDMI/LCD output.  You
have to make sure you disable *BOTH* of the HDMI "capes" (BB-BONELT-HDMI
and BB-BONELT-HDMIN) or you won't be able to use these pins.

* You need to make sure the pins are setup for GPIO output.  This is
done in the setup.sh script called at the start of the hal file.  Edit
as appropriate to add your pins to the list and make sure the direction
is "out".

* To test, before you run LinuxCNC, manually run the setup.sh file and
then see if you can toggle the GPIO pin values normally.  Note you need
to use the kernel pin numbers in setup.sh (above) and for gpio<N> (below):

  echo 1 > /sys/class/gpio/gpio<N>/value
  echo 0 > /sys/class/gpio/gpio<N>/value

...if the I/O pin doesn't 'twiddle', you don't have the BeagleBone setup
properly.  If it does, LinuxCNC and the PRU code should be able to talk
to it.  If it's still not working, double-check the pin setting in HAL
(which you can change at runtime with halcmd).  The HAL pin setting
should be the kernel number (from above) + 32.

-- 
Charles Steinkuehler
char...@steinkuehler.net

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to