Serial communication with multiple RFID readers (using multiple Serial ports)

Hey ,
I'm doing a project based on waste segregation using RFID tags(which will be embedded in the garbage) .Eventually,it's supposed to be a game for little kids ,to learn to differentiate waste.
For now,i'm using just two RFID readers and two tags,just to see if i can get this bit working. I need to use multiple software serial ports (as of now, 2 ports to receive data from the two readers).

My problem point is -: Despite using whateverobject.listen() i'm unable to listen in on the available ports.Actually i don't get any data. But when i use just one reader or one port ( i don't need the object.listen() )and comment out the unnecessary parts of the code,it works.

i have posted the code below,which uses two ports and doesn't receive any data.If someone can please help with the receiving of information from two ports ,That'd be awesome!

#include <SoftwareSerial.h> 
String item;//variable to store the characters from the available serial port(RFID1)
String userid;//variable to store the characters from the available serial port(user)
 
int ctr=0;
long int user1=4140716;//tags which are given to the user-Reader 2
long int user2=4140718;
//long int cat[3]={4140720,5118436,4356789};// tags which are embedded in the garbage-Reader 1
SoftwareSerial user(3,4);//Serial object-1
SoftwareSerial RFID1(5,6);//Serial object-2


void setup()
{
  Serial.begin(9600);
  delay(200); 
  
}
void loop()
{
  
  func_user();
  
  func_RFID1();
  
}

void func_user()
{
  user.begin(9600);//setting the baud rate for the serial object-user
  long int un,um;
  user.listen();
  while(user.available())
   {
     delay(200);
       while(user.available()>0)
        {
        userid+=char(user.read());
        }
   }
  
    Serial.println(userid);
    char usercarray[15];
    userid.toCharArray(usercarray, sizeof(usercarray));//converting string to character array
    un = atol(usercarray); //converting char array to long int
    um=un%10000000;//using only 7 values in the 8 values of tag
    Serial.print("The user integer value is");
    Serial.println(um);
    delay(2000);
    if(um==user1)
         Serial.println("Welcome user1");
    else if(um==user2)
         Serial.println("Welcome user2");
    else
         Serial.println("invalid user");
   delay(2000);
   
   userid="\0";
  
}
void func_RFID1()
{
  RFID1.begin(9600);
  long int n,m;
  RFID1.listen();
  while(RFID1.available())
  {
     delay(2000);
     if(RFID1.available()>0)
  {
    item+=char(RFID1.read());
  }
  }  
  Serial.println(item);
  char carray[15];
  item.toCharArray(carray, sizeof(carray));
  n = atol(carray); 
  m=n%10000000;
  Serial.print("The integer value is");
  Serial.println(m);
  item="\0";
  
  delay(2000); 
  
  
}

Thanks in advance!

You should not be calling begin() in each of the functions. When you call listen(), that instance begins listening for serial data. You would have to scan the tag AND the reader would have to get data to the serial port withing a few nanoseconds (that will NOT happen) before the while loop begins.

  while(RFID1.available())
  {
     delay(2000);
     if(RFID1.available()>0)
  {
    item+=char(RFID1.read());
  }
  }

If, by some miracle, that did happen, you are sitting on your ass doing nothing for 2 seconds between characters. Is there a snowballs chance in hell that that is a reasonable thing to do?

Collecting data from multiple serial ports is really pretty simple. Use a Mega that has 4 hardware serial ports. Problem solved.

What you want to do, collecting incoming data from multiple serial ports that can send at any time, just isn't possible. Multiple instances of SoftwareSerial are intended for things that send data and can do that one at a time, or where the sender sends a continuous stream of data, not all of which it is critical to receive.

Okay,Paul.
So i made a few changes to the code got all the unnecessary delays out.It works perfectly for two soft serial ports,where only one port receives at a time.
But for three soft serial ports the data is dispalyed correctly once and incorrectly another time.erratic.
So i am shifting to mega as suggested as implementing 4 soft serial ports on uno seems to be a daunting task at this rate.
i just want to know,for my information,if it is theoritically possible to use that many(5) soft serial ports using arduino uno and have it working perfectly.

i just want to know,for my information,if it is theoritically possible to use that many(5) soft serial ports using arduino uno and have it working perfectly.

If you can assure that the device that sends data is the device that is being listened to, yes. That assurance is not easy, though, when you have no control over which RFID reader will be presented a tag.