On Fri, Sep 11, 2020 at 5:16 PM andy pugh <bodge...@gmail.com> wrote: > > On Fri, 11 Sep 2020 at 21:18, Dave Matthews <n36...@gmail.com> wrote: > > > The examples that I have found are for Mesa cards and seem to have a > > lot of stuff in them that I don't have in my .ini and .hal files. > > Have you looked at the supplied sim-axis-gantry config? > > > Any hints on where I can find the docs on editing the ini and hal > > files to add the second Y home switch and having 4 joint homing? > > The important parts are the [KINS] section and the homing sequence > numbers for the joints here: > https://github.com/LinuxCNC/linuxcnc/blob/master/configs/sim/axis/gantry/gantry.ini > > Then you just need to connect the two joint.N.home-sw-in pins to the > relevant parport pins in the HAL file. > > (I wouldn't suggest looking at the simulated-gantry-home HAL file, > that is almost entirely related to _simulating_ home switches.)
Almost there. There isn't a gantry.hal file on github that I can find to reference. I set up the Kinematics and added the new switch being careful to not have a name conflict. I copy/pasted the joint for the current Y axis (JOINT_1) creating JOINT_3. I then replaced the 1 in that section with 3 to create the new joint. When I start LinuxCNC I get an exit because ypos-cmd, ypos-fb, ystep and yenable have already been assigned during the JOINT_1 setup. With those lines commented out I can get a startup and 4 joints showing on the screen. The relevant hal section, a copy of JOINT_1 is: setp stepgen.3.position-scale [JOINT_3]SCALE setp stepgen.3.steplen 1 setp stepgen.3.stepspace 0 setp stepgen.3.dirhold 65000 setp stepgen.3.dirsetup 65000 setp stepgen.3.maxaccel [JOINT_3]STEPGEN_MAXACCEL net ypos-cmd joint.3.motor-pos-cmd => stepgen.3.position-cmd net ypos-fb stepgen.3.position-fb => joint.3.motor-pos-fb net ystep <= stepgen.3.step net ydir <= stepgen.3.dir net yenable joint.3.amp-enable-out => stepgen.3.enable net home-y-right => joint.3.home-sw-in I am not finding the place in the docs telling me what to do with these lines. Delete them? Rename the variables? I didn't do this as I couldn't find other references which leads me to think they may be fixed names used by the code. Dave _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users