Thanks Phil, I just broke it and lost pulses to the spindle. Went back and commented in the other direction and I have my spindle back.
Who would have thought this was so hard... John > -----Original Message----- > From: Phill Carter [mailto:phillcarte...@gmail.com] > Sent: June-16-21 10:45 PM > To: linuxcnc-users > Subject: Re: [Emc-users] #ifdef > > > > > On 17 Jun 2021, at 2:47 pm, John Dammeyer <jo...@autoartisans.com> wrote: > > > > Not sure I understand. Say for example the existing HAL file has this: > > > > net spindle-vel-fb-rps <= hm2_7i92.0.stepgen.05.velocity-fb > > > > But now I'm trying to get the HAL file correct so LinuxCNC starts without > > errors. > > > > net spindle-vel-fb-rps <= hm2_7i92.0.encoder.01.velocity > > > > Now I can go through and comment things out with a '#' on each line but my > > existing spindle has a 'near' and 'ramped' feature to > make it accelerate more slowly. There are suddenly a lot of '#' comments and > it gets hard to read. > > > > So how would I use haltcl to select one or the other of the above examples. > > if { condition } { > net spindle-vel-fb-rps <= hm2_7i92.0.stepgen.05.velocity-fb > } else { > net spindle-vel-fb-rps <= hm2_7i92.0.encoder.01.velocity > } > > > > I mean I know I need to not use the stepgen velocity feedback to show > > spindle velocity because that's now the encoders job but > there are a lot of non-starters at the moment. > > > > > >> -----Original Message----- > >> From: Phill Carter [mailto:phillcarte...@gmail.com > >> <mailto:phillcarte...@gmail.com>] > >> Sent: June-16-21 9:12 PM > >> To: linuxcnc-users > >> Subject: Re: [Emc-users] #ifdef > >> > >> > >> > >>> On 17 Jun 2021, at 2:03 pm, John Dammeyer <jo...@autoartisans.com> wrote: > >>> > >>> Is there something like an > >>> > >>> #ifdef > >>> #else > >>> #endif > >>> > >>> in HAL files? > >>> Thanks > >>> John > >> > >> No, but it is possible to use HALTCL files. > >> > >> <http://linuxcnc.org/docs/devel/html/hal/haltcl.html > >> <http://linuxcnc.org/docs/devel/html/hal/haltcl.html> > <http://linuxcnc.org/docs/devel/html/hal/haltcl.html > <http://linuxcnc.org/docs/devel/html/hal/haltcl.html>>> > >> > >> > >>> > >>> "ELS! Nothing else works as well for your Lathe" > >>> Automation Artisans Inc. > >>> www dot autoartisans dot com > >>> > >>> > >>> _______________________________________________ > >>> Emc-users mailing list > >>> Emc-users@lists.sourceforge.net <mailto:Emc-users@lists.sourceforge.net> > >>> https://lists.sourceforge.net/lists/listinfo/emc-users > >>> <https://lists.sourceforge.net/lists/listinfo/emc-users> > >> > >> > >> _______________________________________________ > >> Emc-users mailing list > >> Emc-users@lists.sourceforge.net <mailto:Emc-users@lists.sourceforge.net> > >> https://lists.sourceforge.net/lists/listinfo/emc-users > >> <https://lists.sourceforge.net/lists/listinfo/emc-users> > > > > > > > > _______________________________________________ > > Emc-users mailing list > > Emc-users@lists.sourceforge.net <mailto:Emc-users@lists.sourceforge.net> > > https://lists.sourceforge.net/lists/listinfo/emc-users > > <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 _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users