commit 656b15ac4768f05a443961dcc533f42b84018866 Author: Jeff Epler Date: Fri Oct 9 11:49:22 2015 -0500 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..600f913 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.var +*.var.bak diff --git a/rosh.hal b/rosh.hal new file mode 100644 index 0000000..c125361 --- /dev/null +++ b/rosh.hal @@ -0,0 +1,55 @@ +loadrt trivkins +loadrt motmod base_period_nsec=0 servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES + +loadrt hostmot2 +loadrt hm2_eth board_ip=192.168.1.121 config="num_stepgens=7" +loadrt estop_latch + +setp hm2_7i92.0.gpio.027.is_output 1 + + +setp hm2_7i92.0.stepgen.05.steplen 2000 +setp hm2_7i92.0.stepgen.05.stepspace 2000 +setp hm2_7i92.0.stepgen.05.dirhold 800 +setp hm2_7i92.0.stepgen.05.dirsetup 800 +setp hm2_7i92.0.stepgen.05.enable 1 +setp hm2_7i92.0.stepgen.05.maxaccel 1000 +setp hm2_7i92.0.stepgen.05.maxvel 300 +setp hm2_7i92.0.stepgen.05.position-scale -53.33333 + +setp hm2_7i92.0.stepgen.06.steplen 2000 +setp hm2_7i92.0.stepgen.06.stepspace 2000 +setp hm2_7i92.0.stepgen.06.dirhold 800 +setp hm2_7i92.0.stepgen.06.dirsetup 800 +setp hm2_7i92.0.stepgen.06.enable 1 +setp hm2_7i92.0.stepgen.06.maxaccel 1000 +setp hm2_7i92.0.stepgen.06.maxvel 300 +setp hm2_7i92.0.stepgen.06.position-scale 53.33333 + +net X axis.0.motor-pos-cmd => hm2_7i92.0.stepgen.05.position-cmd +net Y axis.1.motor-pos-cmd => hm2_7i92.0.stepgen.06.position-cmd +net Xfb axis.0.motor-pos-fb <= hm2_7i92.0.stepgen.05.position-fb +net Yfb axis.1.motor-pos-fb <= hm2_7i92.0.stepgen.06.position-fb + +net Zloop axis.2.motor-pos-cmd axis.2.motor-pos-fb + +setp hm2_7i92.0.pwmgen.01.scale 100 +net LO motion.spindle-on => hm2_7i92.0.pwmgen.01.enable +net LP motion.analog-out-00 => hm2_7i92.0.pwmgen.01.value + +addf hm2_7i92.0.read-request servo-thread +addf hm2_7i92.0.read servo-thread +addf motion-command-handler servo-thread +addf motion-controller servo-thread +addf estop-latch.0 servo-thread +addf hm2_7i92.0.write servo-thread + +# create signals for tool loading loopback +net tool-prep-loop iocontrol.0.tool-prepare => iocontrol.0.tool-prepared +net tool-change-loop iocontrol.0.tool-change => iocontrol.0.tool-changed + +# A basic estop loop that only includes the hostmot watchdog. +net user-enable iocontrol.0.user-request-enable => estop-latch.0.reset +net enable-latch estop-latch.0.ok-out => iocontrol.0.emc-enable-in +net watchdog hm2_7i92.0.watchdog.has_bit => estop-latch.0.fault-in + diff --git a/rosh.ini b/rosh.ini new file mode 100644 index 0000000..bca67c2 --- /dev/null +++ b/rosh.ini @@ -0,0 +1,101 @@ +[EMC] +MACHINE = Rosh_laser + +DEBUG = 0x7FFFFFFF +#DEBUG = 0 + +[DISPLAY] +DISPLAY = axis +CYCLE_TIME = .1 + +MAX_FEED_OVERRIDE = 3.0 +MAX_SPINDLE_OVERRIDE = 2.0 + +MAX_LINEAR_VELOCITY = 200 + +DEFAULT_LINEAR_VELOCITY = 100 + +INCREMENTS = 1mm, 2mm, 5mm, 10mm + +[TASK] +TASK = milltask +CYCLE_TIME = .001 + +[RS274NGC] +PARAMETER_FILE = rosh.var + +[EMCMOT] +COMM_TIMEOUT = 1.0 +COMM_WAIT = 0.01 +BASE_PERIOD = 0 +SERVO_PERIOD = 1000000 + +[HAL] +HALFILE = rosh.hal + +[TRAJ] +AXES = 3 +COORDINATES = X Y Z +HOME = 0 0 0 +LINEAR_UNITS = mm +ANGULAR_UNITS = degree +DEFAULT_VELOCITY=300 +MAX_LINEAR_VELOCITY=300 + +[AXIS_0] +TYPE = LINEAR +MAX_VELOCITY = 200 +MAX_ACCELERATION = 800 + +BACKLASH = 0 + +FERROR = .1 +MIN_FERROR = .01 + +HOME = 0 +HOME_OFFSET = 0 +HOME_SEQUENCE = 0 + +MIN_LIMIT = -.01 +MAX_LIMIT = 36 + + +[AXIS_1] +TYPE = LINEAR +MAX_VELOCITY = 200 +MAX_ACCELERATION = 800 + +BACKLASH = 0 + +FERROR = .1 +MIN_FERROR = .01 + +HOME = 0 +HOME_OFFSET = 0 +HOME_SEQUENCE = 0 + +MIN_LIMIT = -.01 +MAX_LIMIT = 36 + + +[AXIS_2] +TYPE = LINEAR +MAX_VELOCITY = 200 +MAX_ACCELERATION = 800 + +BACKLASH = 0 + +FERROR = .1 +MIN_FERROR = .01 + +HOME = 0 +HOME_OFFSET = 0 +HOME_SEQUENCE = 0 + +MIN_LIMIT = -36 +MAX_LIMIT = .01 + +[EMCIO] +EMCIO = io +CYCLE_TIME = .1 +TOOL_TABLE=rosh.tbl