From: Jeff E. <gi...@gi...> - 2013-08-19 20:06:08
|
sample-configs: sim linear delta configuration http://git.linuxcnc.org/?p=linuxcnc.git;a=commitdiff;h=5a9848b --- configs/sim/axis/ldelta.ini | 166 ++++++++++++++++++++++++++++++++++++++++ configs/sim/axis/sim_ldelta.hal | 42 ++++++++++ 2 files changed, 208 insertions(+) diff --git a/configs/sim/axis/ldelta.ini b/configs/sim/axis/ldelta.ini new file mode 100644 index 0000000..303ac96 --- /dev/null +++ b/configs/sim/axis/ldelta.ini @@ -0,0 +1,166 @@ +[EMC] + +MACHINE = Delta-robot-with-linear-joints +DEBUG = 0 + +[DISPLAY] +DISPLAY = axis + +MAX_LINEAR_VELOCITY = 100 +MAX_FEED_OVERRIDE = 1.2 +DEFAULT_LINEAR_VELOCITY = 100 +PROGRAM_PREFIX = ../../../nc_files/ + +INTRO_GRAPHIC = linuxcnc.gif +INTRO_TIME = 5 + +EDITOR = gedit +TOOL_EDITOR = tooledit + +INCREMENTS = 1 in, 0.1 in, 10 mil, 1 mil + +POSITION_OFFSET = RELATIVE +POSITION_FEEDBACK = COMMANDED + +[FILTER] +PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image +PROGRAM_EXTENSION = .py Python Script + +png = image-to-gcode +gif = image-to-gcode +jpg = image-to-gcode +py = python + +[TASK] +TASK = milltask +CYCLE_TIME = 0.001 + +[RS274NGC] +PARAMETER_FILE = sim.var + +[EMCMOT] +EMCMOT = motmod +BASE_PERIOD = 0 +SERVO_PERIOD = 1000000 + +[HAL] +HALFILE = sim_ldelta.hal +HALFILE = axis_manualtoolchange.hal +HALUI = halui + +[TRAJ] +AXES = 4 +COORDINATES = X Y Z A +LINEAR_UNITS = mm +ANGULAR_UNITS = degree +DEFAULT_VELOCITY = 10 +MAX_LINEAR_VELOCITY = 10 + +[KINS] +JOINTS = 4 + +[JOINT_0] +TYPE = LINEAR +HOME = 270 +MAX_VELOCITY = 300 +MAX_ACCELERATION = 5000.0 +BACKLASH = 0.000 +INPUT_SCALE = 4000 +OUTPUT_SCALE = 1.000 +MIN_LIMIT = 0 +MAX_LIMIT = 375 +FERROR = 0.050 +MIN_FERROR = 0.010 +HOME_OFFSET = 375 +HOME_SEARCH_VEL = 0.0 +HOME_LATCH_VEL = 0.0 +HOME_USE_INDEX = NO +HOME_IGNORE_LIMITS = NO +HOME_SEQUENCE = 0 + +[JOINT_1] +TYPE = LINEAR +HOME = 270 +MAX_VELOCITY = 300 +MAX_ACCELERATION = 5000.0 +BACKLASH = 0.000 +INPUT_SCALE = 4000 +OUTPUT_SCALE = 1.000 +MIN_LIMIT = 0 +MAX_LIMIT = 375 +FERROR = 0.050 +MIN_FERROR = 0.010 +HOME_OFFSET = 375 +HOME_SEARCH_VEL = 0.0 +HOME_LATCH_VEL = 0.0 +HOME_USE_INDEX = NO +HOME_IGNORE_LIMITS = NO +HOME_SEQUENCE = 0 + +[JOINT_2] +TYPE = LINEAR +HOME = 270 +MAX_VELOCITY = 300 +MAX_ACCELERATION = 5000.0 +BACKLASH = 0.000 +INPUT_SCALE = 4000 +OUTPUT_SCALE = 1.000 +MIN_LIMIT = 0 +MAX_LIMIT = 375 +FERROR = 0.050 +MIN_FERROR = 0.010 +HOME_OFFSET = 375 +HOME_SEARCH_VEL = 0.0 +HOME_LATCH_VEL = 0.0 +HOME_USE_INDEX = NO +HOME_IGNORE_LIMITS = NO +HOME_SEQUENCE = 0 + +[JOINT_3] +TYPE = LINEAR +HOME = 0 +MAX_VELOCITY = 100 +MAX_ACCELERATION = 500.0 +BACKLASH = 0.000 +INPUT_SCALE = 4000 +OUTPUT_SCALE = 1.000 +MIN_LIMIT = -1e6 +MAX_LIMIT = 1e6 +FERROR = 0.050 +MIN_FERROR = 0.010 +HOME_OFFSET = 0.0 +HOME_SEARCH_VEL = 0.0 +HOME_LATCH_VEL = 0.0 +HOME_USE_INDEX = NO +HOME_IGNORE_LIMITS = NO +HOME_SEQUENCE = 0 + +[AXIS_X] +MAX_VELOCITY = 300 +MAX_ACCELERATION = 5000 +MIN_LIMIT = -95 +MAX_LIMIT = 95 + +[AXIS_Y] +MAX_VELOCITY = 300 +MAX_ACCELERATION = 5000 +MIN_LIMIT = -95 +MAX_LIMIT = 95 + +[AXIS_Z] +MAX_VELOCITY = 300 +MAX_ACCELERATION = 5000 +MIN_LIMIT = 0 +MAX_LIMIT = 35 + +[AXIS_A] +HOME = 0 +MAX_VELOCITY = 100 +MAX_ACCELERATION = 1000 +MIN_LIMIT = -1e6 +MAX_LIMIT = 1e6 + +[EMCIO] +EMCIO = io +CYCLE_TIME = 0.1 +TOOL_TABLE = sim.tbl diff --git a/configs/sim/axis/sim_ldelta.hal b/configs/sim/axis/sim_ldelta.hal new file mode 100644 index 0000000..74a8b7a --- /dev/null +++ b/configs/sim/axis/sim_ldelta.hal @@ -0,0 +1,42 @@ +# core HAL config file for simulation + +# first load all the RT modules that will be needed +# kinematics +loadrt lineardeltakins +# motion controller, get name and thread periods from ini file +loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES + +loadusr -W lineardelta MIN_JOINT=-420 + +# add motion controller functions to servo thread +addf motion-command-handler servo-thread +addf motion-controller servo-thread + +# create HAL signals for position commands from motion module +# loop position commands back to motion module feedback +net J0pos joint.0.motor-pos-cmd => joint.0.motor-pos-fb lineardelta.joint0 +net J1pos joint.1.motor-pos-cmd => joint.1.motor-pos-fb lineardelta.joint1 +net J2pos joint.2.motor-pos-cmd => joint.2.motor-pos-fb lineardelta.joint2 +net Apos joint.3.motor-pos-cmd => joint.3.motor-pos-fb + +net L lineardeltakins.L => lineardelta.L +net R lineardeltakins.R => lineardelta.R + +sets L 269 +sets R 130.25 + +# estop loopback +net estop-loop iocontrol.0.user-enable-out iocontrol.0.emc-enable-in + +# 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 + +net spindle-fwd motion.spindle-forward +net spindle-rev motion.spindle-reverse +#net spindle-speed motion.spindle-speed-out + +net lube iocontrol.0.lube +net flood iocontrol.0.coolant-flood +net mist iocontrol.0.coolant-mist + |