ADAravis
- author:
Mark Rivers, University of Chicago
Overview
This is an areaDetector driver for GenICam cameras using the aravis library.
GenICam is a Generic Interface for Cameras from the European Machine Vision Association (EMVA).
ADAravis is derived from the base class ADGenICam, which handles many of the details of mapping GenICam features to EPICS records.
ADAravis class describes this class in detail.
ADAravis is based heavily on the older aravisGigE driver which has been part of areaDetector for many years. ADAravis differs from aravisGigE by using the ADGenICam base class to significantly reduce the amount of code. Many of the ideas in ADGenICam were borrowed from aravisGigE.
As it name implies, ADAravis uses the aravis library. It runs on most Linux systems, and can control any GenICam camera. It cannot be used on Windows because aravis because aravis does not support it.
The aravis package must be built before building ADAravis. Instructions for doing this can be found in the ADGenICam installing aravis documentation.
Prior to using ADAravis with a specific camera model, the XML file must be read from the camera using the arv-tool utility, and the EPICS database file and OPI screens must be generated by running the Python programs in ADGenICam Python scripts.
ADAravis driver
ADGenICam inherits from ADGenICam. It adds the following parameters and EPICS records that are specific to ADAravis.
EPICS record names |
Record types |
drvInfo string |
Description |
---|---|---|---|
ARFramesCompleted |
ai |
ARAVIS_COMPLETED |
Number of frames successfully read |
ARFramesFailures |
ai |
ARAVIS_FAILURES |
Number failures reading frames |
ARFrameUnderruns |
ai |
ARAVIS_UNDERRUNS |
Number of frames underruns, which are frames that are too small |
ARMissingPackets |
longin |
ARAVIS_MISSING_PKTS |
Number of missing packets |
ARResentPackets |
longin |
ARAVIS_RESENT_PKTS |
Number of resent packets |
ARPacketResendEnable |
mbbo |
ARAVIS_PKT_RESENT |
Enable resending packets. Choices are [0:”Never”, 1:”Always”] |
ARPacketTimeout |
longout |
ARAVIS_PKT_TIMEOUT |
Delay in us before packet resend request |
ARFrameRetention |
longout |
ARAVIS_FRAME_RETENTION |
Frame timeout in us after last packet |
ARResetCamera |
longout |
ARAVIS_RESET |
Resets the camera |
ARConnectCamera |
longout |
ARAVIS_CONNECTION |
Connects to the camera |
ARCheckConnection |
calcout |
N.A. |
Connects to the camera when available |
ARConvertPixelFormat, ARConvertPixelFormat_RBV |
mbbo/mbbi |
ARAVIS_CONVERT_PIXEL_FORMAT |
Controls how Mono12Packed and Mono12p pixel formats are decompressed. Choices are [0:”Mono16Low”, 1:Mono16High”]. Mono16Low means that the data is not left-shifted by 4 bits, so bits 12-15 are 0. Mono16High means that the data is left-shifted by 4 bits, so bits 0-3 are 0. |
ARShiftDir, ARShiftDir_RBV |
mbbo/mbbi |
ARAVIS_SHIFT_DIR |
Controls how UInt16 data are shifted. Choices are [0:”None”, 1:”Left”, 2:”Right”]. The number of bits to shift is controlled by the ARShiftBits record. |
ARShiftBits, ARShiftBits_RBV |
mbbo/mbbi |
ARAVIS_SHIFT_BITS |
Controls how many bits UInt16 data are shifted left or right. Choices are 1-8. The direction to shift is controlled by the ARShiftDir record. |
IOC startup script
The command to configure an ADAravis camera in the startup script is:
aravisConfig(const char *portName, const char *cameraName, size_t maxMemory, int priority, int stackSize)
portName
is the name for the ADAravis port driver
cameraName
is the identifier for the camera. It can be the complete camera name returned by arv-tool, for example
"Point Grey Research-Blackfly S BFS-PGE-50S5C-18585624"
, or it can be an IP address for GigE and 10 GigE cameras, for
example "164.54.160.117"
.
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 ADAravis.adl when controlling a FLIR Oryx 51S5M 10 Gbit Ethernet camera. ADAravis.adl is very similar to ADGenICam.adl, with a few additional widgets for the PVs that are specific to ADAravis.
Note that each frame is 4.8 MB, and it is collecting 162 frames/s, which is 775 MB/s.
The following is the MEDM screen FLIR_ORX_10g_51S5M-features1.adl when controlling a FLIR Oryx 51S5M 10 Gbit Ethernet camera. This screen was autogenerated by the Python script in ADGenICam, and is specific to this camera model. It is loaded from the “Camera-specific features” related display widget in the above screen.
The following is the second feature screen generated by the Python program described above.