FB_WriteFile Troubleshooting

Troubleshooting

This table describes some general issues and their solutions:

Issue

Cause

Solution

Execution ends with a detected error and result indicates FilePathInvalid.

  • The specified directory is not available.

  • The given file path has an invalid syntax.

  • The specified file does not exist on the specified file path.

  • The file extension(1) of specified file path is not supported.

  • Verify that the directory exists. In case the file path targets extended memory (such as an SD memory card), verify that it is available.

  • Verify that the syntax used is supported by your particular controller.

    For example, your controller may support '\' as a separator while another controller supports '/' instead.

  • For the parameter i_etModeFileOpen, select the value AppendPlus.

  • Verify that you do not use a file with an extension that is not supported.

Execution ends with a detected error and result indicates FileAlreadyExists.

The specified file already exists but the parameter i_etModeFileOpen does not allow overwriting the file.

  • Specify another file name.

  • If the existing file can be overwritten, select for the parameter i_etModeFileOpen the value CreatePlus..

Execution ends with a detected error and result indicates Timeout.

The specified value for the timeout is insufficient.

Increase the timeout parameter according to the number of cycles needed to create the file. Also allow for the cycle time of the task.

Execution is completed successfully but the file is not at the expected location.

The file was redirected to another location according to a system rule regarding the file name or the file extension.

Verify the specified file name. The file name must include the path information. Refer to Specifying Path Information for Files.

(1) File names with file extensions .ap_, .app, .cf_, .cfg, .crc, .err, .frc, .log, .prj, .rcp,.rsi, and .urf are not supported for creating or modifying files using the FB_WriteFile function block.