OK, I just made a simple hal file to "test" the spindle component. I guess that is what I should have done before.
First of all the documentation has a serious error. The parameter to specify the number of gears is not 'gears=' it is really 'numgears=' I found this out when my test file would not load. Then I had to look at the source code in git. Even then the whole comp generating process with parameters is not really easy to understand so I had to look at a component that I know worked like carousel to see how the parameters syntax works. if no gears are specified then only one gear will be created. if 1 gear is specified then 2 pins are created for each. in other words the number of pins created is the gears parameter -1 so the documentation would be more clear if it said: "The pins listed in this section are created in multiples depending on the 'numgears=' parameter. The numgears parameter is used to specify more than one gear. The numgears parameter represents the number of actual gears - 1 If no numgears parameter is specified then numgears will default to a value of 0 which represents a spindle with 1 physical gear. So if numgears=2 then for each of the pins listed below 2 pins will be created such as: spindle.N.scale.0 spindle.N.scale.1" Wow it would have been a lot nicer if the numgears parameter worked like other parameters in hal components like 'count=' where the value entered is actually equal to the quantity desired. It is fine that the numbering sequence starts with 0 as this is the way other component parameters or values are numbered. John Figie On Sun, Nov 27, 2022 at 10:33 AM Martin Dobbins <[email protected]> wrote: > I understand this differently from you, but I would humbly suggest it may > make it clearer for more folks if it were written this way: > > "The following pins are created depending on (or upon) the 'gears=' > parameter*" > > One of each pin is created for each gear, however if no gears are > specified then a default of one gear will be created. (I hope this is > correct and if the user specifies gears = 0 they will have no scale pins, > rather than 1? or is *spindle.**N* not actually a scale pin and will be > present no matter what?) > > Martin > > ________________________________ > From: John Figie > Sent: Sunday, November 27, 2022 9:54 AM > To: Enhanced Machine Controller (EMC) <[email protected]> > Subject: Re: [Emc-users] Clausing NC Spindle > > Andy, > > Maybe it is just me but I find things in the documentation that are really > confusing. At these times I think I would, if I could, make it more clear > in the documentation. But, I also realize that sometimes what seems clear > to me is not always clear to others :-). > > for example from the spindle comp documentation: > > "*The following pins are created depending the ’gears=’ parameter.* > > One of each pin is created for each gear. If no gears are specified then > one gear will be created. For instance if you have gears=1 on your command > line, you will have two scale pins: > *spindle.**N* > *.scale.0spindle.**N**.scale.1"* > > So if I have 1 gear then: the first sentence says "one pin is created for > each gear". but then later it says 2 pins are created? > > Now, If I have one gear then I would think of it as a one speed > transmission and you cannot select anything. If I have a 3 speed > transmission I would think of it as having 3 gears even though high speed > may not be using any actual "gears" in the transmission. > > So am I overthinking this? Does this documentation make sense to > everyone else as currently written? > > Another part of the documentation that I struggled with is the description > of the pins for the iocontrol.N tool changer pins. There are references to > the original io control even with timing diagrams and a description of some > of the issues found but then for io_v2 there is not a timing diagram. I > only got this to work for me by trial and error because it didn't work the > way I expected by reading the documentation. > > By the way, I did successfully make a turret comp with a state machine that > finds the home position if it is not known the first time a tool is > selected. I just got it working yesterday > > Anyway I don't want this to sound like a complaint because I really like > linuxcnc and greatly appreciate the countless hours many have spent, like > Andy for example, making it what it is today. I am hoping that I can help > make linuxcnc even better and maybe documentation is one area where I could > make a small contribution. > > John Figie > > > On Mon, Nov 21, 2022 at 9:10 AM andy pugh <[email protected]> wrote: > > > On Sun, 20 Nov 2022 at 16:05, John Figie <[email protected]> wrote: > > > > > > The gearbox has switch contacts to > > > indicate which gear it is in. I see there is a component called > "spindle" > > > which includes provisions for gearboxes. > > > > The "spindle" component (and the similar "gearbox", "gearshift" and > > "gearchange") component handle the task of converting > > spindle.0.speed-out-xxx into a motor speed to send to the VFD. > > > > So the answer to your question is that you use both. > > > > To avoid pin name collisions I think that you would have to use > > "names=spindlecomp gears=3" when you load the component. > > > > We might have to change the name of the HAL component, at the moment > > both the component and the motion comp create spindle.0.at-speed, and > > probably other clashes too. > > > > -- > > 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 > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/emc-users > > > > _______________________________________________ > Emc-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-users > > _______________________________________________ > Emc-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-users > _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
