Autor Thema: Modbus/RTU with EC4P: CPU crash  (Gelesen 12535 mal)

Offline pillo

  • Newbie
  • *
  • Beiträge: 1
Modbus/RTU with EC4P: CPU crash
« am: September 08, 2011, 19:46:51 Nachmittag »
Hello everyone!
I have been using the EC4P-specific MODBUS RTU library for my home heating control. I have to periodically read from a heat pump the registers (35) and coils (150). For this I have a state machine controlling the inputs to the ModbusMaster library block.

The FB is able to read valid values from the heat pump with no apparent problems, even at high speeds. However, when I enable the communication in my project, the CPU crashes at apparently random times. Sometimes I get both RED LEDs and the CPU restarts, sometimes i get a single blinking yellow LED with no display.
 
Things I have tried:
- changing the serial line speed down to 9600
- reducing the request size to 2 data bytes per request
- adding several seconds delay between transactions
- lowering xStrobe after 1 cycle, or when "busy" goes high, or after "busy" gets low again
The only thing I seem to have understood is that the more requests I do, the quicker it happens. But at, say, 2Hz, it takes from 20 seconds up to a few hours for the glitch to happen.

Did anyone find a similar problem? Do you have any idea on what could be the cause of this?
How would I go on debugging such an issue?

Any advice is appreciated!
Thanks a lot in advance,
Luca

ScottLilith

  • Gast
Re:Modbus/RTU with EC4P: CPU crash
« Antwort #1 am: September 17, 2011, 20:45:06 Nachmittag »
Hi Pillo, I'd suggest to increase the 'max. cycle time' from its default value t#20ms to sth. roundabout 100ms in your project configuration. This might eventually help.
Rgs Scott
« Letzte Änderung: September 17, 2011, 21:15:39 Nachmittag von ScottLilith »