Machinekit works with gmoccapy and this configuration: What are the things 
I need to change for touchy to work.

thank you

@++ Jean Claude
 

>
>

-- 
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 [email protected].
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

Attachment: BBB-CNC-CAPE-4-Axes.hal
Description: Binary data

Attachment: BBB-CNC-CAPE-4-Axes.ini
Description: Binary data

#!/bin/bash
# Copyright 2013
# Charles Steinkuehler <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

dtbo_err () {
	echo "Error loading device tree overlay file: $DTBO" >&2
	exit 1
}

pin_err () {
	echo "Error exporting pin:$PIN" >&2
	exit 1
}

dir_err () {
	echo "Error setting direction:$DIR on pin:$PIN" >&2
	exit 1
}

SLOTS=/sys/devices/bone_capemgr.*/slots

# Make sure required device tree overlay(s) are loaded
for DTBO in cape-universal cape-bone-iio ; do

	if grep -q $DTBO $SLOTS ; then
		echo $DTBO overlay found
	else
		echo Loading $DTBO overlay
		sudo -A su -c "echo $DTBO > $SLOTS" || dtbo_err
		sleep 1
	fi
done;

if [ ! -r /sys/devices/ocp.*/helper.*/AIN0 ] ; then
	echo Analog input files not found in /sys/devices/ocp.*/helper.* >&2
	exit 1;
fi

if [ ! -r /sys/class/uio/uio0 ] ; then
	echo PRU control files not found in /sys/class/uio/uio0 >&2
	exit 1;
fi

# Export GPIO pins:
# One pin needs to be exported to enable the low-level clocks for the GPIO
# modules (there is probably a better way to do this)
# 
# Any GPIO pins driven by the PRU need to have their direction set properly
# here.  The PRU does not do any setup of the GPIO, it just yanks on the
# pins and assumes you have the output enables configured already
# 
# Direct PRU inputs and outputs do not need to be configured here, the pin
# mux setup (which is handled by the device tree overlay) should be all
# the setup needed.
# 
# Any GPIO pins driven by the hal_bb_gpio driver do not need to be
# configured here.  The hal_bb_gpio module handles setting the output
# enable bits properly.  These pins _can_ however be set here without
# causing problems.  You may wish to do this for documentation or to make
# sure the pin starts with a known value as soon as possible.

sudo $(which config-pin) -f - <<- EOF
P8_7 	low 	#OUT-DIR-X
P8_8 	low 	#OUT-STEP-X
P8_9 	low 	#OUT-DIR-Y
P8_10 	low 	#OUT-STEP-Y
P8_11 	low 	#OUT-DIR-Z
P8_12 	low 	#OUT-STEP-Z
P8_13 	low 	#OUT-DIR-A
P8_14 	low 	#OUT-STEP-A
P8_15 	low 	#OUT-DIR-B
P8_16 	low 	#OUT-STEP-B
P8_17 	low 	#OUT-SPINDLE-MA
P8_18 	high 	#OUT-ENABLE-AXIS
P8_19 	low 	#OUT-SPINDLE-PWM
P8_26 	low 	#OUT-SPIN-CW-CCW

P9_11 	in 		#IN-MIN-X
P9_12 	in 		#IN-MAX-X
P9_13 	in 		#IN-MIN-Y
P9_14 	in 		#IN-MAX-Y
P9_15 	in 		#IN-MIN-Z
P9_16 	in 		#IN-MAX-Z
P9_17 	in 		#IN-PROBE
P9_18 	in 		#IN-TOOL-POS
P9_21 	in 		#IN-ESTOP
P9_22 	in 		#IN-ENCODER-B
P9_23 	low 	#OUT-ESTOP-SW
P9_24 	in 		#IN-ENCODER-A
P9_25 	low 	#OUT-MACHINE-PWR
P9_26 	in 		#IN-ENCODER-INDEX
P9_27 	low 	#OUT-VACUUM
P9_28 	low 	#AUX-05
P9_29 	low 	#OUT-COOLANT
P9_30 	low 	#AUX-06
P9_31 	low 	#OUT-SPRAY
P9_41 	in 		#IN-DOOR
P9_42 	low 	#OUT-LOCK-TOOL

P9_91 	in 		#Reserved Connected P9-41
P9_92 	in 		#Reserved connected P9-42
EOF

Reply via email to