[Emc-users] Help with gantrykins needed
Hello, guys! I need some help with setting up kinematics for my gantry-type machine. I have attempted following steps: 0) searched web for instructions, found only this one: http://axis.unpy.net/01162326817, which contains ini and hal file for simulated machine I haven't found any wiki page or a section in manuals that would address this question I have previously asked this question in this list and received suggestion to start with gantrykins and stepper-gantry sample config (and I tried to follow this advice) 1) I created machine config for testing purposes in stepconf, called it Test1 2) I took kinematics.hal file from stepper-gantry sample config folder 3) I edit the kinematics.hal file to change the assignement between joints and axis (so that first and third joints are X axis, second joint is Y axis, fourth joint is Z axis), so here is the contents of that file: ## Kinematics Motion Controller # Kinematics loadrt gantrykins # Settings for gantrykins setp gantrykins.joint-0 0 setp gantrykins.joint-1 1 setp gantrykins.joint-2 0 setp gantrykins.joint-3 2 # motion controller, get name and thread periods from ini file loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD 4) I edited following lines from Test1.hal before: loadrt trivkins loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES after: loadrt num_joints=[TRAJ]AXES First line deleted, second line - also deleted those phrases, which already are in kinematics.hal fine 5) I edited Test1.ini file and following sections of that file now looks as follows: [HAL] HALFILE = kinematics.hal HALFILE = test1.hal POSTGUI_HALFILE = custom_postgui.hal [TRAJ] AXES = 4 COORDINATES = X Y Z A MAX_ANGULAR_VELOCITY = 10.00 DEFAULT_ANGULAR_VELOCITY = 1.00 LINEAR_UNITS = mm ANGULAR_UNITS = degree CYCLE_TIME = 0.010 DEFAULT_VELOCITY = 1.00 MAX_LINEAR_VELOCITY = 10.00 [EMCIO] EMCIO = io CYCLE_TIME = 0.100 TOOL_TABLE = tool.tbl [AXIS_0] TYPE = LINEAR HOME = 0.0 MAX_VELOCITY = 10.0 MAX_ACCELERATION = 30.0 STEPGEN_MAXACCEL = 37.5 SCALE = 80.0 FERROR = 1 MIN_FERROR = .25 MIN_LIMIT = -0.001 MAX_LIMIT = 80.0 HOME_OFFSET = 0.0 [AXIS_1] TYPE = LINEAR HOME = 0.0 MAX_VELOCITY = 10.0 MAX_ACCELERATION = 30.0 STEPGEN_MAXACCEL = 37.5 SCALE = 80.0 FERROR = 1 MIN_FERROR = .25 MIN_LIMIT = -0.001 MAX_LIMIT = 80.0 HOME_OFFSET = 0.0 [AXIS_2] TYPE = LINEAR HOME = 0.0 MAX_VELOCITY = 10.0 MAX_ACCELERATION = 30.0 STEPGEN_MAXACCEL = 37.5 SCALE = 80.0 FERROR = 1 MIN_FERROR = .25 MIN_LIMIT = -0.001 MAX_LIMIT = 80.0 HOME_OFFSET = 0.0 [AXIS_3] TYPE = LINEAR HOME = 0.0 MAX_VELOCITY = 10.0 MAX_ACCELERATION = 30.0 STEPGEN_MAXACCEL = 37.5 SCALE = 80.0 FERROR = 1 MIN_FERROR = .25 MIN_LIMIT = -4.0 MAX_LIMIT = 80.0 HOME_OFFSET = 0.0 All the remaining data in test1.ini file were unchanged. The problem is that now I am getting error at EMC startup. The error window contains this data: Print file information: RUN_IN_PLACE=no EMC2_DIR= EMC2_BIN_DIR=/usr/bin EMC2_TCL_DIR=/usr/share/emc/tcl EMC2_SCRIPT_DIR= EMC2_RTLIB_DIR=/usr/realtime-2.6.24-16-rtai/modules/emc2 EMC2_CONFIG_DIR= EMC2_LANG_DIR=/usr/share/emc/tcl/msgs INIVAR=inivar HALCMD=halcmd EMC2_EMCSH=emcsh EMC2_IOSH=iosh EMC2 - 2.3.4 Machine configuration directory is '/home/vie/emc2/configs/Test1' Machine configuration file is 'Test1.ini' INIFILE=/home/vie/emc2/configs/Test1/Test1.ini PARAMETER_FILE=emc.var EMCMOT=motmod EMCIO=io TASK=milltask HALUI= DISPLAY=axis NML_FILE=emc.nml Starting EMC2... Starting EMC2 server program: emcsvr Loading Real Time OS, RTAPI, and HAL_LIB modules Starting EMC2 IO program: io Shutting down and cleaning up EMC2... Killing task emcsvr, PID=11282 Removing HAL_LIB, RTAPI, and Real Time OS modules Removing NML shared memory segments Cleanup done Kernel message information: [0.00] Linux version 2.6.24-16-rtai (r...@hardy) (gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)) #1 Tue Sep 30 22:54:33 EEST 2008 (Ubuntu 2.6.24-12.22-generic) [0.00] BIOS-provided physical RAM map: [0.00] BIOS-e820: - 000a (usable) [0.00] BIOS-e820: 000f - 0010 (reserved) [0.00] BIOS-e820: 0010 - 3fff (usable) [0.00] BIOS-e820: 3fff - 3fff3000 (ACPI NVS) [0.00] BIOS-e820: 3fff3000 - 4000 (ACPI data) [0.00] BIOS-e820: fec0 - fec01000 (reserved) [0.00] BIOS-e820: fee0 - fee01000 (reserved) [0.00] BIOS-e820: - 0001 (reserved) [0.00] 127MB HIGHMEM available. [0.00] 896MB LOWMEM available. [0.00] Entering add_active_range(0, 0, 262128) 0 entries of 256 used [0.00] Zone PFN ranges: [0.00] DMA 0 - 4096 [0.00] Normal 4096 -
Re: [Emc-users] Help with gantrykins needed
Debug file information: Could not open command file 'test1.hal' 11282 PID TTY STAT TIME COMMAND Stopping realtime threads Unloading hal components do you have the file test1.hal in the directory with the .ini file? -- dos centavos -- ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Help with gantrykins needed
On 19 May 2010 11:37, Viesturs Lācis viesturs.la...@gmail.com wrote: [ 2720.513056] config string '0x378 out ' [ 2720.625328] gantrykins: exports duplicate symbol kinematicsInverse (owned by trivkins) You need to edit the HAL file and remove the reference to trivkins. -- atp -- ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Help with gantrykins needed
Thanks, Steve and Andy, for Your effort! :) Andy, I already deleted the line, which loads the trivkins, but i have no idea, where that reference is still remaining. Steve, yes, the file is in the folder, which is created on my desktop by stepconf, the file is not open by some other application, but it shows these lines at error message again and again - i checked several times. I just tried to start EMC once more and to make this process easier to understand for me, here are contents of kinematics.hal, test1.hal and test1. ini files as well as the information from the error message. Andy, i would really appreciate, if You could show me, which lines still contain that reference. Test1.ini # Generated by stepconf at Wed May 19 11:33:46 2010 # If you make changes to this file, they will be # overwritten when you run stepconf again [EMC] MACHINE = Test1 NML_FILE = emc.nml DEBUG = 0 [DISPLAY] DISPLAY = axis EDITOR = gedit POSITION_OFFSET = RELATIVE POSITION_FEEDBACK = ACTUAL MAX_FEED_OVERRIDE = 1.2 INTRO_GRAPHIC = emc2.gif INTRO_TIME = 5 PROGRAM_PREFIX = /home/vie/emc2/nc_files INCREMENTS = 5mm 1mm .5mm .1mm .05mm .01mm .005mm [FILTER] PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale 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.010 [RS274NGC] PARAMETER_FILE = emc.var [EMCMOT] EMCMOT = motmod COMM_TIMEOUT = 1.0 COMM_WAIT = 0.010 BASE_PERIOD = 10 SERVO_PERIOD = 100 [HAL] HALFILE = kinematics.hal HALFILE = test1.hal POSTGUI_HALFILE = custom_postgui.hal [TRAJ] AXES = 3 COORDINATES = X Y Z MAX_ANGULAR_VELOCITY = 10.00 DEFAULT_ANGULAR_VELOCITY = 1.00 LINEAR_UNITS = mm ANGULAR_UNITS = degree CYCLE_TIME = 0.010 DEFAULT_VELOCITY = 1.00 MAX_LINEAR_VELOCITY = 10.00 [EMCIO] EMCIO = io CYCLE_TIME = 0.100 TOOL_TABLE = tool.tbl [AXIS_0] TYPE = LINEAR HOME = 0.0 MAX_VELOCITY = 10.0 MAX_ACCELERATION = 30.0 STEPGEN_MAXACCEL = 37.5 SCALE = 80.0 FERROR = 1 MIN_FERROR = .25 MIN_LIMIT = -0.001 MAX_LIMIT = 80.0 HOME_OFFSET = 0.0 [AXIS_1] TYPE = LINEAR HOME = 0.0 MAX_VELOCITY = 10.0 MAX_ACCELERATION = 30.0 STEPGEN_MAXACCEL = 37.5 SCALE = 80.0 FERROR = 1 MIN_FERROR = .25 MIN_LIMIT = -0.001 MAX_LIMIT = 80.0 HOME_OFFSET = 0.0 [AXIS_2] TYPE = LINEAR HOME = 0.0 MAX_VELOCITY = 10.0 MAX_ACCELERATION = 30.0 STEPGEN_MAXACCEL = 37.5 SCALE = 80.0 FERROR = 1 MIN_FERROR = .25 MIN_LIMIT = -0.001 MAX_LIMIT = 80.0 HOME_OFFSET = 0.0 [AXIS_3] TYPE = LINEAR HOME = 0.0 MAX_VELOCITY = 10.0 MAX_ACCELERATION = 30.0 STEPGEN_MAXACCEL = 37.5 SCALE = 80.0 FERROR = 1 MIN_FERROR = .25 MIN_LIMIT = -4.0 MAX_LIMIT = 80.0 HOME_OFFSET = 0.0 Test1.hal # Generated by stepconf at Wed May 19 11:33:46 2010 # If you make changes to this file, they will be # overwritten when you run stepconf again loadrt num_joints=[TRAJ]AXES loadrt probe_parport loadrt hal_parport cfg=0x378 out setp parport.0.reset-time 5000 loadrt stepgen step_type=0,0,0,0 loadrt pwmgen output_type=0 addf parport.0.read base-thread addf stepgen.make-pulses base-thread addf pwmgen.make-pulses base-thread addf parport.0.write base-thread addf parport.0.reset base-thread addf stepgen.capture-position servo-thread addf motion-command-handler servo-thread addf motion-controller servo-thread addf stepgen.update-freq servo-thread addf pwmgen.update servo-thread net spindle-cmd = motion.spindle-speed-out = pwmgen.0.value net spindle-enable = motion.spindle-on = pwmgen.0.enable net spindle-pwm = pwmgen.0.pwm setp pwmgen.0.pwm-freq 100.0 setp pwmgen.0.scale 1166.6667 setp pwmgen.0.offset 0.114285714286 setp pwmgen.0.dither-pwm true net spindle-cw = motion.spindle-forward net estop-out = parport.0.pin-01-out net xdir = parport.0.pin-02-out net xstep = parport.0.pin-03-out setp parport.0.pin-03-out-reset 1 net ydir = parport.0.pin-04-out net ystep = parport.0.pin-05-out setp parport.0.pin-05-out-reset 1 net zdir = parport.0.pin-06-out net zstep = parport.0.pin-07-out setp parport.0.pin-07-out-reset 1 net adir = parport.0.pin-08-out net astep = parport.0.pin-09-out setp parport.0.pin-09-out-reset 1 net spindle-cw = parport.0.pin-14-out net spindle-pwm = parport.0.pin-16-out net xenable = parport.0.pin-17-out setp stepgen.0.position-scale [AXIS_0]SCALE setp stepgen.0.steplen 1 setp stepgen.0.stepspace 0 setp stepgen.0.dirhold 35000 setp stepgen.0.dirsetup 35000 setp stepgen.0.maxaccel [AXIS_0]STEPGEN_MAXACCEL net xpos-cmd axis.0.motor-pos-cmd = stepgen.0.position-cmd net xpos-fb stepgen.0.position-fb = axis.0.motor-pos-fb net xstep = stepgen.0.step net xdir = stepgen.0.dir net xenable axis.0.amp-enable-out = stepgen.0.enable setp stepgen.1.position-scale [AXIS_1]SCALE setp stepgen.1.steplen 1 setp stepgen.1.stepspace 0 setp stepgen.1.dirhold 35000 setp stepgen.1.dirsetup 35000 setp stepgen.1.maxaccel [AXIS_1]STEPGEN_MAXACCEL net ypos-cmd axis.1.motor-pos-cmd = stepgen.1.position-cmd net ypos-fb stepgen.1.position-fb = axis.1.motor-pos-fb net ystep = stepgen.1.step
Re: [Emc-users] Help with gantrykins needed
lot of snips 4) I edited following lines from Test1.hal before: loadrt trivkins loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES after: loadrt num_joints=[TRAJ]AXES loadrt num_joints=[TRAJ]AXES ^^ that is incorrect. loadrt loads a component. num_joints=[TRAJ]AXES is a parameter for that component, but the component is missing. In your case (since you changed kinematics.hal to loadrt gantrykins) you don't need Test1.hal at all. more snip Debug file information: Could not open command file 'test1.hal' here's the error ^^ I would just remove the HALFILE = test1.hal line from the ini. Also bear in mind that linux is CaSe SeNsItIvE... Best regards, Alex -- ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Help with gantrykins needed
Viesturs, I think you may have a problem with capitalisation of the file name - remember, Linux is CASE SENSITIVE. The program is looking for test1.hal with a small 't' - if your file name starts with a capital 'T' the program will think it is a different file.. Ian Viesturs La-cis wrote: Test1.ini HALFILE = test1.hal Test1.hal Debug file information: Could not open command file 'test1.hal' -- ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Help with gantrykins needed
Alex, Andy, thank You a lot! Removed the line: loadrt num_joints=[TRAJ]AXES from Test1.hal and it worked. Before that I also removed the line: HALFILE = Test1.hal from the Test1.ini file, but it didn't work - displayed error message, where i found the line: Debug file information: Invalid configuration of axes is preventing EMC from starting So I suppose that EMC does need that Test1.hal file. Thank You anyway, now I will try to test, if motors are working correctly. Viesturs 2010/5/19 Alex Joni alex.j...@robcon.ro: lot of snips 4) I edited following lines from Test1.hal before: loadrt trivkins loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES after: loadrt num_joints=[TRAJ]AXES loadrt num_joints=[TRAJ]AXES ^^ that is incorrect. loadrt loads a component. num_joints=[TRAJ]AXES is a parameter for that component, but the component is missing. In your case (since you changed kinematics.hal to loadrt gantrykins) you don't need Test1.hal at all. more snip Debug file information: Could not open command file 'test1.hal' here's the error ^^ I would just remove the HALFILE = test1.hal line from the ini. Also bear in mind that linux is CaSe SeNsItIvE... Best regards, Alex -- ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users