LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Communication - Data Issue

Hi everyone,

I am relatively new to LabVIEW, and I have been working on receiving data through Serial COM port from my Flow Meter Device. I have attached both screenshots for my Block Diagram and Front Panel, which show how I am receiving data from the device. The VI is also attached and a screenshot describing how and in what order data is being transferred from the device (just fyi) (P.S. each data parameter sent from the device is separated by single space based on the manual).

 

The issue I have been having is that I cannot seem to figure out a way to split the string with all the incoming data, so that it would be outputting values separately. For example, from the Front Panel screenshot, the first value is +014.74 which is Pressure, second is +025.46 which is Temperature, and so I would like to make them separated so that I can assign, let's say, a chart/graph to each one of them.

 

I would be very grateful for any assistance on the matter.

0 Kudos
Message 1 of 4
(1,096 Views)

ScanFromString.png

Tips: Format Specifier Syntax

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
-------------------------------------------------------
https://github.com/ZhiYang-Ong
0 Kudos
Message 2 of 4
(1,071 Views)

Are the signs always the plus-sign? Perhaps it's better to separate the string by its space chars.

And your example won't work, because after removing all spaces the "scan from string" tries to find with "+%f%f" something in the part "+00.001000.02" (which was originally "+00.001 000.02").

This could get the right result with your example, but it shouldn't with "+00.001 001.02".

Greets, Dave
0 Kudos
Message 3 of 4
(1,031 Views)

Your delimiter for the Spreadsheet String To Array is wrong.  Use Space Constant instead of your string.  You are trying to set the delimiter to a 3 character string (", space, ") when you just need the space.  For readability, use the Space Constant from the palettes.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 4
(1,002 Views)