CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM
We have issued our reports dated February 16, 2023, with respect to the consolidated financial statements and internal control over financial reporting included in the Annual Report of Cognex Corporation on Form 10-K for the year ended December 31, 2022. We consent to the incorporation by reference of said reports in the Registration Statements of Cognex Corporation on Forms S-8 (333-150315; 333-206081 and 333-224716) and Form S-8 POS (File No. 333-100709).
/s/ GRANT THORNTON LLP
Boston, Massachusetts
February 16, 2023