Developer Portal Community

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

    Use FileSystemAccess to operation the files in a remote PC

    Use FileSystemAccess to operation the files in a remote PC

    ZYYZZZ
    Member

    Hello, 

    One issue I have is that I try to use FileSystemAccess Addon to read a .txt file from an remote PC with a same IP network segment,

    at first I map the virtual drive into an Network drive Z:\ ,

    and then input the path to the ParCmd.Name, command is as below:

    FileSystemAccess.ParCmd.Name := 'Z:\test\Target\test3.txt';

    but the FileSystemAccess Addon reply me an error: "ADS: File or target not found."

    I want to know if there are some methods to read a file in drive of a remote PC(e.g. change some parameters or use another addon),

    I need your Help, thanks!

     

    Addon Version:1.0.6.0

    5 REPLIES 5

    nexidator
    Community Moderator
    Community Moderator

    It is impossible to access mapped network drives or volumes created by a subst command from the TwinCAT runtime. The reason is that TwinCAT operates on a system driver level. You will need to copy the file to the PLC target system before you can access it from TwinCAT.

    Thanks! that's mean I have to use a RunProcess Addon to excute a batch file to copy the .txt file to PLC target system, then use the FileSystemAccess to read it? but for a batch file, it seens hard to get the error which the batch file returns, is there any solution?

    nexidator
    Community Moderator
    Community Moderator

    The exit code of the batch file should be available in the RunProcessAddon. I haven't tested this though. Have you already tried if this works?

    Not yet, but I will keep you informed about the test results when we conduct it in the future.

    in your reply: It is impossible to access mapped network drives or volumes created by a subst command from the TwinCAT runtime. 

    Do you mean there is no twincat command, that can access the network drives?

    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