I've currently set my PLC as a modbus slave, and written some python code which connect to it and act as a modbus client.

I am having some problems with the modbus server sometime terminating the PLC, when the python code request/send information to the slave.

It terminates by showing a popup window saying:

runtime error #16 (watchdog expired Task = default task)

And then a error message which it terminates with is:

IEC Task 0 ' cycle time is greater than the set watchdog timer; or cycle time exceeded, but shorter than watchdog timers

The only code I am running on the PLC is basically

(*Bit0 := TRUE;*)
(*Bit1 := TRUE;*)
(*Bit2 := TRUE;*)

DO1 := Bit0; (* Start/Stop *)
DO2 := Bit1; (* Direction [False - Reverse ; True - Forward] *)
DO3 := Bit2; (* Speed [Fast = 11; Medium = 10; Slow = 01 ; Stop = 00] *)
DO4 := Bit3; (* Speed [Fast = 11; Medium = 10; Slow = 01 ; Stop = 00] *)

and thats it. Bitx are coil address's and DOx are digital outputs on the PLC.

I guess, based on the error message it has something to do with the watchdog. I haven't manually changed anything with the watchdog, or even set it?.. How do I in codesys configure it?

Should I maybe adjust some of these values?

enter image description here

  • \$\begingroup\$ Please use proper punctuation\capitalization, it makes you look educated. \$\endgroup\$ – Voltage Spike Nov 16 '16 at 21:21
  • \$\begingroup\$ .... Better?... Is anything unclear? \$\endgroup\$ – Carlton Banks Nov 16 '16 at 21:41
  • \$\begingroup\$ Which PLC are you using? \$\endgroup\$ – Ben Miller - Remember Monica Nov 16 '16 at 22:14
  • \$\begingroup\$ PLC using is a ABB PM554 \$\endgroup\$ – Carlton Banks Nov 16 '16 at 22:15
  • \$\begingroup\$ Have you tried increasing the "Task timeout" value? \$\endgroup\$ – Ben Miller - Remember Monica Nov 16 '16 at 22:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.