This function sets the value and flags of the selected camera feature.



.......................................................................................................................................................................................


Controls and Indicators



          hCamera IN is the camera handle. This value is returned by Initialize.vi and is passed between Pixelink VIs as a reference.


            uFeatureId IN is the feature ID. The enumerated type definition associated with this control lists the available features. Any camera will support a subset of these features.


            uFlags IN are the flags to be set for the feature. The enumerated type definition associated with this control lists the available flags. Of this list one of the following values must be used:

  • FEATURE_FLAG_MANUAL - The application controls the feature by sending parameters to the camera;


  • FEATURE_FLAG_AUTO - The camera controls the feature continuously. No intervention by the camera is possible.


  • FEATURE_FLAG_ONEPUSH - The camera sets the feature only once and then returns to manual operation.


  • FEATURE_FLAG_OFF - The feature is turned off.



             pParms IN is an array of values for this feature. The size, meaning, order and acceptable values of this array are camera dependant and can be found in the camera specific system guide for the camera in question. Also see the example PixeLINK VIs for examples of how to setup the pParams IN array.



             hCamera OUT has the same value as hCamera IN.


             pParms OUT has the same values as the pParms IN array.



Details


Features are camera dependent. Details of which features are supported and how they operate can be found in the camera system guide.  The GetCameraFeatures VI can also be used to identify the presence and range of all features supported by the camera.


It is helpful to check the error return codes when using this VI. Setting a value out of range, setting an unsupported flag or accessing an unsupported feature will cause an error.


It is recommended that the GetFeature VI be called after SetFeature to verify the actual camera settings.  In some cases, where granularity of the control only allows a small set of intermediate values, the camera may apply the closest acceptable value.


When turning the feature off, GetFeature VI should be called before the SetFeature to determine the pParms array.  This array should be passed into the SetFeature VI along with the FEATURE_FLAG_OFF flag.


SetFeature can change the settings of any custom descriptors that are in use. Note that if all descriptors are in focus at once (rather than just a single descriptor), calling SetFeature sets the properties in all descriptors simultaneously.


Note: See Error Handling for error input and output information and error codes.