LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Project select data from the serial port

Solved!
Go to solution

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

 

 

 

0 Kudos
Message 1 of 7
(3,435 Views)

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.

0 Kudos
Message 2 of 7
(3,430 Views)

I suggest you take time to study some of the free Labview course material.



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 3 of 7
(3,420 Views)

Thank you very much,  

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

0 Kudos
Message 4 of 7
(3,419 Views)
Solution
Accepted by topic author baicy

Scan From String.

 

Using the first option, and putting some numbers in for the zeroes so it shows some kind of meaningful result.

 

 

0 Kudos
Message 5 of 7
(3,407 Views)

 ,

 

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

0 Kudos
Message 6 of 7
(3,371 Views)

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.

0 Kudos
Message 7 of 7
(3,366 Views)