Error Code 85 When Using Scan from File in LabVIEW

Updated Jan 12, 2018

Reported In

Software

  • LabVIEW Base
  • LabVIEW Full
  • LabVIEW Professional

Issue Details

Why does the Scan From File function in LabVIEW return error code 85, Scan failed. The input string does not contain data in the expected format.? I get error code 85 despite the fact that I am using the same format string that I used with the Format Into File function.

Solution

You can fix this by using multiple format specifiers to individually scan each part of the string that precedes or follows a space in your file, as the Scan From File function interprets spaces as the end of the string.

As the following block diagram illustrates, this workaround requires a different format string than one used with the Format Into File function to format data as text and save it to a file. You then can concatenate the strings to match the original string. 

Additional Information

When a file includes a string that contains spaces, the Scan From File function interprets a space character as the end of the string. Thus, LabVIEW starts scanning for the next output in the middle of the string rather than at its end, which causes this error.

WAS THIS ARTICLE HELPFUL?

Not Helpful