I still think analog inputs/outputs could be a good way to go. I haven't run any of this, but something like this for the Python HAL component:
https://gist.github.com/jallwine/1a0ad4ffcee00f31e286c485ea38a609 And something like this to hook it up in HAL: https://gist.github.com/jallwine/da023f11d859a7ae4d4a8b6974524386 Then you can use "M66 E0 L0" to copy the offset for joint 0 into #5399 if you need to know what it is in G code. You can also use "M68 E0 Q0.1234" to set the offset for joint 0. Change the E value to change which joint you want to configure. On Fri, May 10, 2024 at 12:56 PM Todd Zuercher via Emc-users < emc-users@lists.sourceforge.net> wrote: > Is there a way to bring out a tool offset to a hal pin? > > Here is a better description of what I'm trying to do. On this gang > router machine I'm working on. I created an extra joint for each of the 8 > stepper motors that move each of the 8 spindle Z axis. In the config I > have the Z axis connected to a dummy joint that doesn't actually do > anything. I have 8 enable signals from a gladevcp that can turn on/off > each spindle. When a spindle is enabled the spindle run signal is > connected to the VFD for that spindle, and the position command from the > dummy Z axis joint is connected to that spindle's extra Z-axis joint plus > an offset. I want to use that offset to adjust for tool and material > height differences between each of the spindles. When the spindle is > disabled, the spindle's extra joint is moved up to it's "zero" home > position and the VFD is disabled. > > I want the machine operator to both be able to manually make adjustments > to that offset between the Z-axis command and extra spindle joint, and be > able to use a probing routine to touch off the tool using a touch probe. > Initially I thought it would work well to use 8 tool offsets for this, but > I'm unsure of the best way to put those tool offset values on hal pins to > connect them to the offset pins. The machine will not be using T codes or > G43 tool offsets in the G-code, so using the tool table in not quite the > normal fashion shouldn't cause any problems. > > Todd Zuercher > P. Graham Dunn Inc.<http://www.pgrahamdunn.com/index.php> > 630 Henry Street > Dalton, Ohio 44618 > Phone: (330)828-2105ext. 2031 > > From: andy pugh <bodge...@gmail.com> > Sent: Thursday, May 09, 2024 7:33 PM > To: Enhanced Machine Controller (EMC) <emc-users@lists.sourceforge.net> > Cc: Todd Zuercher <to...@pgrahamdunn.com> > Subject: Re: [Emc-users] Global Named Parameter? > > > [EXTERNAL EMAIL] Be sure links are safe. > > > On Thu, 9 May 2024 at 18:55, Todd Zuercher via Emc-users < > emc-users@lists.sourceforge.net<mailto:emc-users@lists.sourceforge.net>> > wrote: > I would like to create a few persistent global named parameters. > > Hmmm.... > > You can make numbered parameters persistent simply by adding them to the > .vars file. > > So one way would be to run a subroutine in STARTUP_G_CODES which > transfers persistent numerical parameters into named ones. > But that leaves the storage of them unsolved. > > I did something like you describe with a Python HAL component a while ago. > Maybe this can be modified to do the trick for you? > > > https://forum.linuxcnc.org/38-general-linuxcnc-questions/50010-stmbl-pseudo-absolute-resolver-behaviour#280386 > > It basically loads some values from a file at startup, then saves the > values to file at shutdown. > > https://forum.linuxcnc.org/38-general-linuxcnc-questions/50010-stmbl-pseudo-absolute-resolver-behaviour#280386 > > -- > atp > "A motorcycle is a bicycle with a pandemonium attachment and is designed > for the especial use of mechanical geniuses, daredevils and lunatics." > - George Fitch, Atlanta Constitution Newspaper, 1912 > > _______________________________________________ > 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