From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
08-28-2015 03:30 PM
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.
Solved! Go to Solution.
08-28-2015 03:36 PM
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)
08-28-2015 03:43 PM
Putting "DSDS " at the front of the format string works also but is not as flexible as Darin's recommendation.
Lynn
08-28-2015 04:36 PM
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.
08-28-2015 04:41 PM
Where you have it is fine.
Lynn
08-28-2015 04:43 PM
But I am still getting an error " Error 1 occurred at Scan from String -input parameter is invalid"
08-28-2015 05:37 PM
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
08-28-2015 05:40 PM
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.
08-29-2015 07:45 PM
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.
08-29-2015 08:02 PM - edited 08-29-2015 08:02 PM
@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.