Problems with FileIO since AS6 Upgrade,

Hi,

since I upgraded from AS4.12 to AS6 and Runtime 6.2.1, the FileIO FB FileInfo can not find my files on C: and returns error 20708 - fiERR_FILE_NOT_FOUND.

If i run the same project on AS4.12, everything works just fine.

I have to mention that i run the project on ARSim and only use C: during simulation.

Can someone tell me what changed? I can not find anything in the RevFiles of B&R…

Best regards,
Philip

You cannot use C: in ARSim any more in AS V6.
See following post from community:
USER_PATH and DevLink - Ask Questions - B&R Community

You should use USER as file device.

1 Like

Hello,

i am just encountering a very similar problem with a fresh updated project (AS4.11 → AS4.12 → AS6.2).
So i’am sorry for hijacking your thread Philip, but the title is absolutely fitting.

Configuration for all versions used:

Most of the mapp Tasks creating their folder this way: (within AS6 with error 20709)

Within 4.x Versions the Simulation folder populated properly: (AS4.11 and AS4.12 working)

Now with AS6 the folder stays empty, and DirCreate error 20709:

Anyone has an idea what is happening here with AS6?
Greetings and Thanks
M.

Your code is strange.
The DirCreate should be done with pDevice := ADR(‘UserPartition’);

The AlarmXFiles is not pointing to a valid path yet, because folder AlarmX is not existing.

1 Like

Hi Corne,

that worked.
DirCreate_0(enable := TRUE, pDevice := ADR(‘UserPartition’), pName := ADR(‘/AlarmX’)); :white_check_mark:
Thank you!

The code was shipped with mappFramework from B&R Github, and worked until AS6, i thought thats common practice then.

greetings
M.

Thanks for the Help but i am still unable to read the FileInfo.

Now i understand, that if ARSim is active, the Temp\Simulation Path is used for the F:/ partition but i can copy the file directly into this folder and he still returns the same error when i want to read the file info.
I checked the file name many times… i am lost… :smiley:

I dont think it is a code error because with AR4.xx it works but wrong configuration of my file devices or because of ARSim…

image

The folder which USER_PATH is pointing to with ArSim is :
image
For instance :
image
If you want other folders in this USER_PATH, you have to create these folders with DirCreate.

1 Like

Thank you very much, i will try that immediately.

It works :tada:
Thanks!

The only thing someone can do to find this information is to search in the b&r help for USER_PATH. Thats the only thing i did not :smiley:

Do you know by any chance how to read out the USER_PATH?
I am asking because the project will not run always with the same config or wokring path…

But I could define a general Destination Directory for the ARSim without the Config folder right?
then it would be always the same…

Why would you need this?
If you want to add folders and/or files to this folder you should use other options:

We have a HMI, with a backend wich has to save a files into the F:/ partition by using the FTP Server of the PLC. But we test many things with the ARSim. In case of the simulation we have to tell the HMI on wich Path it has to copy the file.

Now i know since AR4.xx I have to use the USER_PATH.
Right know the path depends on the PLC config. So I would have to tell the HMI over OPC UA the file path. If I would be able to have always the same USER_PATH during simulation the HMI could have an constant path setting.

So i have three options.

  • use the offline installation dialog every time with the custom path
  • somehow automatically a constant path independent from the config
  • or i have to read the USER_PATH out and tell it the HMI