# 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 run time, 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:

- Trigger Type, Debounce (ms), Delay (ms), Exposure (ms), Offset, Gain, Orientation, Start Row, Number of Rows
- Illumination: Mode, Intensity, Banks Enabled, Always On
- 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.
- As the function does not contain any arguments, the configured 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 ApplyAcquisitionSettings is imported, the acquisition settings will be applied to the function once the ApplyAcquisitionSettings 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 label of the parameter, 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.

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 checkbox of the desired parameters. For example, if you want to add the Delay (ms) parameter to the spreadsheet, check the Delay (ms) parameter checkbox.

7. Drag-and-drop the parameter to the spreadsheet.

8. The label of the parameter 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.

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. If you check the Apply Immediately box, the function applies the new values at the next image acquisition. If you leave the box unchecked, the modified acquisition settings are applied after the image acquisition.

Note: Changing the acquisition settings while Apply Immediately is checked resets the acquisition system. Missed triggers can occur during the reset.
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 label of the parameter 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 Label of the parameter Edit control for the parameter