# SICS Invocation

SICS means SINQ Instrument Control System. SICS is a client server system. This means there are at least two programs necessary to run the experiment. The first is the SICServer which does the actual instrument control work. A user rarely needs to bother about this server program as it is meant to run all the time. See instructions below if things go wrong.

Then there are client programs which interact with the instrument control server. These client programs implement the status displays and a command line application which forwards commands to the SICS server and displays its response. Graphical User Interfaces may be added at a later time. The user has only to deal with these SICS client programs. SICS Clients and the SICServer communicate with each other through the TCP/IP network.

Currently the following SICS clients are available:

- A command line control client for sending commands to the SICS server and displaying its repsonses.
- A status display for the powder diffractometers DMC and HRPT.
- A status display for MORPHEUS and general scans.
- A status display for SANS and SANS2.
- A status display for FOCUS.
- A AMOR control and status program.
- A triple axis control and status program.
- A SICS variable watcher. This application graphically logs the change of a SICS variable over time. Useful for monitoring for instance temperature controllers.
- A graphical client for TRICS.

## Steps necessary for logging in to SICS

The following actions have to be taken in order to interact with the SICS server through a client:

- Start the client application.
- Connect the client to a SICS server.
- In case of command line clients: authorize yourself as privileged SICS user.

## Starting SICS client applications

These programs can be started on a Linux system by issuing the following commands at the command prompt:

sics &
  for the control client.
powderstatus &
  for the DMC status display client.
topsistatus &
  for the MORPHEUS status display.
sansstatus &
  for the SANS status display.
focustatus
  for the FOCUS status display.
amor &
  for the AMOR status display and control application.
tas &
  for the triple axis status display and control application.
varwatch &
  for the variable watcher.
trics &
  for the starting the TRICS graphical client.

Another option to start SICS clients is the Java Webstart mechanism which is available for most platforms. Java webstart requires both Java and Java webstart to be installed on the computer running the client. Then clients can be started directly from a WWW-page. The advantage is that clients are automatically updated in this system as soon as new version have been copied to the WWW-site. Installation instructions for Java webstart and links to start all SICS clients though this mechanism can be found at: the SICS webstart page. This service is only accessible within the PSI network.

## Connecting

After startup any SICS client is not connected to a SICS server and thus not active. A connection is established through the connect menu of the client.

## Authorization

SICS is a multi user instrument control system. In order to prevent malicious manipulations of the instrument SICS supports a hierarchy of user rights. In order to run an experiment you need at least user level privilege. In order to achieve this privilege you have to invoke the Authorize dialog. There you have to enter the apropriate username and password kindly provided by your instrument scientist.

## Restarting the Server

The SICS server should be running all the time. It is only down if something went wrong. You can check for the presence of the SICS server by loging in to the instrument computer and typing monit status at the command prompt. The output will tell you what is happening. If you need to restart the SICS server log in as the instrument user at the instrument computer and invoke the appropriate command to start the server. These are:

DMC
  Computer = dmc, User = dmc
TOPSI
  Computer = morpheus, User = morpheus
SANS
  Computer = sans, User = sans
SANSLI
  Computer = sans2, User = sans2
TRICS
  Computer = trics, User = trics
HRPT
  Computer = hrpt, User = hrpt
FOCUS
  Computer = focus, User = focus
AMOR
  Computer = amor, User = amor
TASP
  Computer = tasp, User = tasp
POLDI
  Computer = poldi, User = poldi

The SICS server process are controlled through the monit program. Usually the monit daemon is running. If not, for instance after a reboot, it can be started by typing monit at the unix prompt logged in as the instrument user. Further monit commands:

monit start target
  start the monit surveyed process target. For the choice of targets see below.
monit stop target
  stops the monit surveyed process target. For the choice of targets see below.
monit restart target
  restart the monit surveyed process target. Possible targets are:
  sicsserver
    The SICServer
  SerPortServer
    The serial port control program
  sync
    The file synchronisation program. This is responsible for coyping data files to the common AFS area.
  simserver
    Only on TASP: a simulation SICS server
  all
    Stop all processes
monit status
  prints a status listing of everything watched by monit
monit quit
  Stops monit itself

Stopping everything thus involves two commands:

- monit stop all
- monit quit

Restarting after this involves:

- monit

The older command startsics and killsics are still working and operate on the monit daemon as of now.

If all this does not help look under trouble shooting SICS.