Developer Portal Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    Generating TMC failed

    Generating TMC failed

    Hudson
    Established Member

    Hello,

      One issue I have, after I build PLC program, one error is occurred, 'Generating TMC failed! Object reference not set to an instance of an object'.

    PS: The program is running in the production line, and build it without error in the owner computer, but others' computer has this error.

    Object_reference_not_set.png

    2 REPLIES 2

    SteffenR-
    Community Moderator
    Community Moderator

    Make sure that the "pin version" checkbox is set. Otherwise the project will open with different TwinCAT versions depending on what is installed on your computer.

    SteffenR_0-1648129294341.png

    Also compare (binary compare, not date compare!) if this folder on both laptops is identical (one can have more libraries than the other, but if they have both the same library versions, the files must be identical):
    C:\TwinCAT\3.1\Components\Plc\Managed Libraries

     

    If both is fine there were several solutions in the past:

    1. The error is known for some TwinCAT versions with OpconBase/NxBase object <=V1.0.13.0 (library <=V1.0.9.0) and OpconFbpPdpBase/NxFbpPdpBase object <=V2.0.60.0 (library <=V1.0.60.0) . Therefore an update could solve the problem.
    2. Sometimes this also helped: Close TwinCAT > Start an export > Compile PLC project again.

    3. One step further sometimes also helped:
      Close TwinCAT > Delete all Bosch libraries in C:\TwinCAT\3.1\Components\Plc\Managed Libraries > Start an export > Compile PLC project again.
    4. Delete the TMC file in TwinCAT and compile the PLC project (which should re-create the TMC file):
      SteffenR_3-1648130503110.png
      Hint: If creation of the TMC file still fails, your IO links will be lost after closing TwinCAT.

    5. If you still could not solve it:
      Other libraries could be the causer (usually not the Bosch Connected Industry libraries).
      1. Check for libraries that inlcude a TMC file (which should not be included in libraries):
        SteffenR_1-1648130107427.png
      2. The library creator must set and afterwards remove the checkbox "Minimize Id changes in TwinCAT files" (1). Then the creator must create a new library version:
        SteffenR_2-1648130216514.png

         

    Hudson
    Established Member

    Thank you ^^, it is related pin version with different TwinCAT version

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist