Changes

Filter wheel software

889 bytes added, 14:27, 10 July 2014
/* Web Interface */
{{Filter Wheel Driver Software}}
 
==Introduction==
The filter wheel driver software provides an interface to the Programmable Logic Controller (PLC) which controls one or more filter wheels. The software comprises a back-end, which communicates directly with the PLC over a serial link, and the front-end with which the user interacts. There are in fact a number of front-end interfaces available to control and query the filter wheels.
The software is modular, and may be used on its own (to control filter wheels not part of a larger system), or as part of interconnected systems (e.g. the Sutherland High-speed Optical Camera Cameras (SHOC) instrument, which includes filter wheels, a global positioning system (GPS) receiver used for timing information, and a charge-coupled device (CCD) camera.)
A basic command line interface is provided to control the filter wheel, but most users will find it preferable to use the provided web interface. There is also a diagnostic interface, which may be used by technicians for the purposes of trouble-shooting.
==Command Line Interface==
As mentioned, the command line interface (CLI ) is the most basic means
of interacting with the filter wheel controller.
Windows) or in a bash shell, type <code>filterwheel_cli.py</code> (Linux).
For help using the The CLI, invoke it may be invoked with the a number of options. The ''-h'' option. This presents
the user with a list of command line options, and explanations as to
their use. For example, it may be necessary to  To specify the a non-default serial portfor the PLC connection; this may be done with , use the <code>--serial <port></code>
command (e.g. <code>--serial /dev/ttyUSB2</code>).
 
To specify the log level, use <code>--log <level></code>, where <code><level></code> is one of <code>debug, info, warn, critical</code> or <code>error</code>.
 
To specify the logfile, use <code>--logfile <file></code>. If this option is not specified, the default is to use <code>filterwheel_cli.log</code>.
Once the interface has started, the user may view the status, or
==Web Interface==
The web interface (you get there by going to http://<your-instrument-name>.suth.saao.ac.za:5000 in a web browser) is the primary interface for interaction with the
filter wheel. The filter wheel control software and web server are
started as a service (Windows) or daemon (Linux), and the user should
interaction with the filter wheels.
[[Image:filterwheel1a.png|The filter wheel web interface]] The status (Initialised|At Ref|Centered|Moving) of the each wheel is displayed at the top, below the
wheel's name and binary-format ID.
The current position (1) of the wheel is displayed below this. The slot
number, and if available, filter name and color are also displayed.
Below this, the next required position (2) may be entered. There are then
buttons to move to the required position, or to initialize the wheel.
An "advancedMore..." (3) link allows the user to see which filters are installed
in each slot (if known), and also allows the user to reset the PLC.
 
The "Preferences" drop-down allows one to choose day-time or night-time modes, as well as whether to disable the tool-tips when one hovers over a button.
[[Image:filterwheel2a.png|none|300px|The preferences drop-down]]
 
More detail on the boxes in the filter wheel GUI interfaces for each filter wheel
 
[[Image:filterwheel3a.png|none|300px|Detail on the filter wheel GUI]]
Note: the filter name and colour are obtained from a configuration
==Diagnostic Interface==
The diagnostic interface is similar to invoked by starting the command line interface, butusing the --diagnostic_mode flag. It automatically sets logging to the most verbose level, and provides greater details on the data strings sent to and received fromthe PLC. There is also the ability to set various bits in the PLC, tocontrol features not required for day-to-day operation. ==Qt GUI Interface== Not yet done
==Scripting==
163
edits