FB_XmlWrite 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.

  • 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.

Execution ends with a detected error and result indicates FileAlreadyExists.

  • The specified file already exists and the input i_xOverwriteFile is FALSE.

  • Specify another file name.

  • If the existing file can be overwritten, set the input i_xOverwriteFile to TRUE.

Execution ends with a detected error and result indicates XmlStructureInconsistent.

  • At least one value for the parameter uiParentIndex in the buffer that contains the XML elements prevents the creation of a valid XML file.

  • The uiParentIndex of the first element is <> -1.

  • Verify that the values defined for the parameter uiParentIndex are consistent.

NOTE: Refer to the output q_sResultMsg for further information on the invalid parameter.

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.