Training simulation machine for future train-drivers (issues with serial com.)

Hello everyone.
Me and my friend are building the training machine for new train-drivers. The basic is to read and send data between digital interface (simulator) and analog interface (the real cab of a locomotive). Today I have just wrote the program (see below), that makes respond real voltmeter to the in-game data of voltmeter in the simulator. After some research I came accros some ideas and build the beta. I opened the serial port monitor in Arduino app and type in the text, the game is sending (format: data+value in one word). The voltmeter responded very well, the whole code was running. Then I tested the communication between simulator and arduino. The simulator send the EXACT SAME data format with EXACT SAME formation and all…but 1000 times faster then me tiping in serial moniotor :D. The arduino (Arduino MEGA 2560) seemed to recieve data as the green serial LED were flashing. But nothing happened with voltmeter. Then I tested to write many data to monitor at once…arduino did not respond. So the arduino don´t like the amount of information comming…but why? I saw people projects that have no problems with such amount of information. Can someone help me please?
Looking forward to hearing from you, Misodash.

The code od the program:

String prichodziaSpravaS;
String hodnotaS;
int vystupAmpermeterE;
void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);
pinMode(11, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
while (Serial.available() > 0){
  prichodziaSpravaS = Serial.readString();
  if (prichodziaSpravaS.startsWith("amp")){
    hodnotaS = prichodziaSpravaS;
    hodnotaS.remove(0, 3);
    int hodnota = hodnotaS.toInt();
    vystupAmpermeterE = map(hodnota, 0, 5000, 0, 116);  //here is the recognition of the data incoming. Data come in format VARIABLE+VALUE
    analogWrite(11,vystupAmpermeterE);                  //and I need substitution of the text to save the data
  }
}
while (Serial.available() == 0){
}

}

P.S.: The voltmeter is connected to the pin 11(with regulation) and GND.