LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dividing Serial Data

Hi.
I have three sensors sending data over LabView through serial line.
And I'm trying to have three displays on Front Panel to show those three sensor values.
Each sensor sends 8bits of data serialy one after another.
I am curious to know if there is a counter type of function or any other way to accomplish this.
Please let me know with this issue.
I would appreciate your reply.
Thank you.
 

Message Edited by Mack1980 on 02-21-2006 12:09 AM

0 Kudos
Message 1 of 14
(4,736 Views)
Hello,

I'm not sure I understand what you mean... Tell me if I'm wrong, you are receiving datas from 3 sensors, each sensor sends a value coded on 8 bit and you need to have 3 graph (or maybe 3 curves one graph ?).
What exactly is your problem ? Receiving the data from the sensors or you already have the data coming on labview and you want know how to interpret them ?

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 14
(4,724 Views)

Hi.TiTou.  Thanks for your response and I apologize for the poor explanation.

The LabView is successfully receiving the data from three sensors through serial line, and is able to display them all on a Meter.

But I'm trying to have three Meters so that I can display each sensor value on each Meter.

I dont know how I can de-multiplex those three sensor values on serial line.

Thanks,

 

 

0 Kudos
Message 3 of 14
(4,719 Views)
Ok, so what type of data are you receivin, is it an array of 3 element each of them being an 8 bit coded value ?
Could upload your vi, that would be easier to help you 😉

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 4 of 14
(4,714 Views)
Yeah. Its the array of three element, each contains 8bit value.
I am attaching my VI.
 hope this will help you to understand better.
Thanks.
0 Kudos
Message 5 of 14
(4,712 Views)
Ok, good shot, I have just one more question (sorry...). your three sensors are linked on the same port, or they all have their own adress (different one from the other) ?

If they have different adress, you need to read then sequentialy, for instance in a for loop indexed on an array of adress.
If they are responding at the same adress (which would surprise me), then the string you receive has to be separted in three parts.

I assume you are in the first case... have a look at the vi and tell me if it works.



We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 6 of 14
(4,701 Views)
TiTou,
 
 Sorry for the late reply. I was off from internet access for a while.
 Thanks for your help!!
 Actually the three sensor data Im receiving are linked at same port (Com port 6), through serial line( wireless transmission) 
 All three data come from the same wireless transmitter, and received at same wireless reciever (Com port6)
 And the diagram you wrote for me is not quit working yet.
 I'm trying to figure out the way to separate the string into three parts.
 
 If you could help this, i would really appreciate it.
 
 

Message Edited by Mack1980 on 02-23-2006 12:09 PM

Message Edited by Mack1980 on 02-23-2006 12:11 PM

0 Kudos
Message 7 of 14
(4,687 Views)
Your VI seems to be OK as far as reading the serial port.

Can you post a copy of the type of string you receive from the device and the decoded outputs you would like to produce? Parsing the string can be done in many ways; what is good for your application depends on the details of the data transmission format. Are the readings separated by commas, tabs, carriage returns, spaces, fixed number of characters per data element, or other?

Lynn
0 Kudos
Message 8 of 14
(4,674 Views)

Hi, Lynn.

Thank you for the reply.

Actually I just found out that the information I receive is not in an array of three element although I said it is. 

The type of string Im receiving is something like "1256256", they are not separated by commas or anything.  I would like to separate this into "1" "256" "256".  First section is formatted in "binary". Second and Third section are formatted in "decimal of 0 to 256".  

If the separation of string is impossible to do without having space or commas between, space or commas can be used between those values.

Thank you for your help.

 

0 Kudos
Message 9 of 14
(4,653 Views)
Heres a thought.  Could you not use the 'String to Byte Array' function found in the String, String/Array/Path Conversion Palette?  If the sensors are sending you 8 bits each, you could feed the string into this function and then index the array to pull out each different value. 

Greycat
0 Kudos
Message 10 of 14
(4,649 Views)