ADVimba

author:Mark Rivers, University of Chicago

Overview

This is an areaDetector driver for GenICam cameras using the Vimba library.

GenICam is a Generic Interface for Cameras from the European Machine Vision Association (EMVA).

ADVimba is derived from the base class ADGenICam, which handles many of the details of mapping GenICam features to EPICS records.

ADVimba class describes this class in detail.

As it name implies, ADVimba uses the AVT/Prosilica Vimba library. It runs on Windows, and on many versions of Linux, including RHEL7/Centos7.

Prior to using ADVimba with a specific camera model, the XML file must be read from the camera using the arv-tool utility, as described in the ADGenICam documentation.

The EPICS database file and OPI screens must then be generated by running the Python programs as described in the ADGenICam documentation.

The Vimba SDK must be downloaded and installed on a Windows machine prior to running the IOC because it installs the necessary drivers. On Linux the required libraries are included in ADVimba.

ADVimba driver

ADVimba inherits from ADGenICam. It adds the following parameters and EPICS records that are specific to ADVimba.

EPICS record names Record types drvInfo string Description
TimeStampMode, TimeStampMode_RBV bo, bi VMB_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 VMB_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 VMB_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 BayerRG8 to RGB8, which allows the camera to send 8-bit Bayer color data over the bus and then convert to 24-bit RGB on the host computer, reducing the required bandwidth by a factor of 3 and increasing the frame rate.
GC_StatFrameDelivered_RBV longin GC_I_StatFrameDelivered Number of frames delivered since acquisition was started.
GC_StatFrameDropped_RBV longin GC_I_StatFrameDropped Number of frames dropped since acquisition was started.
GC_StatFrameUnderrun_RBV longin GC_I_StatFrameUnderrrun Number of frames that failed because no user buffer was available since acquisition was started.
GC_StatPacketErrors_RBV longin GC_I_StatPacketErrors Number of packet errors since acquisition was started.
GC_StatPacketMissed_RBV longin GC_I_StatPacketMissed Number of packets missed since acquisition was started.
GC_StatPacketReceived_RBV longin GC_I_StatPacketReceived Number of packets received since acquisition was started.
GC_StatPacketRequested_RBV longin GC_I_StatPacketRequested Number of packet retransmissions requested since acquisition was started.
GC_StatPacketResent_RBV longin GC_I_StatPacketResent Number of retransmitted packets received since acquisition was started.
GC_StreamType_RBV mbbi GC_E_StreamType The stream interface (GigE, USB, etc.).

IOC startup script

The command to configure an ADVimba camera in the startup script is:

ADVimbaConfig(const char *portName, const char *cameraId,
                  size_t maxMemory, int priority, int stackSize)

portName is the name for the ADVimba port driver

cameraId is the either the IP address of the camera or the cameraID, which is last part of the camera name returned by arv-tool, for example for "Allied Vision Technologies-Manta G-507C (E0022705)-50-0503419258", it would be 50-0503419258.

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 ADVimba.adl when controlling an AVT Manta G-507C GigE camera. ADVimba.adl is very similar to ADGenICam.adl, with a few additional widgets for the PVs that are specific to ADVimba.

Note that each frame is 4.8 MB, and it is collecting 22 frames/s, which is 106 MB/s, very close to the GigE limit. The frames are in Bayer8 format, which are then being converted to RGB8 by the ADVimba driver. The NDArrays passed to the plugins are thus 14.5 MB, for a data rate of 319 MB/s.

../_images/ADVimba.png

The following are the MEDM screens AVT_Manta_G-507C-features[1-3].adl when controlling an AVT Manta G-507C GigE camera. These screens were autogenerated by the Python script in ADGenICam, and are specific to this camera model. They are loaded from the “Camera-specific features” related display widget in the above screen.

../_images/ADVimba_features1.png
../_images/ADVimba_features2.png
../_images/ADVimba_features3.png