Re: [Machinekit] BeagleBone Black overlays

2018-03-04 Thread Robert Nelson
Hi John,

On Sat, Mar 3, 2018 at 10:59 PM, John Morris  wrote:
> I'm having a heck of a time getting overlays working on the BBB with RCN's
> 2018-02 MK image.  I'm weak on the concepts to begin with, and here's what
> I've done.
>
> With the stock `/boot/uEnv.txt`, most pins aren't already assigned to any
> cape:
>
> machinekit@beaglebone:~$ config-pin P9.18 lo
> P9_18 pinmux file not found!
> Pin has no cape: P9_18
> machinekit@beaglebone:~$ ls -d /sys/devices/platform/ocp/ocp:P*
> /sys/devices/platform/ocp/ocp:P9_19_pinmux
> /sys/devices/platform/ocp/ocp:P9_20_pinmux
>
> Trying to load the universal cape with `config-pin overlay cape-universal`
> dumps a huge list of errors to the console and kernel oopses on the 4.14
> kernel.  On the 4.4 kernel, the pins seem to appear in
> `/sys/devices/platform/ocp/ocp:P*`, but `config-pin P9.18 lo` says "WARNING:
> GPIO pin not exported, cannot set direction or value!".  So I don't do that.
>
> Instead, I compile and install a .dts file with just the wanted pins, and
> add the line `uboot_overlay_addr0=/lib/firmware/bb_autoclave-00A0.dtbo` to
> `/boot/uEnv.txt`.  This doesn't seem to assign any pins, but I'm unclear
> whether it's a bad file or something else.
>
>
> https://github.com/zultron/autoclave_control/blob/master/etc/bb_autoclave.dts
>
> Compiling produces no unexpected errors:
>
>> machinekit@beaglebone:~$ sudo dtc -O dtb -o
>> /lib/firmware/bb_autoclave-00A0.dtbo -b 0 -@ etc/bb_autoclave.dts
>> /lib/firmware/bb_autoclave-00A0.dtbo: Warning (unit_address_vs_reg):
>> Node /fragment@0 has a unit name, but no reg property
>
>
>
> Maybe this is meaningful; the Linux 4.14 version:
>
>> machinekit@beaglebone:~$ sudo /opt/scripts/tools/version.sh
>> git:/opt/scripts/:[ad016da40de5805f1a6f981cbb6c454b1a7f244b]
>> eeprom:[A335BNLT0A5A1513BBBK3416]
>> model:[TI_AM335x_BeagleBone_Black]
>> dogtag:[Machinekit Debian Image 2018-02-04]
>> bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot
>> 2018.01-2-g9aa111a004]
>> bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot
>> 2015.01-1-gb2412df]

Your old eMMC is blocking U-Boot Overlays:

sudo dd if=/dev/zero of=/dev/mmcblk1 bs=1M count=10


>> kernel:[4.14.16-ti-rt-r30]
>> uboot_overlay_options:[enable_uboot_overlays=1]
>>
>> uboot_overlay_options:[uboot_overlay_addr0=/lib/firmware/bb_autoclave-00A0.dtbo]
>> uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo]
>> uboot_overlay_options:[enable_uboot_cape_universal=1]

I'm in a middle of a rewrite to enable cape-universal in this
situation, currently your selection of
"uboot_overlay_addr0=/lib/firmware/bb_autoclave-00A0.dtbo" is blocking
cape-univesal:

Step 1: Upgrade to this bootloader:

sudo /opt/scripts/tools/developers/update_bootloader.sh --beta

Step 2: Install this kernel: (haven't backported the changes to
v4.14.x/v4.9.x/v4.4.x yet)

sudo /opt/scripts/tools/update_kernel.sh --bone-channel --exp

Step 3: in your overlay add a new fragment@0 section like this, but
with the pins your "bb_autoclave" uses:

https://github.com/beagleboard/bb.org-overlays/blob/master/src/arm/BB-BONE-4D4C-01-00A1.dts#L16-L53


>> pkg:[bb-cape-overlays]:[4.4.20180126.0-0rcnee0~stretch+20180126]
>> pkg:[bb-wl18xx-firmware]:[1.20170829-0rcnee2~stretch+20180104]
>> pkg:[firmware-ti-connectivity]:[20170823-1rcnee0~stretch+20170830]
>> groups: �‘debian�’: no such user

opps, i need to check for machinekit too..

>> groups:[]
>> dmesg | grep pinctrl-single
>> [1.409569] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800
>> size 568
>> dmesg | grep gpio-of-helper
>> [1.411448] gpio-of-helper ocp:cape-universal: ready
>> END
>
>
> The Linux 4.4 version, slightly different:
>
>> root@beaglebone:/home/machinekit# sudo /opt/scripts/tools/version.sh
>> [...]
>> kernel:[4.4.113-ti-rt-r147]
>> [...]
>> dmesg | grep gpio-of-helper
>> [1.511377] gpio-of-helper ocp:cape-universal: Allocated GPIO id=0
>> [1.511589] gpio-of-helper ocp:cape-universal: Allocated GPIO id=1
>> [1.511604] gpio-of-helper ocp:cape-universal: ready
>> END
>
>
> So who knows what dumb thing I'm missing?  Thanks!
>
> John
>
> --
> website: http://www.machinekit.io blog: http://blog.machinekit.io github:
> https://github.com/machinekit
> --- You received this message because you are subscribed to the Google
> Groups "Machinekit" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to machinekit+unsubscr...@googlegroups.com.
> Visit this group at https://groups.google.com/group/machinekit.
> For more options, visit https://groups.google.com/d/optout.



-- 
Robert Nelson
https://rcn-ee.com/

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the 

Re: [Machinekit] Re: how to add toolchanger funtion to BBB with Xylotex cape

2018-03-04 Thread Aurelien
Hi

Thanks i have now undo some change for ishomed and i have see work fine.

The commented parts i uncommented now, but it's same for function i try to 
add, i have moved one parts of your code to a case 4 but i'm not sure if i 
need to break or not at the end.


The most problem for now is to found a way for debuging, i ho have GUI so i 
use only SSHand this one never displayed this type of message try DEBUG= 1 
to 10 without success


rtapi_print_msg(RTAPI_MSG_ERR,"Error state in toolchanger - 
now disabled - unload toolchanger5\n");  


i think i understand bad how to work position_cmd position_req position_acum


Best regards

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to machinekit+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.


toolchanger.comp
Description: Binary data


Re: [Machinekit] Re: how to add toolchanger funtion to BBB with Xylotex cape

2018-03-04 Thread 'schoone...@btinternet.com' via Machinekit


On 03/03/18 16:17, Aurelien wrote:

Many thanks for reply

yes this is your code but modified by Mike Ross for 6 tool turret

For the Axis i have set as you says LINEAR and with trial and error 
have found the good SCALE for turn 360° exactly



i don't understand "You simply home axis A" because with this this 
component this is impossible without following error from classic setting,


You just set the homing values to 0, then A will show as homed with no 
movement.

(read www.machinekit.io/docs/config/ini_homing/)

If you have connected up properly, when homed the relevant pin will be 
true and allow the M6TN command without movement to initialise.


also impossible to move the motor by GUI. (hijack stepgen) (i think 
you know that lol)


It is not impossible, just load a config without the toolchanger 
component and A connected as normal to work out moves required



There is so much commented out in your component, including the tool 
number setting on homing provision, I am not going to get into
trouble shooting something that seriously diverges from the component I 
wrote.


I would get the original component working by reducing the tool numbers 
to 6 and changing the angles / steps between stations accordingly.


Even if you managed to get the ATC seeking the home switch, you have to 
update machinekit with the current tool number.


The method my component uses is simple, because it sets the number via 
M6, whilst not attempting to process the command.


It could be adapted to rotate the ATC until the home switch is triggered 
when A is homed, then trigger a halui MDI command to set the tool number.


What you need to be wary of is un-commanded movement and whether it will 
always be safe or if it is possible to foul a workpiece
or injure the operator when the ATC suddenly starts rotating during a 
homing procedure.



--
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups "Machinekit" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to machinekit+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.