On Friday 24 November 2017 05:21:23 andy pugh wrote: > On 24 November 2017 at 05:43, Gene Heskett <[email protected]> wrote: > > But w/o a sample at base-thread speeds, its not going to be possible > > to measure the software encoder because at servo-thread speeds, > > several A pulses could go by between servo-thread samples. So it > > looks as if I'll have to set hm2_5i25.0.counter-mode true, at least > > long enough to obtain these answers. > > Can you back up a bit and explain what the heck you are trying to do? > > If you need to use the software encoder then you can add a base thread > (and you can poll the 5i25 GPIO in the base thread too, if that helps) > > But I think you are probably heading off in entirely the wrong > direction.
Because I do not know the gear ratio(s) that exists between the motor, where this new encoder is now driven from, and the spindle, I want to setup a temporary count=true condition in the spindle encoder so that I can determine the number of A pulses from the encoder on the motor that go by from index pulse to index pulse from the encoder on the spindle. 2 separate encoders IOW, one on the motor for its much higher frequency of A/B and one on the spindle just for its Z index. So motion then can define the spindles position to an at least 10x greater accuracy. That number would need to be multiplied by 4 because when cont-mode is back to false, its then in quadrature mode counting edges, and fed back into the ini file as SCALE, but with a unique name, and the position of the gear change switches controlling which of the new SCALE_L or SCALE_H is actually used by motion when its called on to do spindle synchronized movements. I perceive that an error in setting this SCALE might result in a step correction in the position as the index pulse resets the spindle position back to, or up to, zero degrees. If the scale is correct, then there should not be a step correction at the index pulse. This would be undesirable because of its effect on requested vs actual tpi or tpmm delivered to the axis being synchronously moved. There have been times when it wasn't Z, like the last time I fixed the pulley which had worked loose on TLM's spindle motor. I had to rigid thread on the X axis. Worked well FWTW. If you know of a better way to determine the gear scaling short of tearing it apart to count teeth, please elaborate. Thanks Andy. 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) Genes Web page <http://geneslinuxbox.net:6309/gene> ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
