Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.naic.edu/~phil/turret/encoder.html
Дата изменения: Sun May 9 20:16:01 2004
Дата индексирования: Tue Oct 2 03:32:55 2012
Кодировка:
Поисковые слова: п р п п р п п р п п р п п р п п р п п р п п р п п р п
|
Turret Encoder
08may04
encoder models.
converting encoder counts to turret degrees.
turret encoder offset table
08may04: using the 08may04 survey to measure
the turret encoder offset.
Encoder models: (top)
The turret encoder is an absolute encoder (heidelhain sp..). There
are two versions of this encoder in use at AO (turret,tiedowns):
-
roc424 (the long one). This is the original type and is the one currently
installed on the turret.
-
roq424/425 these are the shorter ones. They are currently in use on the
tiedowns.
These encoders are not software compatible. The roc
is a 23 bit encoder with the 24th bit being a a parity bit. The roq424
is a 24 bit encoder while the roq425 is a 25 bit encoder. They do not have
the parity bit (at least we do not use it).
The encoder interface board built at ao is used
for both the roc and the roq. There are different pals for this board
(one set for the roc and another for the roq) .
The roc and the roq also count in opposite directions.
A clockwise turn increases one while decreases the other.
If you install an encoder and it moves in the wrong
direction you probably have a mismatch between the software and the
hardware.
Converting encoder counts
to turret degrees. (top)
The encoders have 4096 counts per turn. The gearing
between the encoder and the floor has:
-
4096 * (210)/5 /360. = 477.867 encoder counts per
turret degree.
Prior to 07may04 the encoder had been adjusted so that
0 encoder corresponded to 0 degrees turret. When the turret was remounted
on 07may04 (after the coupling being broken) the encoder was off by about
85.47 degrees. Since it was difficult to adjust the encoder (and we had
no index anyway), I added a software encoder offset in the little star
routine: GetEncoderValue() (in /home/phil/vw/datatk/pnt/ttt/tt/Pc/Unix/turret.lib).
The only problem is that the encoder is a 23 bit
number being read into a 32 long. The number read from the encoder is always
positive and varies from 0 to 2^23-1 (for the roc). It is not possible
to just add and offset to the encoder value read. When the encoder decreases
from positive numbers thru zero, it jumps to 2^23-1.
roc solution:
The largest encoder value needed (after offsets)
is 477.867*360 = 172032 . The encoder is read a byte at a time.
The left most byte has a max value of 2. I put a check so that if the 3rd
byte is greater than 2 (0x30000= 196608) then it subtracts
2^23-8388608L. It then adds on the offset. The current offset is 40843L
(08may04 before the 09may04 survey). This works but it is not a very
good way to do it. If the offset turned out to be negative and larger than
(196608-172032) then this would not work. It is probably better to take
half the max value. this would be: ( ge 0x400000). The check the last byte
would be: ge 0x40 .
roq solution:
The roq counts down so 172032 encoder counts is
0 degrees. The correction should be:
if (i[2] ge 0x40) encinp=encinp - 8388608L
encout= 172032- (encinp+offset)
This had not been tested or implemented...
It would probably also be a good idea to create a parameter that is
computer settable that is the encoder offset (the tiedowns have this).
Record of turret encoder offsets.
date |
encoder offset |
before 07may04
(roc424) |
no offset |
07may04
(roc424) |
40843 encCounts=85.47deg.
from tracking two sources lbw. |
08may04:Horn survey after
encoder index lost: (top)
Mike, ellen, and erik surveyed the sbtx, sbn, and cbhi_1
horns on 08may04 to find the correct turret offset (after the turret encoder
position had been lost). An offset of 85.47 degrees was installed 07may04
from tracking a few sources with lbw and forcing the azimuth error to zero.
The survey technique was:
-
Survey a receiver at a given turret position
-
compute the error in the turret direction
-
If the turret error was large, go back to step 1.
If the turret offset inserted was wrong, then the turret position for all
the receivers (and all of the measurements) should be off by a constant
value. Each measurement gave an error of how far off the current
turret position was from the ideal position. Subtracting this error from
each current turret position allowed us to use every theodolite measurement
to compute the constant offset (I used .784 to convert inches to turret
degrees). The survey results are in the table below....
Survey results (all measurements)
rcvr
|
TurPosUsed
(Deg)
|
Error
(Deg)
|
TurPos (deg)
computed
|
Lynn's
turretPos
|
Lynn's-turPos
computed (deg)
|
sbtx1 |
61.957
|
-0.376
|
62.332
|
62.290
|
-0.042
|
sbtx2 |
61.561
|
-0.742
|
62.303
|
62.290
|
-0.013
|
sbtx3 |
62.354
|
0.069
|
62.284
|
62.290
|
0.006
|
sbtxFinal |
62.291
|
0.019
|
62.273
|
62.290
|
0.017
|
sbn1 |
76.549
|
-0.399
|
76.948
|
76.892
|
-0.056
|
sbnFinal |
76.936
|
-0.009
|
76.944
|
76.892
|
-0.052
|
cbh1 |
164.673
|
-0.371
|
165.045
|
165.010
|
-0.035
|
cbhFinal |
165.027
|
-0.020
|
165.048
|
165.010
|
-0.038
|
columns:
-
Rcvr: receiver name. Each receiver was shot more than once. The
turret was moved between shoots.
-
TurPosUsed(deg): Turret position used for this shoot.
-
Error: Error in degrees. Subtracting this value from the TurPosUsed
should give the correct turret position.
-
TurPosComputed: This is TurPosUsed - Error. This should be the correct
turret position. It should be constant for a single receiver.
-
LynnsTurretPos: this is the position measured on 02may04. It includes
the error that lynn had in his final measurement.
-
Lynns-TurPosComputed: This is the offset in the 08may04 survey from
the 02may04 survey. It measures the error in the turret encoder (in turret
degrees).
The mean value of Lynns - TurComputed position:
-
-.027 turret degrees.
-
-.034 inches
-
-1.2 arc seconds on the sky
-.027 turret degrees is small enough that i am going to continue using
lynns turret positions measured on 02may04 as the reference positions.
processing: survey/040508/doit.pro
home_~phil