-
Notifications
You must be signed in to change notification settings - Fork 17
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
Should GainRaw be GCFeatureTypeDouble? #23
Comments
Yes. The older cameras from Allied Vision GainRaw is an integer, which is why I did all that work in R1-8.
The code needs to be more complex and determine if GainRaw is an Integer or float GenICam parameter. I have not looked closely enough to see how that can be done. Mark |
@mpdunning I just looked at the firmware release notes It says:
So back in 2012 they were renaming GainRaw to Gain to be GenICam compliant on the Manta G-033. It seems strange that your newer firmware from 2016 on the Manta G033B would not have the new Gain feature. It may be worth contacting their tech support to ask that. |
I just searched the template files in ADGenICam for output records with _GainRaw. These are the occurrences:
Note that in all cases there is an This is the list of all cameras that contain output records with D_Gain.
The only cameras we need to worry about are those that have GainRaw and do NOT have Gain. That includes the GC1380CH, GC1380H and a few others. I wonder if the GC1380CH was updated to the latest firmware if it would then support Gain? Note that all of the Manta cameras in this module have GainRaw, but they also have Gain, so GainRaw does not need to be used. It seems strange that your Manta cameras have GainRaw as a double and not Gain. I wonder if that is fixed in more recent firmware? |
According to the GenICam 1.0 spec GainRaw is an int.
So it seems strange that GainRaw is not an int on your camera, since that seems to violate the standard. Is it possible arv-tool-0.4 has a bug and you should try arv-tool-0.8? |
Thanks for looking at this Mark. Yes, it seems like there's something funny (or non-GenICam compliant) about the firmware on the older G033B cameras. I have previously upgraded the firmware on G125B Mantas and GainRaw gets replaced by Gain. I didn't take note of the datatype of GainRaw when I did this though. I'll try to find some older cameras which are different models and see what Gain/GainRaw looks like on these. I'll also try arv-tool-0.8 as you suggested. |
I just tried to update the firmware on my Alliied Vision GC1380CH. It turns out that for my hardware version I am already running the latest firmware, 1.50.01. That means it only supports GainRaw, not Gain. GainRaw is an integer feature. |
OK, thanks for testing that. I just tried arv-tool-0.8 and unfortunately I still get a float:
In ADBase.template I replaced the drvUser GAIN parameter with GC_D_GainRaw and this seems to work fine. Thanks again for the help. |
That seems like a reasonable fix. I still think it is worth asking AVT tech support about why GainRaw is a double on that camera, and if it is changed to an int in newer firmware. |
On newer firmware GainRaw is replaced by Gain (a float), which seems to agree with the latest GC standard (which doesn't include GainRaw). arv-tool fails to get the gain parameter on the newer cameras because of some formatting issues, but if I look at the xml file, here is what it shows:
This is firmware 00.01.44.04. Compared to older firmware (00.01.44.00):
|
If you use the Python tools in ADGenICam to create the template file from the XML file for the new firmware does the ao Gain record get created correctly? |
I think so. Here's what I get for the newer firmware:
And the old firmware:
|
OK, so the new firmware should work fine. |
Thanks a lot Mark. I'll close this after I test both. |
Tested successfully on latest G033B firmware (00.01.44.04). |
Mark, thanks for adding support for GainRaw in R1-8. This was exactly what I needed to support our old cameras.
But I found that it didn't quite work for our cameras, as the GenICam feature datatype for this parameter appears to be a float.
Here is one example:
$ bin/arv-tool-0.4 -n "Allied Vision Technologies-50-0503321242" features | grep -i gain
Category: 'Gain'
Enumeration: 'GainSelector'
Float: 'GainRaw'
...
This causes a failed type conversion and the driver to print the following error messages:
2021/08/09 13:37:41.583 VimbaFeature::VimbaFeature error input feature type=0 != Vimba feature type=3 for featurename=GainRaw
2021/08/09 13:37:41.583 VimbaFeature:readInteger: ERROR calling GetValue error=-10
As a result the gain can't be set or read correctly.
If I change the feature datatype to a double it fixes the problem:
So are there cameras out there that actually use an integer type for GainRaw?
I found three cameras of ours that are old enough to use GainRaw and they are all floats.
They are all Manta G033B cameras with FW versions 00.01.42.00 or 00.01.44.00.
I can submit a PR if you agree that this change makes sense.
If different cameras use different datatypes for this parameter, how do we deal with this?
Thanks,
Mike Dunning
SLAC
The text was updated successfully, but these errors were encountered: