Download Visualizza/apri

Transcript
APPENDICE A. CONFIGURAZIONE SISTEMA RTAI
| cut -d: -f2 | awk ’{ print $1}’‘;;
FreeBSD|OpenBSD) IP=‘ifconfig | grep -E ’inet.[0-9]’ |
grep -v ’127.0.0.1’ | awk ’{ print $2}’‘ ;;
SunOS) IP=‘ifconfig -a | grep inet | grep -v ’127.0.0.1’
| awk ’{ print $2} ’‘ ;;
*) IP="Unknown";;
esac
echo "$IP"
==== STOP COPY AT LINE ABOVE ==== (Do not include this line!)
Copy the following lines in a rlinsmod script that you can use to quickly load
RTAI-Lab and Comedi modules in kernel and configures the drivers.
user@rtai:~$ sudo nano /usr/realtime/bin/rlinsmod
==== START COPY FROM LINE BELOW ==== (Do not include this line!)
# RLINSMOD - RTAI-Lab Insmod.
# Inserts RTAI-Lab modules in kernel and configures the drivers.
MOD_DIR=/usr/realtime/modules
IP=‘/usr/realtime/bin/read_IP‘
sync
insmod ${MOD_DIR}/rtai_hal.ko
insmod ${MOD_DIR}/rtai_lxrt.ko
insmod ${MOD_DIR}/rtai_fifos.ko
insmod ${MOD_DIR}/rtai_sem.ko
insmod ${MOD_DIR}/rtai_mbx.ko
insmod ${MOD_DIR}/rtai_msg.ko
insmod ${MOD_DIR}/rtai_netrpc.ko ThisNode="$IP"
insmod ${MOD_DIR}/rtai_rtdm.ko
modprobe pcan
# only if you want to use Peak CAN boards
modprobe comedi
# only if you want to use comedi
modprobe kcomedilib
modprobe comedi_fc
insmod ${MOD_DIR}/rtai_comedi.ko
modprobe ni_pcimio # comedi driver for analog I/O board
comedi_calibrate -f /dev/comedi0
echo "Realtime IP address: $IP"
==== STOP COPY AT LINE ABOVE ==== (Do not include this line!)
Copy the following lines in a rlrmmod script that you can use to quickly remove
RTAI-Lab and Comedi modules from kernel.
user@rtai:~$ sudo nano /usr/realtime/bin/rlrmmod
104