LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Scan from string Error in normal mode

Solved!
Go to solution

Hi All

   My scan from string suddenly stopped working and started giving me this error. The string that is read ends up being something like 2.86E-4 or the like. When I run in highlighted mode everything works fine and it interprets the number fine but when it isn't in highlighted mode it returns an error. Not sure why since it's a simple number to convert. Any help? I've attached the error and the highlighted mode version. Thanks!

0 Kudos
Message 1 of 4
(2,560 Views)
Solution
Accepted by topic author IanMcD

First guess: timing issue. Especially since you said it works in highlight mode. Specifically, when you are not running in highlight mode you're probably not waiting long enough before trying to read, and the loop immediately detects no bytes on the serial port. That delay function in there will not guarantee a 1 second delay between write and read . There is no data dependency - a rookie mistake. Either use a sequence frame or use the Time Delay VI to have error clusters to wire through to establish data dependency.

0 Kudos
Message 2 of 4
(2,555 Views)

Spaghetti Smiley Very Happy

0 Kudos
Message 3 of 4
(2,548 Views)

Yep, that did it. I wired in a Time Delay.

0 Kudos
Message 4 of 4
(2,541 Views)