I tried to upgrade from version 13.04.002 to 13.04.005 yesterday, but when I try to open any device not on port 0 (we have seven cameras connected to the system) by calling cvb.DeviceFactory.open_port(vin_driver_path, camera_index) or cvb.DeviceFactory.open(vin_driver_path, port=camera_index)
Python instantly terminates completely without even throwing an error.
This was working before with the old version and I can find any explanation what could cause this.
try to open the camera in the GenICam Browser bevorehand.
I assume, that you have not added all cameras to the configured devices thus the driver has no camera to work with.
You can avoid this step in the future, if you work with the DeviceFactory and its discover method:
import cvb
interface_flags = cvb.DiscoverFlags.UpToLevelInterface | cvb.DiscoverFlags.IgnoreGevSD
all_interfaces = cvb.DeviceFactory.discover_from_root(interface_flags)
broadcast_flags = cvb.DiscoverFlags.IgnoreVins | cvb.DiscoverFlags.IncludeInaccessible | cvb.DiscoverFlags.IgnoreGevSD
all_devices = []
for interface in all_interfaces:
cvb.DiscoveryInformation.set_genapi_feature(interface, "TLInterface", "DisableSubnetMatch", "1")
cvb.DiscoveryInformation.set_genapi_feature(interface, "TLInterface", "AllowBroadcastDiscoveryResponse", "1")
found_devices = cvb.DeviceFactory.discover_from_level(interface.access_token, broadcast_flags)
for dev in found_devices:
all_devices.append(dev)
for dev in all_devices:
# Check devices access status etc.:
# dev.read_property(cvb.DiscoveryProperties.DeviceAccessStatus)
with cvb.DeviceFactory.open(all_devices[0].access_token) as device: # open first camera found (check accessibility before!)
# work with camera...
You can also try the codesnippet bevor configuring the driver, as long as the IPs of the cameras are in the same subnet, this should work.
All devices are listed correctly in the driver. As I wrote I have been working with Version 13.04.002 and there wasn’t a problem so far with those seven cameras and calling those two methods this way.
first of all I have to correct the version numbers I was talking about earlier in this thread.
Of course we are talking about CVB 13.X.X versions, NOT 14.X.X.
You have to set the desired settings you usually set in the GenICam.ini (by using any tool like GCBrowser or ManagementConsole) using the SetParameter() on the accesstoken.
The names to adress the desired settings and thus the parameters for the SetParameter() are exactly the same as they are in the GenICam.ini that you can find in %cvbdata%.