LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

GigE Vision how can I read the camera attributes

Hi,

we are using CVI 2012 and NI IMAQdx and we want to read out the camera attributes from a GigE vision camera.

 

We tried the IMAQdxEnumerateAttributes2 function but it didn't work. We got no information back.

 

Does anyone have an idea how we can read out the camera attributes?

 

thanks in advance

Oliver

0 Kudos
Message 1 of 4
(3,537 Views)

Hi Oliver,

 

the function IMAQdxEnumerateAttributes2 is the right choice for obtaining camera attributes.

 

Did you stick to the approach mentionend in the manual as follows?

 

"[IMAQdxEnumerateAttributes2] Gets the attributes supported by the camera. If you do not know in advance the number of features, complete the following steps:

 

  1. Call this function with the attributeInformationArray parameter set to NULL. The necessary size is then stored in count.
  2. Allocate attributeInformationArray with the given size.
  3. Call this function again using the previously allocated array."

Regards, Topper

0 Kudos
Message 2 of 4
(3,515 Views)

Hello Topper,

yes we tried this but we didn't succeed.

 

But meanwhile we know why, here is our solution:

 

// Open a session to the selected camera
// initialisiert den G4GigE-Zeilensensor
rw = IMAQdxOpenCamera(G4GigE.CamName, IMAQdxCameraControlModeController, &G4GigE.session);

//
IMAQdxEnumerateAttributes2(G4GigE.session, attributeInformationArray, &uiCount, "CameraAttributes::CustomFeatures::Illumination", IMAQdxAttributeVisibilityAdvanced);

//
strcpy(String, "CameraAttributes::CustomFeatures::Illumination::Slot1::Slot_1_RED");

//
IMAQdxSetAttribute(G4GigE.session, String, IMAQdxValueTypeU32, 10);

It is necessary to type in the correct pathname to adress the attribute correctly. The path will be separated by :: If the path is not correct there will be no result.

 

To get the number of attributes it seams that the highest path name have to be adressed.

 

since we found this out we could run our application

 

greetings

Oliver

 

Message 3 of 4
(3,505 Views)

Oliver, thank you for sharing your solution!

0 Kudos
Message 4 of 4
(3,498 Views)