AC800M + COM3 + Modbuse
We connected AC800M PM856 to Simatic S7-200 by means of COM3 port of AC800M, Modbus protocol and MBConnect / MBRead function blocks.
It is working fine until disconnect the connecting line (hardware connection). When reconnect the COM3, LED Rx/Tx on CPU start flashing but MBConnect report -4929 timeout and no reading is possible from the slave.
When proceed cold restart of CPU, the communication is running again.
It seems the COM3 or MBConnect are closed/disabled and need to be re-open. En_C of MBConnect is connected to TRUE (always), when Req for MBRead is connected to Valid and not NDR of MBConnect (read only after the connection is valid and Read finish)
Could you please advise how to re-open / init the COM3 without to restart the controller. I tried with off/on En_C of MBConnect (On-line) but it doesn't work.
Voted best answer
Solution was to set Poll Time = 0 in hardware configuration, settings for Modbus. This cancel waiting of FC8 respond from the slave, which is not supported by all vendors, and gives valid status of MBConnect immediatelly.
In case you need to supervise status of connection, you can use ERR output of MBRead or MBWrite blocks.
First of all I would recommend you to not make a request unless you have VALID and not ERR. The Valid output isn't really worth that much as an indicator.
As a second step I would try to see if the communication can restart if you toggle the En_C and at the same time disable the requests.
If this doesn't help, I would use line scanner to see if the PM856 still sends correct poll messages. The problem is not necessary in the ABB end of the rope.
Are you sure its really the AC800M thats the problem ?
After reconnecting the line, If the serial comms LED flashes at the configured poll interval, then the AC800M is transmitting and the S7 is not answering.If there is a lot of random flashing, then probably both PLC's think that the link is active and are talking in some fashion.
Try putting a serial port monitor on to the link to see what is actually going on. Also, check your port timeout settings just in case something changes during a restart / normal operation ?