Smokey Start Up


1. Create & connect to a vnc session on smokey:

   A smokey:16000 vnc is created at boot time, but to manually create it:
      
      anycomputer> ssh smokey -l smokey

      smokey>vnc_for_smokey 
      (vnc session should be: smokey:16000)

   Connect to vnc session:
      
      anycomputer> vncviewer smokey:16000
      
   To kill the vnc session on smokey:
      
      smokey> vncserver -kill :1
      
2. From within the VNC session, open 3 xterms to start the IC, XUI and DV.
   
   xterm1>  startic

   xterm2>  startxui
            (see not 2.1)

   xterm3>  startdv
   
   To terminate the XUI & IC, type 'die' in the XUI command prompt or hit cntl-C in the IC xterm.


   2.1. Initializing Motor Shared Memory
   
   The motor shared memory is created only if it doesn't exist (allowing
   you to quit and restart the IC, without re-initializing all the motors).

   It you are have motor shared memory issue, you may see
   all with motor icons will be replace with  the words:
      "XUI was unable to access motor information. Motor"
      "control and monitoring is disabled."
   Or if you just wish to delete/create  the shared memory, to this:

      type "die" in the XUI to kill the XUI and IC.
      In the smokey xterm, type:
         /home/smokey/current/mt/mt_sm_init -f

   Then restart the IC and XUI.

3. Normal startup procedures

   1. Make sure the video tab is select, and do a 'go.init' if its status is in error.
   2. telnet guiderpwr, login and turn on #2 video cam

4. Normal shutdown procedures

   1. Set the Gain all the way down.
   2. ND 4.8 filter in.
   3. Exit the vncviewer ( but leave the vncsession and software running).
   4. Telnet guidepwr, login and turn off #2 video cam.

5. Setting the "XY Stage IN position"

As the user smokey (on any IRTF computer) edit the smokey startup
file and changed the RA, DEC value for the "xystage.onaxis.radec" line.

  > gedit /home/smokey/current/ic/.smokeyic-init

Remember the .smokeyic-init is only read when the IC is started.

6. What to do when a mechanism is stuck at BUSY

Sometime a mechanism is set to BUSY, and the task die leaving it at a BUSY state, 
but the operation unable to initialize it from the GUI.

The brute for way is to reboot smokey and restart the guider.

But before that, you can try to manual run the mechanism init program to 
quickly recover from this error:

   1. Go to the smokey:16000 vnc.
   2. open an xterm.
   3. do: "cd ~/current/mt"  (the current motor directory).
   4. Run the init program for the mechanism: 
      ie: 
      "xstage_init -v"   - for the X stage 
      "ystage_init -v"   - for the Y stage 
      "pom_init -v"      - for the POM
      "filter_init -v"   - for the filter wheel
      "camera_init -v"   - for the camera mirror stage
      "afocus_init -v"   - for the Apogee camera focus stage 
      "vfocus_init -v"   - for the Video  camera focus stage