LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Input String to Case Structure always goes to default

Solved!
Go to solution

I have a 16 digit serial data stream which I am parsing to obtain the annuncator/units "81 = kg cm, 82 = Lb inch and 83 = N cm" using the string subset. This string is then passed to the case structure. When the serial string is read the default case is always used. The string that is being read is 41810000000001 with a start word before and an end word behind the string. I have attached my vi. When I use the prob to debug the value is " ". Is the string being parsed correctly? I must be missing something. Thank you.

0 Kudos
Message 1 of 3
(2,597 Views)
Solution
Accepted by topic author gprall001

You should connect output from VISA read to the string subset function, now VISA resource is connected.

0 Kudos
Message 2 of 3
(2,576 Views)

So what happened to fixing the VI like I showed you in the other thread?  http://forums.ni.com/t5/LabVIEW/How-to-set-Decimal-Point-position-from-right-to-left-Serial-Read/m-p...

 

You still have the bytes at port.  BAD.   And waiting for 32 or more bytes when you know you are getting 16 bytes.  Also BAD.

 

The problem with your current VI is you are parsing the VISA reference and not the string you got from the VISA read.

0 Kudos
Message 3 of 3
(2,572 Views)