Setting the maximum USB data transfer size

135 views
Skip to first unread message

rpmpi...@gmail.com

unread,
Nov 11, 2021, 10:47:49 AM11/11/21
to multi-camera software from the Straw Lab
Hi all,

I have a question about setting the maximum USB data transfer size parameter by Braid. We are using a system with 6 4MP cameras running at 90fps. To get this working in pylonViewer Basler advised to set the usbfs memory stack to about 3GB and to increase the file handle limit to 524288 and set the maximum USB data transfer size parameter (Stream Parameters -> MaxTransferSize) to the maximum value (4194304 in our case).
In pylonViewer this works great. I saved all the configuration settings to the cameras.
However the maximum USB data transfer size parameter seems to be reset to the default value every time I relaunch pylon viewer and it is also not listed in the camera feature file.

Is there a possibility to set the MaxTransferSize parameter from Braid? Because now we get the error message that the file handle limit is reached when using 6 cameras. When using five cameras frames are quickly dropped and with four everything works fine.

Best, Remco

Andrew Straw

unread,
Nov 14, 2021, 6:32:28 AM11/14/21
to multi-camera software from the Straw Lab
Thanks for figuring this out - I was not aware but this is likely to be the underlying cause of some previously mysterious unwanted behavior we have been experiencing ourselves.

In my mental model, Braid (and Strand Camera) only change a select few camera parameters. I thought that the MaxTransferSize parameter, like all others I am aware of, was unchanged upon reconnecting to it. It is certainly not explicitly reset, so this is something that seems to happen "automatically". I will work on a fix and hopefully include it in the next release (which also carries a number of other improvements). I now wonder what other camera parameters get reset automatically - if you find documentation about this, I would be grateful for a pointer.

I have filed an issue so I do not lose track of this: https://github.com/strawlab/strand-braid/issues/10 .

(For some reason I had to rescue your message from my spam folder and only saw it there by change. So, in the future this is further reason not to hesitate to send a friendly reminder in case I don't respond to something...)

Best,
Andrew

rpmpi...@gmail.com

unread,
Nov 15, 2021, 8:37:18 AM11/15/21
to multi-camera software from the Straw Lab
Hi Andrew,

Thank you for working on a fix. I dived a bit in the pylon documentation, but there is not much info about camera parameters beginning reset automatically. Though somethings a mentioned about configuration settings and there is a list what is not, among this they mention "Several other parameters related to the transport layer are not included" https://docs.baslerweb.com/user-sets.html. But the Transport layer is different class than the Stream parameters. I will ask the person at Basler who helped me with resolving the issue in pylonViewer. 
One other question in the documentation it is mentioned to set the real-time thread priority above 25. Is the raise_grab_thread_priority field in the configuration file meant for this?

Best, Remco

Op zondag 14 november 2021 om 12:32:28 UTC+1 schreef dr.andr...@gmail.com:

Andrew Straw

unread,
Nov 28, 2021, 7:02:39 AM11/28/21
to multi-camera software from the Straw Lab
Hi Remco,

I think I fixed the issue. To keep the solution generic to other camera manufacturers despite this parameter being Basler-specific I have decided to make the Basler-specific suppport in Strand Camera and Braid to simply set the MaxTransferSize to its maximum supported size. In my (so far limited) testing, this seems to fix the issue for me.

Andrew Straw

unread,
Dec 2, 2021, 3:18:07 AM12/2/21
to multi-camera software from the Straw Lab
As you may see in the other threads, I just released Strand Camera and Braid version 0.11.0 on Github: https://github.com/strawlab/strand-braid/releases/tag/0.11.0 which set the MaxTransferSize to the maximum possible value upon startup. I'm interested to hear if this fixes things for you.

Best,
Andrew

rpmpi...@gmail.com

unread,
Dec 6, 2021, 8:04:24 AM12/6/21
to multi-camera software from the Straw Lab
Hi Andrew,

This morning I tested version 0.11.1 with MaxTransferSize at max we can now connect all cameras.
Tracking at full resolution and full resolution is still an issue, but I will reply about this in the conversation of Antoine.
Loading camera settings from the pfs-files works good. Thank you for implementing this feature.

Best, Remco

Op donderdag 2 december 2021 om 09:18:07 UTC+1 schreef dr.andr...@gmail.com:
Reply all
Reply to author
Forward
0 new messages