Attached files
EXHIBIT 23.1
CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM
We have issued our reports dated February 11, 2010, with respect to the consolidated financial
statements, supplemental schedule, and internal control over financial reporting included in the
Annual Report of Cognex Corporation and subsidiaries on Form 10-K for the year ended December 31,
2009. We hereby consent to the incorporation by reference of said reports in the Registration
Statements on Forms S-8 (File Nos. 333-02151, effective April 21, 1996; 333-60807, effective August
22, 2001; 333-44824, effective August 30, 2000; 333-68158, effective August 22, 2001; 333-96961,
effective July 23, 2002; 333-100709, effective October 24, 2002; 333-126787, effective July 21,
2005; and 333-150315, effective April 18, 2008).
/s/ Grant Thornton LLP
Boston, Massachusetts
February 11, 2010
February 11, 2010