After upgrading an ARSim project from Automation Studio 4.x to Automation Studio 6, FileIO access that targets C: can fail even when the file exists. The reported AS6 and Runtime 6.2.1 case returns 20708 (fiERR_FILE_NOT_FOUND) from FileInfo. A related AS6.2 case returns 20709 from DirCreate.
Identify the AS6 ARSim path change
Automation Studio 6 ARSim no longer supports using C: as it was used by the affected Automation Studio 4.x projects. During simulation, access the simulation user location through the USER file device and its USER_PATH instead of addressing C: directly.
| Operation | Observed AS6 result | Required correction |
|---|---|---|
FileInfo against C:
|
20708 / fiERR_FILE_NOT_FOUND
|
Use the USER file device in ARSim. |
DirCreate through a device mapped to a nonexistent folder |
20709 |
Create the parent folder through UserPartition before using the dependent device. |
Create the directory through the valid device
A file device that points into AlarmX is not valid until that directory exists. Create the directory through UserPartition; do not call DirCreate through the device whose target directory has not yet been created.
DirCreate_0(
enable := TRUE,
pDevice := ADR('UserPartition'),
pName := ADR('/AlarmX')
);
Apply the correction in ARSim
- Replace direct
C:access in the simulation path with theUSERfile device. - Place the test file under the directory referenced by the active ARSim
USER_PATH. - If the application requires a subdirectory such as
/AlarmX, create it first withDirCreateusingUserPartition. - Only after the directory exists, use any file device configured to point into that directory.
Verify the active configuration
Run the same FileInfo request after moving the file to USER_PATH and changing the file device to USER. Confirm that 20708 no longer occurs. For directory creation, confirm that the folder appears before invoking operations through a device mapped beneath it and that DirCreate no longer returns 20709.
The ARSim USER_PATH can depend on the selected PLC configuration or working path. If an external HMI must copy files to that location, either configure a constant simulation destination or obtain the active USER_PATH and communicate it to the HMI. The evidence does not specify a supported programmatic interface for reading that value.
FAQ
Why does B&R FileInfo return error 20708 in AS6 ARSim?
20708 is reported as fiERR_FILE_NOT_FOUND when the upgraded simulation still targets C:. Use the USER file device and place the file under the active USER_PATH.
Why does DirCreate return 20709 after upgrading to AS6?
The reported failure occurred when directory creation used a file device whose target folder did not yet exist. Create the folder through UserPartition first, such as pName := ADR('/AlarmX').
Can an ARSim HMI use one fixed USER_PATH for every configuration?
The reported USER_PATH depends on the PLC configuration or working path unless the simulation destination is configured consistently. Otherwise, the HMI must receive the active path; the evidence does not identify a programmatic read method.