On 5/4/25 11:07, Peter Wallace wrote:
On Sun, 4 May 2025, Nicklas SB Karlsson wrote:

Date: Sun, 04 May 2025 13:39:48 +0200
From: Nicklas SB Karlsson <n...@nksb.eu>
Reply-To: "Enhanced Machine Controller (EMC)"
    <emc-users@lists.sourceforge.net>
To: emc-users@lists.sourceforge.net
Subject: Re: [Emc-users] Connect index pulse?

It is an ordinary very common encoder have with a zero output. It does not have any index-enable net just an output. All encoders I have seen with an index output have been like this so therefore assume it is a very common problem how to connect these and simple solution available.

I could of course create an index net or write a component with an IO output that write value only then edge is detected. Then it will be possible to connect this to joint index-enable as both are IO.

Nicklas Karlsson


LinuxCNC assumes that the encoder counter hardware has index support.
By support I mean the hardware can detect the index signal and either
clear the count or better, capture the count at index for later processing.

This processing is the following:

If index-enable is false, the hardware ignores the index signal. If index-enable is set true (by LinuxCNC) the hardware is primed to detect the index signal. When index enable is true and an index signal is detected, two things are done, the encoder position presented to LinuxCNC is zeroed (this is optional, Theres a LinuxCNC INI constant to change this expectation) and index-enable is set false. This falling edge of index-enable is used by LinuxCNC to detect the index occurance.

Also LinuxCNCs software encoder component has this index support built
in.

The reason for this is that the index pulse can be very short relative
to the servo thread period so will be missed at higher speeds unless
captured in hardware. The clearing of the position is done for a similar reason: so the position of index occurance is captured in hardware so
thats is not a velocity dependent position error because of software
sampling of the count at the servo thread rate.

You could make a simple index component to create a (tri-state) index-enable pin from a software read index signal. It could also do the position zerowing if desired, but it would not work except at quite low speeds or low resolution. That is, it might work for homing but not for spindle synched motion.

Actually it can, Peter. I investigated the possibility when I made the top hats for my taps, which involves grinding a notch in the bottom edge of the r8 collet to insure no tap rotational slippage, the collet is keyed to the spindle giving a fixed location for the 4mm bolt into the side of the top hat that locks the hat to the R8.

I got sorta cute with the gear shift logic as I run the motor at about 10-15 revs during a gear change, not returning to the commanded speed until the knob is home in either position.  So I can, while the spindle is running WOT, reach up and change gears w/o any gear grinding.  Speed response using Jons pwm-servo, a full 4 quadrant control, brings the motor from full song down to 10 revs in under 100millisecs, long before the gears can be disengaged by my turning the knob.  The new gear then silently engages and is fully meshed by the time the knob arrives at the end location which restores whatever speed it was turning before I changed the gear.  The motor is slowed by the controller sucking power back out and charging up the filter caps, from 125 volts to around 170 volts. That's well above the voltage rating of the caps, but that overvoltage is then used up before the caps explode by being used to restore the motor speed at the end of the gearshift.

That slow speed is set as input to a mux4, and could be used to orient the spindle if I ever build a tool changer.  Experimentally I have, like Sam S., played with spindle orientation and I believe it could work well enough to change taps mounted in tap hats. OTOH I'm now 90 and concentrating my creativity in faster, hi temp, 3d printers. And the long term effects of being a DM-II is beginning to make itself felt.

s��n 2025-05-04 klockan 10:26 +0100 skrev andy pugh:
On Sun, 4 May 2025 at 09:26, Nicklas SB Karlsson <n...@nksb.eu> wrote:
> > Any simple solution to connect index pulse from encoder to joint index-enable?

Are you sure you want to do that? Why?

Typically the system sets the whole index-enable net, then when the
index pulse is seen it is taken low by the encoder counter, that
signals to the rest of the net that the index has been seen,
Cheers Gene Heskett CET

--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis



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

Reply via email to