ALFA Dewar monitoring
24feb09
Hardware:
Downstairs:
- The alfa_mon program runs on the aeroncpu. It talks to the alfa
control in the rotary floor room on /dev/ttyS1
(the other rs232 line is for alfa motor control).
- The rs232 line goes to the fiber transciever in the fiber optic
rack next to the pnting crate (about the middle of the rack) and
then up to the alfa control box in the turret room.
Upstairs:
Software
Communications
program: alfa_mon.c
- runs on aeroncpu.
- code locations:
- source :
/home/cima/Wapp/Software/Dual/Sources/Utilities/alfa_mon. c
- binary: /home/cima/Wapp/Software/Dual/Progs/Wapp/alfa_mon
- On aeroncpu /home/cima comes from wappserv:/data/home/cima. On
other cpus it comes from fileserver:/home/cima.
- Logfiles:
- /share/cima/Logs/ALFA_start/alfa_mon.log for when started
- /share/cima/Logs/ALFA_monitor/alfa_mon.log .. program
error messages.
- What it does:
- alfa_mon waits for on a mail box for commands from the outsided
world.
- If it times out on a command then it will read all the data
from alfa (temps,voltages, currents, etc) and broadcast the block over
a multi-cast socket.
- The alfamonwin gui will listen for these broadcasts and display
the info
- alfamonwin can also connect to the socket on alfa_mon and
command it to change the calType or read the vacuum gauges.
- Starting program on aeroncpu
- /etc/rc3.d/S99local has:
- su -c
/home/cima/Wapp/Bin/Progs/Start/start_alfa_monwapp .
- This checks and kills alfa_mon if it is already running..
- ( ./alfa_mon & ) > /dev/null .. So all the
printf output goes to /dev/null ??
- to start it manually on aeroncpu:
/home/cima/Wapp/Software/Dual/Progs/Wapp/alfa_mon -loopback -test
-attn
-debug
- be sure and kill any copy that is currently running before
doing this.
- -debug will output messges/errors to stdout.. To send to a
file:
- ./alfa_mon -debug > /tmp/mon.log
&
- -loopback used for debugging.
- write 1 byte: \026 , read 1 byte, sleep 200 usecs.
Loops
forever
- if ( loopback ) {
while ( 1 ) {
char byte;
write(mon->fd, "\026", 1);
read(mon->fd, &byte, 1);
usleep(200);
}
}
- -attn same as loopback except only send \026, wait , loop .
don't read it back.
- -test .. will generate dummy data to broadcast. Never reads
the upstairs device.
gui to look at the
alfa monitor data: alfamonwin
- a tk gui lets you look at the alfamon data:
/home/cima/bin/alfamonwin.
- The tcl/tk code is in
/home/cima/Software/Normal/Progs/Display/alfa_instrument_control.tcl
- I
- With full control button enabled you can:
- enable/disable the motor
- check the status. See the status bits below for what the status
bits mean.
- restart the comm program alfa_motor.c on aero
Daily monitoring of temperatures.
Daily monitoring plots of the alfa dewar are output
7am each day.
- they can be found at: http://www.naic.edu/~phil/
- --> alfa temps,Drainv,drainI,gateV.
- the code that generates these plots is in:
- /share/megs/phil/x101/alfamon/alfatempdaily.sc
- The idl documentation can be found in:
- http://www.naic.edu/~phil/alfamondoc.html
Problems/Debugging:
Check that the
alfa_mon program is running on aeroncpu:
- The alfa_motor program can abort on aeroncpu without leaving any
messages...
- To check if it is running:
- ssh -l wapp aeroncpu ps -ef | grep alfa_mon (you need
the wapp passwd).. you should see an entry like:
- wapp
1648 1 0 10:14 pts/0
00:00:00 ./alfa_mon
- To restart the program:
- slogin aeroncpu -l wapp
- /home/cima/Wapp/Bin/Progs/Start/start_alfa_mon
- ?? From within cima the restart alfa programs button will
restart alfa_mon
- Look at the logfile output :
/share/cima/Logs/ALFA_logs/alfa_logger.dat.
- the first value is yyyymmddhhmmss Ast.See if it is updating.
- See if the values are changing and look the same: eg:
-2.3477,-2.3477,-2.3477,
- Example: rebooted aeroncpu after new power supply installed.
- got garbage data on alfamonwin
- log file had repeated data:-2.3477,-2.3477,-2.3477
- running alfa_mon -debug showed the same data coming back all
the time
- The lights on the fiber optic transciever weren't blinking..
- Rebooted the computer a second time and it started working.
- What was wrong?? may have interrupted a transfer on the
previous crash ??
Manuals:
page_up
home_~phil