Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important information on the platform change.

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

FilePath and name for File Object...

FilePath and name for File Object...

Sepp
Member

What ist the path name convention for storing / readig files on the CTRX Controller ?

Pathname.JPG

...any suggestions ?

8 REPLIES 8

TheCodeCaptain
Community Moderator
Community Moderator

Hi Sepp,

from the view of your app data the plc root folder is at the following path:

"/plc/run/linux-gcc-aarch64/data"

for a virtual controller this path is:

"/plc/run/linux-gcc/x64/data"

In here you can create your own files and folders which will then be accessable from the plc

The following folders are the default.

TheCodeCaptain_0-1640007488546.png

So adding for example a "/seppfolder/seppfile1.txt" would be a solution, this would be the path from the plc.

The path within the app data would then be  "/plc/run/linux-gcc-aarch64/data/seppfolder/seppfile1.txt"

Small hint for accessing with webdav, the path would be "/solutions/webdav/appdata/plc/......"

that doesnt work ?!

another idea ?

file2.JPG

TheCodeCaptain
Community Moderator
Community Moderator

From plc view the root folder is without "plc/run/linux-gcc-aarch64/data".

So it would be the following:

sFileName := 'seppdata/Seppfile1.txt';

okay, now i'm able to write the file, but there is an issue while rading the file, the szSize reports always "0" ....

any suggestions ?

P.S: i used the example from library...

 

file3.JPG

 

TheCodeCaptain
Community Moderator
Community Moderator

Hi Sepp,

are you using the CXA_FILEASYNC library? Version 1.8.0.0

Just test it and it works fine. I used both, the ReadAsync and the GetSize.

And also your size is an ULINT and the library gives an UDINT.

2021-12-21_09h47_44.png

sepp uses the File Access lib, because there is no other lib !

Could you pls share the CXA_FileAsync lib ?

file4.JPG

TheCodeCaptain
Community Moderator
Community Moderator

Seems like quite some libraries are not installed to your system.

The libraries come with the normal ctrlX WORKS installation.

Try to uninstall and reinstall ctrlX WORKS.

You can stay on your version as long as you are higher or same as 1.8.

If you have the latest runtime apps with version 1.12, you should also get ctrlX WORKS 1.12.2 in the collaboration room.

https://developer.community.boschrexroth.com/t5/Store-and-How-to/FAQ-for-ctrlX-WORKS/ba-p/11925 

TheCodeCaptain_0-1640094254639.png

 

@PrzemekGabrych your question is already discussed in this topic. Please do not ask the same question in several forums.

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