Need help reading RS232 with ARDUINO

cristof

Member
Joined
Sep 30, 2017
Messages
117
Hi All,
I need Arduino help.
I want to use extra power from my inverter to "drive" the water heater resistor.
My inverter can be controled from RS232 serial com.
If I send a request to inverter, it will send back a feedback (a string of 145 number)
eg : I send with RS232 : "QPIGS"
response from inverter : "(11111 22222 33333 44444 55555 66666 77777 ....... and so..."
I am "new" with Arduino, and I made this small program to test the communication with inverter:
***********************
char retour[140];
void setup()
{

}

void loop() {
Serial.begin(2400);
delay(500);
Serial.flush();
Serial.println("QPIGS");

Serial.readBytes(retour,140);

delay(100);

Serial.println(retour);
delay(500);
Serial.flush();
Serial.end();
}
*****************

it's working , and I can receive a feedback.

I need now to extract from the "string" a few number. But, I don't know how to do !

Many years ago, I use to code with Visual Basic, but arduio is not the same

I hope somebody will be able to help me.
Many thanks.

image_mrjcoa.jpg
 
First of all the protocol of the PIP require CRC to be processed. With that said a first start could be to look at https://github.com/scottwday/InverterOfThings or one of the other available systems out there. Personally im running solar-sis on Rasp but will in near future adopt ESP8266 on all my devices instead so each one of the devices have its own controller.
But that will take some more time before its done :)
 
daromer pid='48964' dateline='1556113944']First of all the protocol of the PIP require CRC to be processed. With that said a first start could be to look at https://github.com/scottwday/InverterOfThings or one of the other available systems out there. Personally im running solar-sis on Rasp but will in near future adopt ESP8266 on all my devices instead so each one of the devices have its own controller.
But that will take some more time before its done :)[/quote]

Hi Daniel,
The RS232 protocol for MPP SOLAR MPI inverter do not need "CRC"

image_gbuuht.jpg
 
Ahh No the mpi doesnt. As Said i have done my fair share of programming towards mpp stuff ;)

Look at My code for solar-sis as example on how i decode it. Could give some hints. I can add some more later when i have My computer
 
daromer said:
Ahh No the mpi doesnt. As Said i have done my fair share of programming towards mpp stuff ;)

Look at My code for solar-sis as example on how i decode it. Could give some hints. I can add some more later when i have My computer

Very strange, maybe the MPI 5,5Kw is not same as MPI 10Kw, But for sure, I dont need CRC.
my MPI5,5kw is exacly the same as Infinysolar 5,5kw (I have both of them)
I can send QPIGS command and receive the feedback, and it's working !
 
You missed what i wrote.... ;)
 
Back
Top