FB_CsvWrite 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 invalid syntax.

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

  • 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 etModeFileOpen, select the value AppendPlus.

Execution ends with a detected error and result indicates FileAlreadyExists.

  • The specified file already exists but the etModeFileOpen does not allow overwriting the file.

  • Specify another file name.

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

Execution ends with a detected error and result indicates TableInvalid.

  • The pointer to the read buffer is not assigned.

  • Verify the correct assignment of the parameter pbyTable in the structure i_stTableWriteValues.

Execution ends with a detected error and result indicates TableWriteValuesInvalid.

  • The dimensions of the specified CSV table are not consistent.

  • Verify the correct assignment of the parameter in the structure i_stTableWriteValues.

Execution ends with a detected error and result indicates WriteParameterInvalid.

  • The parameter specified for the write mode are inconsistent.

  • No character has been specified for the delimiter.

  • Verify that the selected value for etModeFileOpen is supported by etModeFileOpen

  • The value for sDelimiter must not be empty.

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.

  • Increase the processing block size per write operation to reduce the number of function block calls which are needed to create the file.

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.