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:
And then a error message which it terminates with is:
The only code I am running on the PLC is basically
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?
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:
Code:
runtime error #16 (watchdog expired Task = default task)
Code:
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
Code:
(*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?