03-08-2011 09:28 AM
Hi everyone,
The project is about use labview to receive data from a serial port wirelessly. The serial port will receive two values (X1 and X2) every 10 minutes. I want to use those two values as two inputs for my formula. How to make selection? Many thanks.
Baicy
Solved! Go to Solution.
03-08-2011 09:45 AM
You have to figure out how to parse the serial data coming in. We can't figure that out for you without seeing an example of what the serial string looks like.
03-08-2011 10:12 AM
I suggest you take time to study some of the free Labview course material.

03-08-2011 10:12 AM
Thank you very much, Ravens Fan.
Actually, I can control the serial string coming in.
For example, the string can be send as % 000000A1 0000000A2 * , which start with % and end with *
Or I can send the string like this % 000000A1 \r\n 0000000A2 *
All I need to do is to seperate those two data and use each one as correct input for the formula.
Any idea how to achieve that? many thanks.
Baicy
03-08-2011 11:16 AM - edited 03-08-2011 11:17 AM
Scan From String.
Using the first option, and putting some numbers in for the zeroes so it shows some kind of meaningful result.

03-09-2011 08:40 AM
Many thanks for your help. You are the best.
If the input string is not the exactly the format string by using the Scan From String Function, will these un formatted string be discarded?
Again, many thanks,
Baicy
03-09-2011 08:45 AM
Possibly. It depends on how much different the string is. For example, extra characters at the end will be discarded. But if the function has a difficult time decoding the string, then its possible an error will happen. You may need to wire up the error out terminal of that function and handle it.