How to take encoder logs and analyse the results with PLOT

 

1)     Logging encoders

If a problem is suspected while the TCS is running (e.g. telescope oscillating on an axis), you can start an encoder log file (say for 5 minutes) by typing log enc on 5.

By default the duration of the log is 15 minutes (the time argument can be omitted).

The logging ends automatically after the time asked, but you can end manually before the expiration by typing log enc off.

The n previous minutes can be logged with log eng keep n. That’s useful if for example the telescope has to be stopped (violent oscillations with amplifier currents going wild, which is bad both mechanically and electrically) and you want to keep a record of what happened.

 

2)     Analysis with PLOT

·        Where are the log files?

At the WHT, connect to LPAS4 as genuser or as tcsmgr. (Connect to LPAS2 at the INT).

Log files are kept in the directory DISK$LOGS:[WHT.DATA.ENCODER] so if you don’t want to type the whole thing over and over again to check several files, change directory: set def DISK$LOGS:[WHT.DATA.ENCODER]. You could in principle change directory with CD after starting PLOT, and list the whole directory with DIR.

To check for example what are the log files for november 24, 2004, type
dir /date enc041124* ; which results in:

 

Directory DISK$LOGS:[WHT.DATA.ENCODER]

 

ENC041124.DAT;5      24-NOV-2004 22:43:24.38

ENC041124.DAT;4      24-NOV-2004 16:09:51.79

ENC041124.DAT;3      24-NOV-2004 15:37:06.87

ENC041124.DAT;2      24-NOV-2004 10:09:35.77

ENC041124.DAT;1      24-NOV-2004 02:33:47.78

 

Total of 5 files.

If several logs are kept on the same day, the oldest is tagged ;1 and the most recent has the highest number.

Remark: the snapshot files taken by the Telescope Operator are kept in the directory A1:[WHT.DATA.SNAPSHOT]. They are ascii files but named *.SNAP and are a photo of the TCS info page at the moment of the record. Just print them (PRINT command on the Alpha).

·        Work with PLOT

Start the program by invoking it. Typing HELP lists the available commands, and give information on each subject, but you can live with the following:

Load a log file: DATA ENC041124.DAT;1 to load that particular log file; DATA ENC041124 will load the latest version (the file ;5 in this case).

Choose the output device: DEV XWIN to get an XWindow for the plots, or DEV PS to send all the plots in a Postscript file (in that case each PLO command adds a plot to the file PGPLOT.PS which will be saved in the current directory only when PLOT is EXIted)

Read the axes: READ 1 UTC will load the time on the X axis; READ 2 AZIMUTH GEAR will send the azimuth incremental encoder reading on the Y axis.

Plot at full range: type LIMits then PLO

 

 

Zoom on an interesting zone: use the command BOX to zoom in X and Y. In our example, we can do BOX 220 250 98 100 then PLOT which gives the following graph

 

This shows an oscillation started after an offset, while the telescope was tracking.

Export data in an ASCII file for a further analysis (for ex. with Matlab)

Up to three variables can be stored in the same file.    

PLOT> OUTFILE name.txt

PLOT> READ 1 UTC

PLOT> READ 2 AZIMUTH GEAR

PLOT> READ 3 AZIMUTH VEL_DEM

PLOT> WRITE

PLOT> EXIT  the file will be closed only when PLOT is exited. Then for further analysis, use FTP to transfer to your favorite laptop or other.

·        Other example: how to get the focus  LVDT graphs after the secondary mirror is put back:

Put the telescope in Computer mode, start a log : log enc on 10. If it’s already at zenith, send the telescope to low altitude (alt 10) then back to zenith (alt 90). Close the log with log enc off.

Use PLOT to draw each Secondary Position encoder as a function of altitude: READ 1 Altitude abs; READ 2 Secpos1; LIM; PLO. The result should look like this: