LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 85 occurred at Scan From String (arg4)

Solved!
Go to solution

I am trying to scan in hexadecimal values and convert it into decimal values from a text file.

The file I am scanning from consists of linessuch as

DSDS S0=00002B5D S1=00002AD5 S2=00001C9E S3=00001050 S4=00000003 S5=D2BF3769

I am trying to convert the S0, S1, S2 , S3, S4 AND S5 to decimal values. But I keep getting "Error 85 occurred at Scan from String (arg4)". I am not sure what I am missing here. I have attached the vi below.

0 Kudos
Message 1 of 12
(5,093 Views)

Just add '%s ' to the beginning of your format string to grab the start of the string, (make sure you add the space after the %s)

0 Kudos
Message 2 of 12
(5,080 Views)

Putting "DSDS " at the front of the format string works also but is not as flexible as Darin's recommendation.

 

Lynn

0 Kudos
Message 3 of 12
(5,072 Views)

I am not sure what I am doing is right. But where do I exactly add the %s. A image description will be of more help.

0 Kudos
Message 4 of 12
(5,057 Views)

Where you have it is fine.

 

Lynn

0 Kudos
Message 5 of 12
(5,054 Views)

But I am still getting an error " Error 1 occurred at Scan from String -input parameter is invalid"

0 Kudos
Message 6 of 12
(5,049 Views)

I do not get any error and the outputs seem reasonable when I run it using the string you posted in the first post of this thread.

 

Lynn

0 Kudos
Message 7 of 12
(5,025 Views)

Using the string you posted in your earlier message in the VI you posted, it works just fine for me.

 

Are you sure you have a complete, accurate string?  Post your VI with the string that fails saved as the default value in the string control.

 

PS:  You don't need to wire a constant 0 to all of those inputs.  The default value is already 0.  And the datatype will default to the datatype of the indicator you wire in.

0 Kudos
Message 8 of 12
(5,023 Views)

This is the VI I have got. But I still keep getting the error input parameter is invalid. Can you just post the vi you think which works fine so that I can cross check what is the mistake.

0 Kudos
Message 9 of 12
(4,991 Views)

@raj177 wrote:

This is the VI I have got. But I still keep getting the error input parameter is invalid. Can you just post the vi you think which works fine so that I can cross check what is the mistake.


As Raven said above, please post that same VI with typical data saved in the control as default values.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 10 of 12
(4,979 Views)