Developer Portal Community

    We are still working on migrating to the new Bosch Connected Industry Online Portal. Stay tuned! Click here for the latest updates.

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

    HMI smart project window cannot be opened or is displayed incorrectly

    HMI smart project window cannot be opened or is displayed incorrectly

    JSC_electronics
    New Poster

    I got a SW project from another developer and now I am doing commissioning of the station. However, when I want to edit the HMI window, it either doesn't load at all or loads incorrectly.

    See screenshots of what the project looks like in CPS and what it looks like in the station when I do the deployment.

    A window that cannot be opened displays a description of the error:

    Object reference not set to an instance of an object.
    Source: VisiWinNET.Smart.Core
    StackTrace: at VisiWinNET.Smart.Design.SFCHostLoader.PerformLoad(IDesignerSerializationManager designerSerializationManager)

    I tried to update the HMI NXRD file but with no success.

     

    3 REPLIES 3

    nexidator
    Community Moderator
    Community Moderator

    Looks like the HMI components are not found or cannot be loaded at design time.

    Updating the NXRD file was a good idea. Just to make sure: Have you used an HMI version matching the CpStudio version? (Only the first two places are relevant, patches are compatible. e.g. CpStudio 5.8.x works with HMI 5.8.y)

    Is your project (including the Std folder) located on a local drive? I have seen this problem (or at least a similar one) when projects were located on a network drive.

     

    Next you could check some files in the <Station>\Hmi folder:

    The file OpCon.HMI.Modulo.csproj contains reference paths from the Hmi folder to the dll files in the Std\Hmi_Vx_y looking like this:

    <Reference Include="OpCon.HMI.Interfaces">
      <HintPath>..\..\Std\Hmi_V5_8\OpCon.HMI.Interfaces.dll</HintPath>
      <CopyLocal>True</CopyLocal>
    </Reference>

    The red path has to be correct (especially the version). The paths are automatically adapted when updating a project to a later CpStudio version, so they should usually be correct, but when using Source Code Control systems and not committing everything, the files can be inconsistent.

     

    In the same folder, check the file VisiWinNETSmart.config. It also contains information about the HMI files:

    <Assemblies>
      <Assembly alias="OpCon.HMI.Modulo.Forms" assembly="OpCon.HMI.Modulo.Forms, Version=5.8.0.0, Culture=neutral, PublicKeyToken=4241dc8872ae9833" />
      <Assembly alias="OpCon.HMI.Modulo.StdWindows" assembly="OpCon.HMI.Modulo.StdWindows, Version=5.8.0.0, Culture=neutral, PublicKeyToken=4241dc8872ae9833" />
      <Assembly alias="OpCon.HMI.Modulo.Shared" assembly="OpCon.HMI.Modulo.Shared, Version=5.8.0.0, Culture=neutral, PublicKeyToken=4241dc8872ae9833" />
    </Assemblies>

    Again, the red versions should be automatically adapted when converting a project.

     

    Apart from that, we have had issues with files that were downloaded from an untrusted source (Internet, SharePoint, other shared storages). Usually I would think that this also causes errors on the target system, but who knows...  A solution for this problem is described in this answer: Solved: Re: HMI Html View - Missing DLL file (WebViewLoader2) (bosch.com)

    Yes, the versions are the same. CPS is V5.6.2, HMI is 5.6.0.18, so the first two numbers match.

    Yes, SW project including the Std is stored locally on my computer.

    BUT

    OpCon.HMI.Modulo.csproj contained <HintPath>..\..\Std\Hmi_V5_8\OpCon.HMI.Interfaces.dll</HintPath>

    VisiWinNETSmart.config contained Version=5.8.0.0.

    I edited the files in notepad and fixed the version number and it works like a charm. Thank you.

    OK, this probably means that someone has opened the project with CpStudio 5.8 and later reverted the changes except in these files.

    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