ApplyAcquisitionSettings

You can add the ApplyAcquisitionSettings function to the spreadsheet by selecting a parameter from the AcquireImage property sheet and dragging that parameter to the spreadsheet. The ApplyAcquisitionSettings function works as a setter for acquisition parameters shown in the AcquireImage function. This function is useful when you want to modify the acquisition settings from the spreadsheet quickly and easily at runtime, or when you want to update a setting based on external communications (FFP) or the output of a vision tool, without opening the AcquireImage property sheet.

The ApplyAcquisitionSettings function supports the following parameters:

  • Debounce (ms), Delay (ms), Exposure (ms), Offset, Gain, Orientation, Start Row, Number of Rows
  • Illumination: Mode, Intensity, Bank Enabled
  • High Dynamic Range: HDR Mode, HDR+ Kernel Size
Note:
  • You cannot drag-and-drop other parameters (such as Trigger Mode) from the AcquireImage property sheet to the spreadsheet.

  • Parameters that the connected device does not support are grayed out and cannot be dragged and dropped.
  • The AcquireImage function (A0) does not contain any arguments, and the acquisition settings are not retained when exporting the cells as a cell template. To export the acquisition settings, add ApplyAcquisitionSettings to the spreadsheet, enable the parameters that you desire to retain, set the settings to the desired values, and then export ApplyAcquisitionSettings as a cell template. When the cell template that contains ApplyAcquisitionSetting is imported, the acquisition settings will be applied to the AcquireImage function once the ApplyAcquisitioSettings cell is executed. For more information on the spreadsheet cell templates, see Export and Import Cells To or From Templates.

How To Use ApplyAcquisitionSettings

  1. Open the AcquireImage property sheet in cell A0.
  2. Drag a parameter from the AcquireImage property sheet to the spreadsheet.
  3. The ApplyAcquisitionSettings function is added to the spreadsheet, and returns an AcquisitionSettings data structure, the parameter's label, and an edit control. For example, if you drag-and-drop the Debounce (ms) parameter into the spreadsheet, the AcquisitionSettings data structure, the "Debounce (ms)" label, and an edit control are populated in the spreadsheet.

    AquisitionSettings data structure, label and edit control

  4. Click OK to close the AcquireImage property sheet.
  5. If you want to add another acquisition parameter to the spreadsheet, open the ApplyAcquisitionSettings property sheet.

    Note: It is highly recommended to drag-and-drop a parameter from the ApplyAcquisitionSettings property sheet after the first ApplyAcquisitionSettings function has been created. If you drag multiple parameters from AcquireImage, you are creating multiple ApplyAcquisitionSettings functions, and it is not obvious which parameters are being set for each.
  6. Check the desired parameter's checkbox. For example, if you want to add the Delay (ms) parameter to the spreadsheet, check the Delay (ms) parameter checkbox.

    ApplyAcquisitionSettings property sheet

  7. Drag-and-drop the parameter to the spreadsheet.
  8. The parameter's label and an edit control are populated in the spreadsheet. For example, if you drag-and-drop the Delay (ms) parameter into the spreadsheet, the "Delay (ms)" label and an edit control are populated in the spreadsheet.

    AcqusitionSettings data structure with the second parameter

  9. Repeat steps 5 through 8 until all the desired parameters have been added.
  10. Modify the values in the edit controls, as desired.
  11. The new values will be applied at the next image acquisition.

    Note: If you are using the Camera Trigger Mode, the new values will be applied after the next device trigger.
Note:
  • If you have more than one ApplyAcquisitionSettings functions in the spreadsheet, only the last updated value will be used at the image acquisition.
  • The parameter's label and edit control are populated only when you drag-and-drop the parameter from the AcquireImage or ApplyAcquisitionSettings property sheet to the spreadsheet. If you insert the ApplyAcquisitionSettings function using other methods (such as typing ApplyAcquisitionSettings in a cell), only the AcquisitionSettings data structure is populated.
  • If you uncheck a parameter on the ApplyAcquisitionSettings property sheet, the associated edit control on the spreadsheet no longer overwrites the value in the AcquireImage function.

ApplyAcquisitionSettings Outputs

When a supported parameter is dragged and dropped from the AcquireImage property sheet to the spreadsheet, the following are returned.

Returns

  • AcquisitionSettings data structure
  • Parameter's label
  • Edit control for the parameter