cancel
Showing results for 
Search instead for 
Did you mean: 

Input String to Case Structure always goes to default

SOLVED
gprall001
Member
Solved!

Input String to Case Structure always goes to default

Message contains an attachment

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.

2 REPLIES 2
nephe
Member
Solution

Re: Input String to Case Structure always goes to default

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

RavensFan
Knight of NI

Re: Input String to Case Structure always goes to default

Message contains a hyperlink

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.