Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting Hex string to ASCII numeric

The program itself seems good, except when I run it I get the following error display:
Error 85 occurred at Scan From String (arg 1) in Detail of question.vi
Possible Reasons: LabVIEW:  Scan failed.

I don't know what this means, but I cannot figure out a way to bypass it.

Thank you,
JohnGalt

Message Edited by JohnGalt on 05-17-2006 02:13 PM

----------------------------------------------------------------------------------------------------------------------------------------------------
I've got a sneaking suspicion that Jesus might have been made of bread. Why else did they have to put him in a warm cave and wait three days for him to rise?

Damnant quadnon intelligunt - They condemn what they do not understand.
0 Kudos
Message 11 of 16
(1,937 Views)

Hi John

create an indicator on the string returned from the read, and an indicator returned from substring.

maybe no data is available! or it is not hex but pure binary

greetings from the Netherlands
0 Kudos
Message 12 of 16
(1,931 Views)
Hi,
as Albert told you try to put an indicator on what are coming out from visa read string and enable " '\' Display codes" option by mouse right click on that string.
That error indicates that in the string to scan there is a character not of the type you specified (in that case not HEX, not 0123456789ABCDEF). Thus, check what are coming out from your serial port.
Regards
CLD - Labview Certified Developer
0 Kudos
Message 13 of 16
(1,923 Views)
I think I figured out the problem with the converter VI. It recieves the data as ASCII characters rather than their hex equivalents. I don't know how to convert those so the hex equivalents of the original ASCII characters become the ASCII characters in a new string. Is there a way I can do this?
----------------------------------------------------------------------------------------------------------------------------------------------------
I've got a sneaking suspicion that Jesus might have been made of bread. Why else did they have to put him in a warm cave and wait three days for him to rise?

Damnant quadnon intelligunt - They condemn what they do not understand.
0 Kudos
Message 14 of 16
(1,914 Views)

Hi John

can you send a few strings (complete) and a guess of the value you think it should be?

I guess it is  just combining the values in a correct way.

e.g. put the strings in an array of strings on a frontpanel or use a few frontpanels.
of course with the output string in an indicator like I already said.
before saving "make current values default" (in operate) 

greetings from the Netherlands
0 Kudos
Message 15 of 16
(1,911 Views)
Thanks. I seem to have it figured out now, and it seems to be working. Thanks for all the help.

JohnGalt
----------------------------------------------------------------------------------------------------------------------------------------------------
I've got a sneaking suspicion that Jesus might have been made of bread. Why else did they have to put him in a warm cave and wait three days for him to rise?

Damnant quadnon intelligunt - They condemn what they do not understand.
0 Kudos
Message 16 of 16
(1,831 Views)