diff --git a/maurice.hal b/maurice.hal index 3233e46f288b030e689ce59f60fca8655a39fe64..d5c010cee376bad820dbf890afc8df0c4b4fedc6 100644 --- a/maurice.hal +++ b/maurice.hal @@ -2,11 +2,17 @@ loadusr -W lcec_conf maurice.xml loadrt lcec loadrt trivkins loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS +loadrt and2 count=2 +loadrt not count=2 addf lcec.read-all servo-thread addf motion-command-handler servo-thread addf motion-controller servo-thread addf lcec.write-all servo-thread +addf and2.0 servo-thread +addf and2.1 servo-thread +addf not.0 servo-thread +addf not.1 servo-thread net ec_up lcec.state-op => iocontrol.0.emc-enable-in @@ -15,11 +21,33 @@ setp lcec.0.0.drivecontrol-2 1 setp lcec.0.1.drivecontrol-1 1 setp lcec.0.1.drivecontrol-2 1 -net Xachse_AF joint.0.amp-enable-out => lcec.0.0.drivecontrol-3 => lcec.0.0.drivecontrol-0 -net Yachse_AF joint.1.amp-enable-out => lcec.0.1.drivecontrol-3 => lcec.0.1.drivecontrol-0 +setp lcec.0.0.modecontrol-0 0 +setp lcec.0.0.modecontrol-4 0 +setp lcec.0.1.modecontrol-0 0 +setp lcec.0.1.modecontrol-4 0 + +net Xachse_AF joint.0.amp-enable-out => lcec.0.0.drivecontrol-3 => lcec.0.0.drivecontrol-0 net Xachse_fb lcec.0.0.pos => joint.0.motor-pos-fb net Xachse_cmd joint.0.motor-pos-cmd => lcec.0.0.poscommand +net Xaxis_fault lcec.0.0.drivestatus-3 => joint.0.amp-fault-in + +net Zachse_AF joint.2.amp-enable-out => lcec.0.1.drivecontrol-3 => lcec.0.1.drivecontrol-0 +net Zachse_fb lcec.0.1.pos => joint.2.motor-pos-fb +net Zachse_cmd joint.2.motor-pos-cmd => lcec.0.1.poscommand +net Zaxis_fault lcec.0.1.drivestatus-3 => joint.2.amp-fault-in + +net Xmodehome lcec.0.0.modestatus-3 <= and2.0.in0 +net Xstat4 lcec.0.0.drivestatus-12 <= and2.0.in1 +net Xhomed and2.0.out => joint.0.home-sw-in + +net Xhoming joint.0.homing => lcec.0.0.modecontrol-1 => lcec.0.0.modecontrol-2 => lcec.0.0.drivecontrol-4 => not.0.in +net Xposition not.0.out => lcec.0.0.modecontrol-3 + +net Zmodehome lcec.0.1.modestatus-3 <= and2.1.in0 +net Zstat4 lcec.0.1.drivestatus-12 <= and2.1.in1 +net Zhomed and2.1.out => joint.2.home-sw-in + +net Zhoming joint.2.homing => lcec.0.1.modecontrol-1 => lcec.0.1.modecontrol-2 => lcec.0.1.drivecontrol-4 => not.1.in +net Zposition not.1.out => lcec.0.1.modecontrol-3 -net Yachse_fb lcec.0.1.pos => joint.1.motor-pos-fb -net Yachse_cmd joint.1.motor-pos-cmd => lcec.0.1.poscommand diff --git a/maurice.ini b/maurice.ini index b306e7d2cbb5d807a89855350f679de32ef1da49..3d3a3b79998703715c6970f169b445d23df49cc8 100644 --- a/maurice.ini +++ b/maurice.ini @@ -63,7 +63,7 @@ TOOL_TABLE = tool.tbl [KINS] KINEMATICS = trivkins coordinates=XZ #This is a best-guess at the number of joints, it should be checked -JOINTS = 2 +JOINTS = 3 [AXIS_X] MIN_LIMIT = -200 @@ -84,13 +84,18 @@ MIN_LIMIT = -200 MAX_LIMIT = 500 HOME_DELAY = 5 HOME_VEL = 1 -HOME_OFFSET = 100.0 -HOME_SEARCH_VEL = 0.0 -HOME_LATCH_VEL = 0.0 +HOME_OFFSET = 0 +HOME_SEARCH_VEL = 0 +HOME_LATCH_VEL = 0 HOME_USE_INDEX = NO HOME_IGNORE_LIMITS = NO HOME_SEQUENCE = 0 +[JOINT_1] +# JOINT_1: not used, home immediately: +HOME_SEARCH_VEL = 0 +HOME_LATCH_VEL = 0 +HOME_SEQUENCE = 0 [AXIS_Z] MIN_LIMIT = -200 @@ -98,7 +103,7 @@ MAX_LIMIT = 200 MAX_VELOCITY = 400.0 MAX_ACCELERATION = 2000.0 -[JOINT_1] +[JOINT_2] TYPE = LINEAR HOME = 0.0 MAX_VELOCITY = 400.0 @@ -111,9 +116,9 @@ MIN_LIMIT = -200 MAX_LIMIT = 200 HOME_DELAY = 5 HOME_VEL = 1 -HOME_OFFSET = 150.0 -HOME_SEARCH_VEL = 0.0 -HOME_LATCH_VEL = 0.0 +HOME_OFFSET = 0 +HOME_SEARCH_VEL = 0 +HOME_LATCH_VEL = 0 HOME_USE_INDEX = NO HOME_IGNORE_LIMITS = NO HOME_SEQUENCE = 1