Stav
-
Posts
2 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Gallery
Posts posted by Stav
-
-
Hello experts,
Firstly, thank you for reading this
Now,I have tried in other forums but couldn't get a final / working solution
What I am trying to do:
I receive temperature and pressure information form a sensor through a micro-controller and through the serial port
The values are simply displayed in numbers, e.g 234 for temperature and 23456 for pressure
These two values will be in later stage divided by 10 and 100 regardless.
I thought of sending the number in a 10 byte string by simply adding a double space between the temp and press values,
e.g data send out the serial port are raw numbers : ' 234 23456'
I thought of doing that as it could be easier to then split the string in half (5 bytes each) and have to separate strings for the two readings
That all works good so far
Where I get troubled is in the conversion bit. I have tried doing the following
String to Array->Index Array->Join Numbers->Type Cast->Cluster but something is wrong which I can't figure out
Are there any other possible ways of doing this a bit easier, especially for a beginner, such as me?
Thank you in advance
Stav
(Numeric) String to Array - Displaying numbers received from serial port to a virtual meter
in LabVIEW General
Posted
Thank you for your reply Tim,
It seems to be working fine by splitting the string into 3 parts but still there is something wrong with the VI which I can't notice
Here I have attached a screen shot to make things clearer
It looks like the output c of Match Pattern function, ie the pressure as it is after the AB(Header), includes the string before AB, ie the temperature
Also, I have noticed that Decimal String To Number function outputs 3 for temperature and 5 for pressure instead of the correct numeric values
Any ideas how to proceed?
Just curious, why 'posted on the dark side'?
Thank you again
Any help would be much appreciated
Stav
It looks like it reads the number of bytes instead of the decimal values
Oops, sorry that was me being silly.
I have connected the meters to the wrong output of the Decimal String to Number function
It all works fine, thank you
Stav