This widget could not be displayed.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

scan form string error 85

Solved!
Go to solution

hello i got an error at scan from string , error 85  , 

this is my program , please give me solution 

 111.JPG1111.JPG

0 Kudos
Message 1 of 9
(4,730 Views)

First, your subject says error 85, but your picture says error 1.

Please be accurate in describing the problem.

 

That and we can't provide a solution.  You haven't given enough information.

 

Thank you for providing an actual VI to go along with the picture of your code.

But the problem is in the data you get form the VISA Read and are feeding into the scan from string.  That doesn't show in your picture.

 

If you placed an indicator on that string, and even better, ran your code and saved the data in that indicator as default before saving it and attaching the VI, we could see what is wrong with your data.

 

Also, your first embedded picture is broken.

0 Kudos
Message 2 of 9
(4,719 Views)

11.JPG

im sorry 

sa.JPG

0 Kudos
Message 3 of 9
(4,699 Views)

actually the vi that i attach is part of my program , 
my issue , sometimes the program work properly , and sometimes the program give error 85 , 
before i use scan from string i use match pattern , but match pattarn have an issue , a few data will show Nan and inf , than i try to change to scan from string , thanks for tryng help me , below is my project , this project yet finish 

0 Kudos
Message 4 of 9
(4,695 Views)

If you got Error 1, that means you got an empty string from your VISA Read (ie the read failed either due to an error or timed out).

 

Error 85 indicates that you got something from the VISA Read, but it does not match the format you state in the Scan From String.  So we are back to "What did the VISA Read output"?



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 9
(4,692 Views)
Solution
Accepted by topic author kucink

You didn't save the data in your Read Buffer indicator as default.

 

Go back to the simpler VI, run it.  Right click that indicator.  Save as Default.  Save VI .  Attach.

 

Please use block diagram cleanup on your big VI.  Why have 3 different case structures all controlled by the same boolean button?

0 Kudos
Message 6 of 9
(4,687 Views)
Solution
Accepted by topic author kucink

Now that you added the image from the Arduino terminal, it looks like the data is formatted correctly.  How often does the Arduino spit out data?  Could you share the Arduino code so we can see if we can find a little "gotcha"?



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 9
(4,685 Views)

i got the solution , ty , the solution is adding Visa flush I/O buffer 

0 Kudos
Message 8 of 9
(4,574 Views)

VISA Flush is probably not the right answer.  What if you flush after a message packet has started but not finished?  You'll get an incomplete message.

 

You should almost never need a VISA Flush.  Honestly, I don't think I've ever used it in my programming.

 

If your Loop runs fast enough to service the VISA buffer it should keep up.  But a protocol that has the device sending data continuously is generally a bad design.  A protocol where the device waits for you to write it a command, then sends back a response that you read, is better.  That way it isn't filling up the VISA buffer if you aren't ready to read it.

Message 9 of 9
(4,567 Views)