Error 85 Occured at Scan From String Function in LabVIEW

Updated May 3, 2018

Reported In


  • LabVIEW Base
  • LabVIEW Full
  • LabVIEW Professional



Issue Details

When using the Scan From String function, I get Error 85 occurred at Scan From String (arg 1). This can come up when I am using the function directly, or am trying to communicate with a serial or GPIB instrument using VISA functions. Why do I see this error? 


The error is generated when input string does not contain the information expected by the Scan String. You can define the Scan String by right clicking the Scan From String function, and selecting Edit Scan String.

If you are trying to communicate with an instrument through VISA functions, ensure that the string being sent to the instrument is in the instrument's intended format, and that you are using the proper GPIB or serial cable.

Additional Information

The Scan String specifies what values the Scan From String function looks for, which can either be numbers or strings. The error occurs if the scan cannot find all of the values it is expecting in the order specified by the Scan String.

The table below shows the results for the Scan From String function with several different settings:
Input StringFormat String (Scan String)String ExplanationOutput 1Output 2Remaining String
123abc123%fScan number123 abc123
123abc123%f %fScan number, Scan numberErrorErrorError
123abc123%f %sScan number, Scan string123abc123 
%f %sScan number, Scan string123abc123

In most cases, this error can be disregarded, but you might want to take a closer look at your scan string. There are a few ways to work around this error:
  • Make sure the input string contains the information expected by the Scan From String VI.
  • Use a General Error Handler VI to programmatically control how LabVIEW handles the error. Wire the error out from the Scan From String function to the error in of the General Error Handler VI. If you use this VI and wire no Dialog to the type of dialog input terminal, LabVIEW ignores the errors.
  • Ignore only Error 85 by following guide How Do I Ignore a Specific Error in LabVIEW? detailing how to ignore a particular error. 
  • The last way to avoid this warning/error from popping up is to disable all error handling. If you do not use any error handling VIs, all warnings and errors are ignored by LabVIEW.


Not Helpful