SECURITIES AND EXCHANGE COMMISSION
                             Washington, D.C. 20549

                                  SCHEDULE 13G


                                 (Rule 13d-102)


             INFORMATION STATEMENT PURSUANT TO RULES 13d-1 AND 13d-2


                   Under the Securities Exchange Act of 1934
                                (Amendment No. 2)


                                   COGNEX CORP
             -----------------------------------------------------
                                (Name of Issuer)
                                  Common Stock
              -----------------------------------------------------
                         (Title of Class of Securities)

                                   192422103
             -----------------------------------------------------
                                 (CUSIP Number)

                               December 31, 2004
             -----------------------------------------------------
            (Date Of Event which Requires Filing of this Statement)

Check the following box if a fee is being paid with this statement [].


----------
*The remainder of this cover page shall be filled out for a reporting person's
initial filing on this form with respect to the subject class of securities, and
for any subsequent amendment containing information which would alter the
disclosures provided in a prior cover page.

The information required in the remainder of this cover page shall not be deemed
to be "filed" for the purpose of Section 18 of the Securities Exchange Act of
1934 ("Act") or otherwise subject to the liabilities of that section of the Act
but shall be subject to all other provisions of the Act (however, see the
Notes).



CUSIP No. 192422103             13G                    Page 2  of 6 Pages

--------------------------------------------------------------------------------
   1.  NAME OF REPORTING PERSON(S)
       S.S. OR I.R.S. IDENTIFICATION NO. OF ABOVE PERSON(S)

       Morgan Stanley
       IRS  # 39-314-5972
--------------------------------------------------------------------------------
   2.  CHECK THE APPROPRIATE BOX IF A MEMBER OF A GROUP*
                                                             (a)  [  ]
                                                             (b)  [  ]
--------------------------------------------------------------------------------
   3.  SEC USE ONLY

--------------------------------------------------------------------------------
   4.  CITIZENSHIP OR PLACE OF ORGANIZATION

       The state of organization is Delaware.
--------------------------------------------------------------------------------
   NUMBER OF      5.   SOLE VOTING POWER
     SHARES            1,508,582
  BENEFICIALLY    --------------------------------------------------------------
    OWNED BY      6.   SHARED VOTING POWER
      EACH             
   REPORTING      --------------------------------------------------------------
     PERSON       7.   SOLE DISPOSITIVE POWER
      WITH             1,508,582
                  --------------------------------------------------------------
                  8.   SHARED DISPOSITIVE POWER
                       
--------------------------------------------------------------------------------
   9.  AGGREGATE AMOUNT BENEFICIALLY OWNED BY EACH REPORTING PERSON

       1,530,552
--------------------------------------------------------------------------------
  10.  CHECK BOX IF THE AGGREGATE AMOUNT IN ROW (9) EXCLUDES CERTAIN SHARES*

--------------------------------------------------------------------------------
  11.  PERCENT OF CLASS REPRESENTED BY AMOUNT IN ROW (9)

       3.3%
--------------------------------------------------------------------------------
  12.  TYPE OF REPORTING PERSON*

       IA, CO, HC
--------------------------------------------------------------------------------
                     *SEE INSTRUCTIONS BEFORE FILLING OUT!




CUSIP No.  192422103                 13G                   Page 3  of 6 Pages


Item 1.     (a)   Name of Issuer:
                  COGNEX CORP
                  --------------------------------------------------------------
            (b)   Address of Issuer's Principal Executive Offices:
                  ONE VISION DR
                  NATICK, MA 01760
                  --------------------------------------------------------------
Item 2.     (a)   Name of Person Filing:
                  Morgan Stanley
                  --------------------------------------------------------------
            (b)   Address of Principal Business Office, or if None, Residence:
                  1585 Broadway
                  New York, New York 10036
                  --------------------------------------------------------------
            (c)   Citizenship:

                  Incorporated by reference to Item 4 of the cover page
                  pertaining to each reporting person.
                  --------------------------------------------------------------
            (d)   Title of Class of Securities:
                  Common Stock
                  --------------------------------------------------------------
            (e)   CUSIP Number:
                  192422103
                  --------------------------------------------------------------

Item 3.           Morgan Stanley is a parent holding company.




CUSIP No.  192422103            13-G                   Page 4  of  6  Pages


Item 4.     Ownership.

            Incorporated by reference to Items (5) - (9) and (11) of the
            cover page.

            (a) Morgan Stanley is filing solely in its capacity as the parent
                company of, and indirect beneficial owner of securities held
                by, one of its business units.

Item 5.     Ownership of Five Percent or Less of a Class.

            As of the date hereof, Morgan Stanley has ceased to be the
            beneficial owner of more than five percent of the class of 
            securities.

            See item 4 (a)

Item 6.     Ownership of More Than Five Percent on Behalf of Another Person.

            Inapplicable

Item 7.     Identification and Classification of the Subsidiary which Acquired
            the Security Being Reported on By the Parent Holding Company.

Item 8.     Identification and Classification of Members of the Group.

Item 9.     Notice of Dissolution of Group.

Item 10.    Certification.

            By signing below I certify that, to the best of my knowledge and
            belief, the securities referred to above were acquired in the
            ordinary course of business and were not acquired for the purpose
            of and do not have the effect of changing or influencing the
            control of the issuer of such securities and were not acquired in
            connection with or as a participant in any transaction having
            such purpose or effect.


CUSIP No.  192422103             13-G                   Page 5  of  6 Pages


                                   Signature.


            After reasonable inquiry and to the best of my knowledge and belief,
            I certify that the information set forth in this statement is true,
            complete and correct.


Date:       February 15, 2005

Signature:  /s/ Dennine Bullard
            -----------------------------------------------------------------

Name/Title  Dennine Bullard /Executive Director, Morgan Stanley & Co. Inc.
            -----------------------------------------------------------------
            MORGAN STANLEY



                       INDEX TO EXHIBITS                               PAGE
                       -----------------                               ----

EXHIBIT 1       Secretary's Certificate Authorizing Dennine Bullard      6
                to Sign on behalf of Morgan Stanley


* Attention. Intentional misstatements or omissions of fact constitute federal
  criminal violations (see 18 U.S.C. 1001).




                   EX-99.b
            SECRETARY'S CERTIFICATE


 CUSIP No. 192422103                    13-G              Page 6 of 6 Pages

                                      EXHIBIT 1
                                ------------------

                                  MORGAN STANLEY

                             SECRETARY'S CERTIFICATE


         I, Charlene R. Herzer,a duly elected and acting Assistant Secretary
         of Morgan Stanley, a corporation organized and existing under the 
         laws of the State of Delaware (the "Corporation"),certify as 
         follows:


             (1) Donald G. Kempf, Jr. is the duly elected Executive Vice
                 President, Chief Legal Officer and Secretary of the
                 Corporation;

             (2) Pursuant to Section 7.01 of the Bylaws of the Corporation
                 and resolutions approved by the Board of Directors of the
                 Corporation on September 25,1998, the Chief Legal Officer
                 is authorized to enter into agreements and other instruments
                 on behalf of the Corporation and may delegate such powers
                 to others under his jurisdiction; and

             (3) Donald G. Kempf signed a Delegation of Authority as of
                 February 23, 2000, which authorized Dennine Bullard to
                 sign reports to be filed under Section 13 and 16 of the
                 Securities Exchange Act of 1934 on behalf of the
                 Corporation.  Such authorization is in full force and
                 efect as of this date.

          IN WITNESS WHEREOF, I have hereunto set my name and affixed the seal
          of the Corporation as of the 3rd day of February, 2005.

                                                ______________________________
                                                Charlene R. Herzer
                                                Assistant Secretary