LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to receive two different point data without getting mixed in LabVIEW?

Hello!

I have a question. I h

Spoiler
 

ave two remote XBees each is connected to a microcontroller . The microcontrollers sample the waveforms of two different points of power system and send data to receiver xbee which ultimately imported in LabVIEW.

Now the problem is I need to analyze the two different points data in such a way that when I analyze the first point data,second point data should not come and similarly with the second point data.how can I put the logic?

One method that I think is to introduce some recognized numbers in sending data so that on its basis,we can identity that the data is of point 1 or 2. And allow it to come. I need to receive data from point 1 after 10 seconds and from point 2 after 12 seconds.

Two windows are there. One for point 1 data analysis and 1 for 2nd point data analysis.Now the task is when I open 1st window to analyze point 1 data the 2nd point data should not come. Similarly for 2nd window.

Thankyou

Download All
0 Kudos
Message 1 of 5
(2,843 Views)

I think the identifier is what you really need.  Otherwise there is not way to tell the two sources apart.  Just make the first byte in the message the identifier and then you just have a simple case structure to determine the analysis.


GCentral
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
Message 2 of 5
(2,807 Views)

hello..

I am also doing the same thing ..basically i am building a Wireless sensor network..there are two nodes each with one microcontroller to fetch data from sensors and a xbee to transmit it to the base station (co-ordinator xbee which is connected to LV through Xbee USB explorer using serial VISA vi's). I have interafaced the 4 sensors succesfully and now i have 4 different types of data form two nodes which i want to send to the base station for monitoring purpose..

So can you please guide me for the further steps....on how to establish such a connection with xbee's so that the data reaching the base station can be monitored seperately(node1 and node2) ??

can you pls share your VI if you have done it successfully..? plz help

thank you..

0 Kudos
Message 3 of 5
(2,661 Views)

Did you understand crossrulz's reply?  You basically have two stations sending messages to a single station that then sends the combined message on to LabVIEW.  You need to design/create/borrow a "Protocol" to encapsulate and identify the messages so that LabVIEW can tell which of the two originating stations sent the message.  This is not unlike sending data over TCP/IP, the basis of the World Wide Web -- there's (sort of) a "single wire" that has all of the messages, but there's an Internet Protocol (abbreviated IP) and a Transmission Control Protocol (TCP) that keeps the messages straight, organized, and directed to the right place.

 

For your XBee system, you can do something similar that you design yourself, based on what kind of "messages" are being sent.  For example, let's assume that a "message" consists of N Integers transmitted as text, separated by commas, with the first number being "How many data integer are to follow".  Thus if you wanted to send the numbers 1, 2, and 3, you'd send the following string: "3,1,2,3<NL>" (where the New Line character serves as "End of transmission of this string").  To identify it as coming from XBee1 or XBee2, you could prefix it with "XBee1" or "XBee2", so if it came from XBee1, the entire string would be "XBee1,3,1,2,3<NL>".  The receiving XBee would just pass these down to LabVIEW, which would parse the initial "source" (XBee1 or 2) and know who sent it, parse the next number and know how many numbers are to follow, then parse the data into an array.

 

There are probably other ways to do this, but this is something you should be able to construct, yourself.

 

Bob Schor

0 Kudos
Message 4 of 5
(2,655 Views)

hello..

Thank you Bob Schor for the reply..

I tried to establish a simple communication between two xbee's ..on one side there is a microcontroller(I'm using Beglebone Black) with a xbee connected to its UART Rx and Tx pins and i'm sending a simple string of some letters(xyz..). And on the other side another xbee connected to LV through its USB explorer and im trying to read that string..

Problem is.. when i run the prog in highlight execution mode ..it is working properly i.e the string is getting printed in the front panel on every loop properly.. But when i remove the highlight execution it either does not show anything on the front panel or after some manupulations in wait(ms)..it shows the string printed 7-8 times at once after every 10-12 seconds or depending upon the time specified in wait(ms)..

So am i doing anything wrong..or i should change anything..?? 

plz help..

I am attaching the Read side VI and a image of Sending side VI..plz check.

Thank you..

Download All
0 Kudos
Message 5 of 5
(2,629 Views)