Firewire (IEEE1394) is a very fast external bus standard that supports data transfer rates of up to 400Mbps in IEEE 1394a, and up to 3.2 Gbps in IEEE1394b. A single IEEE 1394 port can be used to connect up to 63 external devices. In addition to its high speed, IEEE1394 also supports isochronous data - delivering data at a guaranteed rate. This makes it ideal for devices that need to transfer high priority data in real-time, such as video devices. The IEEE1394 bus supports both Plug-and-Play and hot plugging, and also provides power to peripheral devices.
Many new cameras are equipped with Firewire interface. These cameras are more preferment, offering more valuable features in comparison to traditional analogue cameras. In order to fulfill all requirements in the SLS, it was decided to integrate the Firewire cameras to the existing control system. EPICS SERVER Epics Server: Introduction
Recent development in EPICS (3.14.x) has allowed for an operating system independent implementation. We decided to benefit from interfacing a Firewire camera to an EPICS server running on a Linux PC. Linux offers open source libraries that support Firewire devices, thus it appeared to be well suited for the camera integration. In addition, an X windows (motif) application was developed to provide a live feed from the camera by reading the image waveform. In the following, we explain software and hardware aspects, and typical applications of Firewire camera based systems at the SLS.
EPICS based image acquisition server depends on several software components which can be dynamically loaded to the Linux kernel at run time. The layered architecture of the EPICS server is presented in Fig. 1.
Recent Linux kernels (> 2.4) are coming with built-in IEEE1394 modules:
*ieee1394: Core of the IEEE1394 subsystem. *raw1394: Higher level driver module for bus access. *video1394: Fast DMA frame transfer driver. *ohci1394: Low level host card driver.At the user space level, Libraw1394 is a library that provides access to the raw1394 bus module and Libdc1394 is a high level API.
EPICS device support uses non-polling (blocking) DMA capture functions for image acquisition. An image acquisition process is repeated periodically. First the single image is captured, processed and then placed in the waveform. Any Channel Access (EPICS) based application can retrieve an image from the waveform.
Moreover, the server performs on-line centriod finding algorithm, background subtractions, averaging (i.e. improves signal-to-noise ratio), maximum pixelintensity calculation, standard deviation, and calibration.
A motif based application is used to display captured images in live mode. The application uses Channel Access libraries, therefore it is already integrated with EPICS. The application displays the images which are stored in the waveform channels on the server side. EPICS monitoring mechanism enables the client application to display newly acquired images when the waveform updates. The application can display monochrome and color images. Users can choose one of many color interpolation algorithms for Bayer color representation at run time (Fig. 3).
The FEMTO laser focus point - where the electron and laser beams interact - is approximately 45 meters away from the laser source. With 4 mirrors along the laser path, there are many potential causes for laser drift (laser source, optical components, temperature). A laser monitoring system based on Firewire digital cameras was implemented. The image is grabbed, processed and the center of mass is calculated. A feedback system will use this information andadjust the mirrors accordingly to compensate for the drift. Thus it will maintain optimal electron and laser beams interaction conditions.
X-ray Beam-position Monitoring
Critical information about the X-ray beam shape, profile and position is extracted. The setup used at the micro Absorption Spectroscopy (mXAS) beamline includes a scintillator that converts x-rays into visible light, lenses that enables to change the field of view and thus obtain higher resolution, and a Firewire digital camera.
Beamline Equipment Commissioning
Commissioning of beamline optical components, using synchrotron light, such as monochromator crystals parallelism tests is an example of an application. Furthermore, stability of the synchrotron light and determining eventual sources of vibration are also sought.
The client application is used to display a live feed of the monitored subsystem.
The EPICS server approach allows for acquiring and processing the images at high rates (10 Hz). Thus, it can be used to track fast changes to the monitored system. On the other hand, it allows for online image processing to characterize synchrotron light and Laser beam. More importantly, it is fully integrated into the control system environment which has the obvious advantage of being operated simultaneously with other components in the beamlines or accelerator complex.
Download the sources: ccd1394-1.2.tar.gz(312842 bytes).
Software Requierments: This pdf file explains the software functionality Image Processing Requierments (190846 bytes)
Supported cameras at the SLS:Point Grey Flea
Useful links: Linux 1394, Coriander, linux & 1394:How To?
Acknowledgment: This software was originaly developed by Steven Hunt, further modifications were added by Elke+Dirk Zimoch, Miroslaw Dach and Ahed Aladwan.
Contact: The driver is currently supported by Damir Anicic.
Swiss Light Source, 2006, (updated 2011)