====================================== ADSpinnaker ====================================== :author: Mark Rivers, University of Chicago .. contents:: Contents .. _GenICam: https://www.emva.org/standards-technology/genicam .. _aravis: https://github.com/AravisProject/aravis .. _ADGenICam: https://github.com/areaDetector/ADGenICam .. _ADAravis: https://github.com/areaDetector/ADAravis .. _ADSpinnaker: https://github.com/areaDetector/ADSpinnaker .. _ADSupport: https://github.com/areaDetector/ADSupport .. _Spinnaker: https://www.flir.com/products/spinnaker-sdk .. _ADSpinnaker class: ../areaDetectorDoxygenHTML/class_a_d_spinnaker.html Overview -------- This is an :doc:`../index` driver for GenICam_ cameras using the Spinnaker_ library. GenICam_ is a Generic Interface for Cameras from the European Machine Vision Association (EMVA). ADSpinnaker is derived from the base class ADGenICam_, which handles many of the details of mapping GenICam_ features to EPICS records. `ADSpinnaker class`_ describes this class in detail. As it name implies, ADSpinnaker_ uses the FLIR/Point Grey Spinnaker_ library. It runs on Windows, and on Linux versions with gcc 7.5 and higher (e.g. Ubuntu 18, RHEL 8, Centos 8, Debian 10) It does not run on older Linux versions (e.g. Centos 7/RHEL 7) because the FLIR Spinnaker SDK is compiled on Ubuntu 18 and thus requires newer versions of GLIBC and GLIBCXX. Prior to using ADSpinnaker with a specific camera model, the XML file must be read from the camera using the arv-tool utility, as described in the :ref:`ADGenICam documentation`. The EPICS database file and OPI screens must then be generated by running the Python programs as described in the :ref:`ADGenICam documentation `. The Spinnaker_ SDK must be downloaded and installed on the Windows or Linux machine prior to running the IOC because it installs the necessary drivers. ADSpinnaker driver ------------------ ADSpinnaker inherits from :doc:`../ADGenICam/ADGenICam`. It adds the following parameters and EPICS records that are specific to ADSpinnaker. .. cssclass:: table-bordered table-striped table-hover .. list-table:: :header-rows: 1 :widths: auto * - EPICS record names - Record types - drvInfo string - Description * - TimeStampMode, TimeStampMode_RBV - bo, bi - SP_TIME_STAMP_MODE - Controls whether the TimeStamp attribute comes from the camera internal time stamp or from the EPICS time. Choices are Camera (0), and EPICS (1). * - UniqueIdMode, UniqueIdMode_RBV - bo, bi - SP_UNIQUE_ID_MODE - Controls whether the UniqueId attribute comes from the camera internal value or from the driver. Choices are Camera (0), and Driver (1). * - ConvertPixelFormat, ConvertPixelFormat_RBV - mbbo, mbbi - SP_CONVERT_PIXEL_FORMAT - Controls conversion of the pixel format read from the camera to a different format. For example this can be used to convert Mono12Packed to Mono16, which allows the camera to send 12-bit data over the bus and then convert to 16-bit on the host computer, reducing the required bandwidth and increasing the frame rate. * - FailedPacketCount - longin - SP_FAILED_PACKET_COUNT - Failed packet count * - FailedBufferCount - longin - SP_FAILED_BUFFER_COUNT - Failed buffer count * - BufferUnderrunCount - longin - SP_BUFFER_UNDERRUN_COUNT - Buffer underrun count IOC startup script ------------------ The command to configure an ADSpinnaker camera in the startup script is:: ADSpinnakerConfig(const char *portName, const char *cameraId, int numSPBuffers, size_t maxMemory, int priority, int stackSize) ``portName`` is the name for the ADSpinnaker port driver ``cameraId`` is the either the serial number of the camera or the camera index number in the system. The serial number is normally printed on the camera, and it is also the last part of the camera name returned by arv-tool, for example for ``"Point Grey Research-Blackfly S BFS-PGE-50S5C-18585624"``, it would be 18585624. If cameraId is less than 1000 it is assumed to be the system index number, if 1000 or greater it is assumed to be a serial number. ``numSPBuffers`` is the number of TransportLayer buffers to allocate in Spinnaker. If set to 0 or omitted the default of 100 will be used. The driver enforces a minimum value of 10, which is the Spinnaker default. 10 is not large enough to prevent dropped frames with some cameras, particularly when doing data type conversions from Mono12Packed to Mono16 or from Bayer to RGB. ``maxMemory`` is the maximum amount of memory the NDArrayPool is allowed to allocate. 0 means unlimited. ``priority`` is the priority of the port thread. 0 means medium priority. ``stackSize`` is the stack size. 0 means medium size. MEDM screens ------------ The following is the MEDM screen ADSpinnaker.adl when controlling a FLIR Oryx 51S5M 10 Gbit Ethernet camera. ADSpinnaker.adl is very similar to ADGenICam.adl, with a few additional widgets for the PVs that are specific to ADSpinnaker. Note that each frame is 4.8 MB, and it is collecting 162 frames/s, which is 775 MB/s. .. figure:: ADSpinnaker.png :align: center The following are the MEDM screens FLIR_ORX_10g_51S5M-features[1-6].adl when controlling a FLIR Oryx 51S5M 10 Gbit Ethernet camera. These screens were autogenerated by the Python script in :doc:`../ADGenICam/ADGenICam`, and are specific to this camera model. They are loaded from the "Camera-specific features" related display widget in the above screen. .. figure:: ADSpinnaker_features1.png :align: center .. figure:: ADSpinnaker_features2.png :align: center .. figure:: ADSpinnaker_features3.png :align: center .. figure:: ADSpinnaker_features4.png :align: center .. figure:: ADSpinnaker_features5.png :align: center .. figure:: ADSpinnaker_features6.png :align: center