On Monday 14 September 2020 15:16:04 Dave Matthews wrote:

> 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/ga
> >ntry/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

One of the rules for the net command is that only the first of that name 
in your hal file, is allowed to be an input.  Re-use of a given name is 
assumed to be a link to send that signal to another target, like your 
joint 3 stuff.  A way to send a given signal to many places.  Your 
net ystep lines arrows are backwards IOW.  And its confusing because at 
one point, those <= and => were ignored. only there to help us humans 
understand.  But with two-pass enabled, I'm not so sure, so someone 
should clarify that.

So scan the file, and make sure the first use of a signals name, assigns 
the source of that signal.
>
>
> _______________________________________________
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>


_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to