Reading ChunkEncoderValue from AT C5 (2)

Hi!

I try to read encoder value from AT C5 camera, but having some problems.

Problem occurs only the first time after powering up the camera. Re-initializing camera second time helps, but it is not a suitible solution for me.

Accessing the EncoderValue node gives the error:

System.IO.IOException: IntegerNode[Std::ChunkEncoderValue]: Node is not readable.

“Attach chunk” option is turned on, according to solution from this post of mine: Reading ChunkEncoderValue from AT C5

Using another approach described here: Using Chunk Mode Data with CVB.NET , I get this error:

System.ArgumentOutOfRangeException: must be positive non-0

which indicates zero-length chunk block.

Sample code which I use for testing can be found here: https://github.com/kokostek/CvbTest/ along with my CameraSettings.gcs file.

CVB version is 13.03.004.

Hi @kokostek,

we will have a look if we can reproduce this issue an will try to find a solution.

Hi @kokostek,
I just had a look on this issue using CVB 13.04.000 and a AT C5 1280 camera, Device Version 1.0.2 and Firmware Version 1.2.0.
At first the same issue could be observed that after accessing the camera the Chunk Data from the NodeMap are not accessible. The main reason for this is that no image has been received yet and as a consequence of that Chunk Data do not exist at this moment. After acquiring the first image, the Chunk Data are availabe to be read.
One option for you would be trying to access the Chunk Data only after acquiring an image, or using a try/catch for each Chunk Node to be able to define that its not accessible at the moment.
Does this answer your question?

Hi @Simon, thank you for reply.

It realy does not seam like I trying to access chunk data before the image was received. As you can see here for example:

using (StreamImage image = stream.Wait(out var status))
{
    if (status != WaitStatus.Ok) continue;
    // Image received at this point. 
    // But accessing chunks for the first time after powering up the cameras still throws the error here:
    var encoderValueNode = deviceNodeMap["ChunkEncoderValue"] as IntegerNode;
    var currentEncoderValue = (int)encoderValueNode.Value;
    if (previousEncoderValue >= 0)
        PrintEncoderInfo(previousEncoderValue, currentEncoderValue);
    previousEncoderValue = currentEncoderValue;
}

The actual workaround that I managed to find, is that I need to turn off the loading of *.gcs file. This file interferes somehow with chunk accessibility.

Hi @kokostek,
double checking with CVB 13.03.004 did not change my observation.
After loading camera settings from a gcs file still the only thin required to read Chunk Data is acquiring an image previously. I also used your code snipped to verify that there is no other behaviour to see.

For reading Chunk Data there are the following settings required:

  • Attatch Chunk in the GenICam.vin is activated
  • ChunkMode is activated in the camera NodeMap
  • An image was acquired before the request.

Please verify if the gcs-file you are loading also contains an activated ChunkMode-Node.
In case there are still problems occuring we should have a look on camera and firmware versions.

Hi @Simon,

Sorry for the delayed response.
Yes, the gcs file does contain ChunkModeActive node which value is set to “1”.
The firmware version of the camera is 1.2.5.

Hi @kokostek
I contacted you by email for testing an attatched C# solution to behave equally on both of our systems.
Still with same firmware and software version I have no issues on reveiving the chunk data for the first image, so it should not be a global, but a local problem.