Keeping the platform in focus
aug15
In
progress...
Intro
The platform is suspended from the towers by
metal (wire rope) cables. As the temperature changes, these cables
get longer or shorter. This moves the platform. To be able to
point the telescope, we need to stop this platform motion.
- Devices used to keep the platform in focus:
- laser rangers(distomats): there 6 of these spaced around the
rim road. They measure the distance to corners of the platform
every two minutes
- tiedowns: 3 tiedown jacks are connected to the corners of
the platform via cables. These jacks are computer
controllable. If the distomat measurement shows the platform
to be too high or low, we command the tiedowns to pull, or
release to bring the platform back into focus. By default we
only move the platform vertically (all 3 tiedowns get moved by
the same amount).
- Software used to keep the platform in focus
- commux.c - dos program that reads the distomats every 2
minutes.
- runs on a standalone pc (with display screen).
- a copy of the source can be found in ~lrpc/dosProg. the
original is on the dos pc.
- writes data from pc to an output file on aonetwork:
~lrpc/lr_data/...
- This is done every two minutes by default.
- lrMon.c- vxWorks programs to input the commux.c data and
compute height.
- runs in vxWorks cpu: pntp3
- source ~phil/vw/datatk/lr/lrMon.c
- The file contains two separate tasks: lrMon, lrMonIo
- lrMonIo
- Loops waiting for the commux.c disc file to be updated..
then reads in the new data.
- computes the avg height from the 6 distances
- puts the status,avghght, and temp in a struct that lrMon
can access.
- lrMon
- program takes requests from outside world (via aoMsg
queues).
- pntProg queries for : avgHght, temp, status word
- pntXform.c: pointing computation program
- this runs on the pnt vxWorks computer
- queries lrMon for the temp, avghght
- commands tiedowns to move the platform if needed
- ~phil/vw/datatk/pnt/Prog/pntXform.c
- tieProg.c
- runs on pntp3 cpu
- receives commands from pntXform.c to move the tiedowns.
- sends the info to tiedowns.
statwords:
- LRMON_STATWD: keeps tracking of distomat read and computation
- used by lrMonIo,lrMon.. passed to pntXform
- typedef struct {
unsigned int fill:15;
/*
* If either of
the next 2 fields are non zero then we have failed to
* read the
data at least that many times.. Either the distomat program
* is hung up,
the network is having trouble, or the disc files are full.
*
* we had
trouble with the file not growing (timeouts)
* count up to
a max of 15 times then sit there. 1 good file grow
* resets
counter to 0.
* .. need to
implement..
*/
unsigned int fileGrowErr:4;
/*
* consecutive
number of times we had trouble reading the file (or seeking)
* count up to
15 then sit there. One good i/o on the file resets counter
* to zero.
*/
unsigned int readFileErr:4;
/*
* The
below status is for the data in lrmon_datcmp. It was
successfully
* input
but may have a bad heigth or temp. inpOk will always be 1
*/
unsigned int hgtOk :1;
unsigned int tempOk:1;
unsigned int inpOk :1;
unsigned int distOk:6;
} LRMON_STATWD;
To support computations with 3 distomats:
- Using measurements with all 6 distomats, do linear fit using
dist 1,3,5 or 2,4,6 to the avghght. Use this if only 3 even or 3
odd distomat measurements
- store the coefficients in a file
- LrMonIo -
- input the coef on startup
- if only 3 measurements, use the fits...
- hghtOk will remain 1
- add status bits meas3:2
- 00 --> used all 6, or no measurement (if hghtOk
=0)
- 01 -- > used 135
- 10 --> used 246
- The lrmon_statwd gets sent back to pntXform when querying
for temp,hght.
- pntXform.c
- will see which mode for tracking.was:
- hght .. require 6, or all 135,246...
- temp
- vw
- statwd: pnt_x_statwd .. currently has:
- lrLastHghtOk ---
- lrLastTempOk ---
- distOk :6
.. has the 6 dist that are measured. 1 if ok
- add
- lrtrk3:2
00 used all 6, or no tracking if last hght ok, 01,10,
if used 135,246
- if we get a no measurement, 0 ltrk3:2 .. so
- what to do if switch between 135,246.. do we allow it or
not?
page_up
home_~phil