REXduino - Communication failure between Raspberry PI and Arduino_MEGA
-
@mtomek Dear Michal,
I'm not entirely sure where the problem might be. Is there an error in the System Log? Please set up the System log configuration according to the following instructions from the REXduino_User_Guide.pdf document and post the log output here."You can print all the outgoing and incoming serial data to the REXYGEN System log. This will allow you to find the problem. In REXYGEN Studio, go to menu Target->Configure System Log and tick Information and Verbose in the Function block messages box. Afterwards you can open System log Target->Show System Log and analyze the serial communication. It is recommended to use a sampling period of 1 second for such debugging purposes."
Best regards,
Jan -
@reitinge Hi,
I will definitely analyze all outgoing and incoming data into the REXYGEN protocol system as you wrote. Then I'll let you know.However, at the last communication failure, the states of the communication variables of FB Arduino_MEGA2560hex were as follows (comm_status = 3, err_code = 57, err_subcode = 57). These values have not changed.
The system log had the following errors:
Is it possible to find out what the problem is from this system log listing?
Thanks.
Best regards
Michal -
@mtomek This system log output looks exactly like the one from the previous topic. Are you sure this is a different problem?
-
@reitinge Hi,
it isn´t related to the previous problem. This was solved by deploying the latest version of FB Arduino_MEGA2560hex and the latest library.
But, during panel repairs, I accidentally found out that I have a broken USB cable between the RaspberryPI and ArduinoMEGA. This error did not recur after replacing the cable. So I will hope that this was the problem.
Michal -
@mtomek Hi,
after three weeks, without a communication problem, the communication error came again. The communication error came exactly after the "peak" of the 1-wire Tsolar measurement (see graph below). The "comm_status" of FB Arduino_MEGA2560hex changes from 0 to 1 (0: Arduino not responding, waiting for timeout to try again, 1: Serial port open, trying to initialize communication).
I still get 1-wire measurement errors in System Log ...This communication error has not yet occurred. Could it be related to that "peak" of measurement?
Thanks.
Best regards
Michal
-
@mtomek Dear Michal,
this 52 51 error (1-Wire bad crc) is usually associated with data corruption during transmission. That's why the peak appeared on the chart. The data is not relevant at this time. Does this error occur often?Cheers,
Jan -
@reitinge Hi,
error 52 51 occurs continuously, see below. I only record "peak" in the graph occasionally, because I archive the data every minute, see the graph below.
Michal
-
@mtomek
Hi Michal, we've been thinking about your problem and come to the conclusion that the 1-Wire bus may still be overloaded. After all, you have a lot of those temperature sensors there. Please try to increase the task period from 1 s to 1.5 s or disconnect a few sensors. If both errors and peaks disappear, there is a problem with 1-Wire.Best regards,
Jan -
@reitinge Hi,
I have currently 6x 1-wire sensors connected. Each sensor is connected separately to Arduino pins 26 to 31. I increased the task period from 1s to 2s. I did that on September 22nd. Today came a new communication error, see the picture below. The serial line dropped out for a moment. Communication resumed immediately. New fault codes have appeared in the system log.
What could have caused it?
Thanks.
Michal
-
@mtomek Hi Michal,
according to REXduino_slave.ino, the errors mean:49 52 - Error command - wrong pin number
51 49 - Serial bus buffer is full
49 50 - Error command - unknown commandUnfortunately, I can't say remotely what happened. Have this errors been repeated? Has there been an error 52 51 since the last time?
Cheers,
Jan -
@reitinge Hi Jan,
I continuously monitor the system log. None of the errors (49 52, 51 49, 49 50 or 52 51) that I solved last time have come. Errors still occur 52 51. I replaced one of the 1-wire sensors that oscillated the most, so there are fewer errors, about 10 errors a day (see below).
It would not be bad if the system log could list the REXLANG error even with the pin where the errors occur. This would make it easier to find out which sensor has the most errors.
Best regards
Michal
-
@mtomek Hi Michal,
I think you can track the PIN number where error occurs when you configure the system log, as described in the last point of the Troubleshooting section described here: https://github.com/jaroslavs/REXduino/blob/master/REXduino_User_Guide.pdf.Cheers,
Jan -
@reitinge Hi Jan,
it's been a long time since I had communication problems between Raspbery PI and ArduinoiMega - REXduino. See previous communication problems. I did not make any significant changes in SW.In the last 2 days, there have been 2 communication failures:
This indicates an error related to the checksum of the 1-wire measurement as explained to me in the previous answer. This could be explained by ordering some 1-wire measurement.But what I don't understand is that there are a lot of warnings:
What does the warning "REXduino slave warning, code: 1 1" mean please?
Is there a description of all error codes and warnings somewhere?
Thanks a lot.
Michal -
@mtomek Hello gentlemen,
can someone please respond to my last question pleas?
Thanks a lot!
Michal -
@mtomek Hello,
I'm really sorry—I somehow overlooked the fact that you were posting in this old thread. The "Warning 1 1" indicates that the buffer for serial communication between the Master and Slave devices is full:#define WARNING_SERIAL 1 #define WARNING_SERIAL_BUFFER_FULL 1
Have you added any new data communication or changed the communication speed recently? I’d also like to point out that REXduino is a third-party project, and we don’t have direct control over it. I found the explanation for the warning directly in the source code here:
https://github.com/jaroslavs/REXduino/blob/master/REXduino_slave/REXduino_slave.inoCheers,
Jan