Developer Portal Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    Data access storage path issue

    Data access storage path issue

    SXN2SZH
    Member

    I met an issue when i try to change the storage path for data access. In my project, VPB40 and hot-plug mPad are used. There are two ethernet adapter on VPB40, C Lan uses IP '10.172.10.120', S Lan uses IP  '192.168.212.33'.

    The default data storage path is '\\%PlcHost%\OpconData$\DocuData\',  PlcHost is set as 10.172.10.120.

    Since there is a hot plug mPad in this project and mPad is connected to S Lan, both HMI on mPad and VPB40 have to get access to OpconData folder. If i set storage path to be '\\%PlcHost%\OpconData$\DocuData\', HMI on mPad could not get access to the data folder. Thus, i tried to define a global variable MpadPlcHost which is initialized in Plc main function with '192.168.212.33'. At the same time, i change the storage path to be '\\%MpadPlcHost%\OpconData$\DocuData\'. However, neither HMI on VPB40 nor mPad could not get access to Data folder.

    After that i tried to replace the storage path to be ' '\\192.168.212.33\OpconData$\DocuData\'',  both HMI on VPB40 and mPad have access to data folder.

    My question, why it did not work with the storage path '\\%MpadPlcHost%\OpconData$\DocuData\'?

    User defined path.pngload data file error.pngip address directly used.pngload data without error.png

     

    1 REPLY 1

    nexidator
    Community Moderator
    Community Moderator

    The keyword %PlcHost% is replaced with the hostname or IP address configured for the target system where the PLC runtime is located by OES when exporting the HMI and DatAccess configuration, not at runtime. It has nothing to do with a PLC variable, and obviously inventing new keywords doesn't work.

    Best practice is to configure the hostname instead of the IP address at the target system hosting the PLC. In this case, you can use %PlcHost%. But the way you did it should also work.

    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