SpaceRodent
SpaceRodent

Reputation: 55

Twincat 3: Modbus error 4 "ads mailbox full" turns on immediately in previously working project

I recently had a frustrating problem: Modbus-connection throws in bError 4 as soon as bExecute is turned on. No variables could be read, and error persisted until reboot. Previously working project stopped working over the weekend.

I might have fiddled around inside PLC, uninstalling couple libraries mainly, but logically thinking nothing should be wrong and I didnt do much at all. Its still possible I done goofed on friday, and didnt notice until after weekend.

On to the troubleshooting:


"Thats all a mere mortal can do." I thought, and shot off a mail to Beckhoff.

Upvotes: 1

Views: 1227

Answers (2)

Marcin Wiśniewski
Marcin Wiśniewski

Reputation: 11

I just reached out the same problem on CX8180. In my case there was some program uploaded before mine. I've activate my configuration and run PLC - get bError 4. TwinCAT errors code list says that is something with ADS mailbox and too much ADS calls. My program works fine on the same hardware elsewhere. Restart origin and activate configuration doesn't work.

I need to login with CeRHost and make a reboot of PLC. After that move communication works like a charm. The problem was the previous modbus communication.

Upvotes: 1

SpaceRodent
SpaceRodent

Reputation: 55

Lets shoot off a mail to Beckhoff support. Troubleshooting ensues:

  • Strip down the program even further, so only FB_MBReadInputs stays and bExecute can be flipped on or off manually.
    • Running only MBReadInputs, only MBWriteCoils, both at the same time
    • bError 4 problem persists no matter how much is stripped or ran.
  • Running the same project Locally on PC works just fine. Inputs can be read and output bits can be written.

In the end, flashing new image ended up being the solution. Still in process of fiddling that out, so the actual problem isnt yet solved.

Update: Stuff works as it should. Some cosmic ray must have hit SD-card just right so during the weekend things got awry and problems surfaced.

Beckhoff image repo in my case: https://download.beckhoff.com/download/software/embPC-Control/CX90xx/CX9020/CE/TC3


Thats it, in the end wiping out SD-card is pretty basic thing to do when facing larger problems, but I just wanted to go through all the troubleshooting steps and end results for anyone struggling with Modbus and Twincat as much as I have.

Upvotes: 1

Related Questions