Hi John,
I can think of a couple of things that can cause it to be limited to a slow rate:
- It is running at USB 2.0 speed, not 3.0. That can happen if you plug into the wrong port on your machine, or if for some reason it does not negotiate
USB 3 speed.
- Most USB cameras have a feature like DeviceLinkThroughputLimit. If that got set low for some reason that would slow it down.
Mark
From: John Dobbins <john.dobbins at cornell.edu>
Sent: Thursday, June 6, 2024 2:51 PM
To: tech-talk at aps.anl.gov; Mark Rivers <rivers at cars.uchicago.edu>
Subject: Re: ADSpinnaker, BlackfkyS 161S7M Not enough available memory to allocate buffers for streaming
I did some more poking around, plugging the camera back into a Windows machine and using SpinView and saw that there is some sequence of events which causes the camera to have the frame rate limited to 2.66 Hz.
By unplugging/replugging it and toggling various settings I got it back to full frame rate on Windows.
I then removed it from Windows and plugged it into the linux box and I am now getting 21 Hz with the IOC !!!
So there seems to be something needing more investigating.
After configuring USB-FS memory I now have the camera running.
One thing I don't understand is that I can't set the Acquire period below 0.375 seconds, i.e a frame rate of 2.66 Hz.
Is there a bandwidth limit somewhere?
https://www.flir.com/support-center/iis/machine-vision/application-note/understanding-usbfs-on-linux/
I have built, base-7.0.6, areaDetectorR3-13 with ADSpinnaker master on Alma 9. I am using a FLIR BlackflyS 161S7M USB camera. This is large, 5320x3032 pixels.
The camera is detected but I get a "Not enough available memory to allocate buffers for streaming" error.
In ADSpinnakerConfig I have set numSPBuffer to minimum = 10 (?)
# ADSpinnakerConfig(const char *portName, const char *cameraId, int numSPBuffers,
# size_t maxMemory, int priority, int stackSize)
ADSpinnakerConfig("SP1", 22671882, 10, 0, 0,0)
The host computer has 16G, 13.7 G free,
Ideas?
John Dobbins
Research Support Specialist
Cornell High Energy Synchrotron Source
Cornell University
www.chess.cornell.edu
[root@lnx615 iocSpinnaker]# ../../bin/linux-x86_64/spinnakerApp st.cmd.BlackflyS_161S7M
< envPaths
epicsEnvSet("IOC","iocSpinnaker")
epicsEnvSet("TOP","/nfs/chess/epics/det/support_flir/areaDetector-R3-13/ADSpinnaker/iocs/spinnakerIOC")
epicsEnvSet("ADSPINNAKER","/nfs/chess/epics/det/support_flir/areaDetector-R3-13/ADSpinnaker/iocs/spinnakerIOC/../..")
epicsEnvSet("SUPPORT","/nfs/chess/epics/det/support_flir")
epicsEnvSet("ASYN","/nfs/chess/epics/det/support_flir/asyn-R4-45")
epicsEnvSet("AREA_DETECTOR","/nfs/chess/epics/det/support_flir/areaDetector-R3-13")
epicsEnvSet("ADSUPPORT","/nfs/chess/epics/det/support_flir/areaDetector-R3-13/ADSupport")
epicsEnvSet("ADCORE","/nfs/chess/epics/det/support_flir/areaDetector-R3-13/ADCore")
epicsEnvSet("AUTOSAVE","/nfs/chess/epics/det/support_flir/autosave-R5-11")
epicsEnvSet("BUSY","/nfs/chess/epics/det/support_flir/busy-R1-7-4")
epicsEnvSet("CALC","/nfs/chess/epics/det/support_flir/calc-R3-7-5")
epicsEnvSet("SNCSEQ","/nfs/chess/epics/det/support_flir/seq-R2-2-9")
epicsEnvSet("SSCAN","/nfs/chess/epics/det/support_flir/sscan-R2-11-5")
epicsEnvSet("DEVIOCSTATS","/nfs/chess/epics/det/support_flir/iocStats-3-1-16")
epicsEnvSet("EPICS_BASE","/nfs/chess/epics/det/base-7.0.6")
epicsEnvSet("ADGENICAM","/nfs/chess/epics/det/support_flir/areaDetector-R3-13/ADGenICam")
errlogInit(20000)
dbLoadDatabase("/nfs/chess/epics/det/support_flir/areaDetector-R3-13/ADSpinnaker/iocs/spinnakerIOC/dbd/spinnakerApp.dbd")
spinnakerApp_registerRecordDeviceDriver(pdbbase)
# Use this line for a specific camera by serial number, in this case a BlackFlyS GigE
epicsEnvSet("CAMERA_ID", "22671882")
epicsEnvSet("GENICAM_DB_FILE", "/nfs/chess/epics/det/support_flir/areaDetector-R3-13/ADGenICam/db/FLIR_BFS_U3_161S7M.template")
< st.cmd.base
# Prefix for all records
epicsEnvSet("PREFIX", "13SP1:")
# The port name for the detector
epicsEnvSet("PORT", "SP1")
# Really large queue so we can stream to disk at full camera speed
epicsEnvSet("QSIZE", "2000")
# The maximim image width; used for row profiles in the NDPluginStats plugin
epicsEnvSet("XSIZE", "2048")
# The maximim image height; used for column profiles in the NDPluginStats plugin
epicsEnvSet("YSIZE", "2048")
# The maximum number of time series points in the NDPluginStats plugin
epicsEnvSet("NCHANS", "2048")
# The maximum number of frames buffered in the NDPluginCircularBuff plugin
epicsEnvSet("CBUFFS", "500")
# The search path for database files
# This is for Windows
epicsEnvSet("EPICS_DB_INCLUDE_PATH", "/nfs/chess/epics/det/support_flir/areaDetector-R3-13/ADCore/db;/nfs/chess/epics/det/support_flir/areaDetector-R3-13/ADGenICam/db;/nfs/chess/epics/det/support_flir/areaDetector-R3-13/ADSpinnaker/iocs/spinnakerIOC/../../db")
# This is for Linux
#epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(ADCORE)/db:$(ADGENICAM)/db:$(ADSPINNAKER)/db")
# Define NELEMENTS to be enough for a 5320x3032 (color) image
epicsEnvSet("NELEMENTS", "16130240")
# ADSpinnakerConfig(const char *portName, const char *cameraId, int numSPBuffers,
# size_t maxMemory, int priority, int stackSize)
ADSpinnakerConfig("SP1", 22671882, 10, 0, 0,0)
2024/06/06 11:46:16.990 ADSpinnaker::connectCamera exception Spinnaker: Not enough available memory to allocate buffers for streaming. [-1016]
2024/06/06 11:46:16.990 ADSpinnaker:ADSpinnaker: camera connection failed (3)
Number of cameras detected: 1
Camera 0
Device Vendor Name (DeviceVendorName):FLIR
Device Model Name (DeviceModelName):Blackfly S BFS-U3-161S7M
Device Serial Number (DeviceSerialNumber):22671882
Device Version (DeviceVersion):2210.0.657.0
Device Type (DeviceType):USB3Vision