UserSet configuration


I am trying to change a UserSet for my Lucid Vision Labs-PHX016S-M camera but i am not
so sure how to. Is there some example code somewhere?

arv_device_write_register() is not the right function for it?



arv_device_write_register is a low level access to your device.

UserSet is normally managed through standard features, like UserSetSelector, UserSetLoad

The right set of API to use, depending on the feature type, is arv_camera_set/get_string and arv_camera_execute_command.


1 Like

Thanks for your quick reply. I tried a few functions and i am wondering if this would be correct to change to Default UserSet and print out the current UserSet active?

ArvCamera *camera;
ArvDevice *device = NULL;
const char *feature = NULL;
device = arv_open_device(NULL, NULL);
camera = arv_camera_new (NULL, NULL);

arv_device_set_string_feature_value (device, "UserSetSelector", "Default", NULL);
arv_camera_execute_command(camera, "UserSetLoad", NULL);
feature = arv_device_get_string_feature_value (device, "UserSetSelector", NULL);
printf("%s\n", feature); 

if (camera != NULL)
g_clear_object (&camera);


I guess you are on the good track, but that really depends on the feature actually implemented on your camera. You should refer to your camera documentation.

Some comments about your code:

  • No need to instantiate an ArvDevice instance, arv_camera_new() already does this for you, and it will conflict with the camera instance.
  • You should use the arv_camera_* API
  • You should handle the errors to know when things go wrong
  • No need to test for camera != NULL before calling g_clear_object()
1 Like