Saturday, 13 July 2019

Decoding absolute reference marks on Heindenhain LS378C


After a recent ebay find of affordable 0.001 glass scales, for my lathe cross slide, I now need a suitable DRO. Mixing scales with different reference mark standards, is a bad idea, but I like the challenge. Lets build a DRO capable of decoding Heidenhain reference marks.
 Although there are some DIY solutions out there, nothing I found was open source without custom hardware, thus not usable to extend.

Dedicated chips like ls7366r have automatic decoding for index pulses, but do not support encoded reference marks.

The idea is to use three HCTL2000 chips connected to an arduino, then feed the output to an ESP8266 for serving a simple web page.

The document Linear scales by Heidenhain [1] ,gives the formulae to decode the absolute reference marks on their linear glass scales [page 9].

Below a screenshot of the three tracks, the index pulses appear to be randomly spaced.

 After applying the formula to the input data, the result makes no sense.

my $Mrr = 0; # Signal periods between two reference marks





$B = (2*$Mrr)-$N;
$D = +1; #direction
# P1 Position of the first traversed reference mark in signal periods
$P1 = (abs($B) - sgn($B) -1) * $N/2 + ( sgn($B) - sgn($D) ) * abs( $Mrr) /2;
$N = 1000; #Nominal increment between two fixed reference marks in signal periods (see table below)


References
1 http://www.auto-met.com/heidenhain/08PDF/NC%20Linear.pdf

Chipmaster Gear Cutting

  Calculate all the possible gear combinations for the gear selector to cut a 15TPI thread: Imperial TPI C 5 24 20 Imperial TPI ...