Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read/write for custom registers not in XML camera configuration file #51

Open
AndreaFrau opened this issue Oct 4, 2024 · 4 comments
Open

Comments

@AndreaFrau
Copy link

AndreaFrau commented Oct 4, 2024

I have a custom register in an Allied Vision Prosilica camera at address 0x16104, which is not defined as a node in the XML file.
I am able to read and write in that register using proprietary SDK (Vimba).
However, I am not able to do so via rc_genicam_api.
I tried with:

  • CPort read/write methods

or

  • getRegister/setRegister functions in config.h

I got the following error messages:

terminate called after throwing an instance of 'rcg::GenTLException'
what(): CPort::Read(address=0x16104, length=28): ReadMem failed. failed. (-1015)

or

terminate called after throwing an instance of 'std::invalid_argument'
what(): Feature not found: 0x16104

I also tried to load an amended xml config file with the new node but it didn't work and the following exception is thrown

terminate called after throwing an instance of 'GenICam_3_4::RuntimeException'

Is it possible to read/write such registers with the current rc_genicam?

@AndreaFrau AndreaFrau changed the title Read/write Read/write for custom registers not in XML camera configuration file Oct 4, 2024
@heikohimu
Copy link
Contributor

The cport read/write functions of the rc_genicam_api just call the corresponding GenTL functions. Are you sure that it is legal to read 28 bytes at that address? Maybe it is only allowed to read when some other parameter is set to a certain value? You may also try to use the GenTL Producer that comes with the camera by setting the GENICAM_GENTL64_PATH to the corresponding directory.

@AndreaFrau
Copy link
Author

You're right, it is only 4 bytes, but nothing changes.
With Vimba there is no other value to set in order to read that register.
Do you mean using the GenTL Producer provided by Vimba together with the rc_genicam library? I have just tried and I get "undefined symbol" errors which actually is not unexpected for me.

@heikohimu
Copy link
Contributor

Ok, so reading four bytes at 0x16104 with the cport read method does not work, but it works with the library of the manufacturer? I do not see a reason why it does not work with rc_genicam_api as the cport read / write functions are also used all the time when reading / writing parameters through the XML nodemap and we use this all the time with cameras from different manufacturers.

Yes, in general you can use the rc_genicam_api with different GenTL producers as long as they comply to the GenTL standard. We are using the rc_genicam_api ourselves with producers from Basler, Balluff, Baumer, ...

I do not know how to support you here. My guess is still that reading from that address is only possible if the camera is in a certain "mode".

@AndreaFrau
Copy link
Author

Yes, it works with Vimba library. However I would like to make it work via rc_genicam_api library since I use it successfully with several cameras from different manufacturers. This is the first time I am not able to do something with your library.
I'll try something more in the next days and let you know in case I find anything new

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants