Defining payload ??

I have a total of 4 arduino uno+ xbee nodes. Three of them have sensors connected to them and the fourth one is the coordinator that receives the sensor data from the other three. I have xbee series 1 and i have configured them in API mode. All of them are transmitting to the coordinator. But the coordinator is mixing up the data being received from all the three nodes as I am not sure how to define the payload for individual node in the coordinator code.
I am attaching the coordinator code and also the code that i have for my sensor nodes.

coordinator_all.ino (4.56 KB)

Node_1.ino (2.36 KB)

But the coordinator is mixing up the data being received from all the three nodes as I am not sure how to define the payload for individual node in the coordinator code.

You need to invent a package structure and insert a unique tag on each device so it can be identified when you receive it. This is way easier than it sounds. It depends on the nature of your data as to what you can use as a tag.

I am not sure how do I do that. Any suggestions or a link I can refer to?
I see that there is a problem downloading the attachment, I am attaching the zip file now.

coordinator_all.zip (1.15 KB)

Node_1.zip (1.14 KB)

Node 1 puts its identifier, say "1", into a field in the data packet and that gets carried along with the data. Likewise for Node 2 = "2".