How do i set watchdog in codesys?

kidi3

Member
Join Date
Nov 2016
Location
Denmark
Posts
7
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:

Code:
runtime error #16 (watchdog expired Task = default task)
And then a error message which it terminates with is:

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?
 
Thanks for the reponse :)

Mine looks like this

Image

I can see the except_watchdog radio buttom, but i cannot press it. nothing happens to it.

The task is running constantly.. It just act as server that reads some coils and set some output pins based on the coil register values.
The coils values are being set by the modbus client in this case the python code.

--Edit--

I seem to be able to press the radio buttom now. Adding that radio buttom give me an error message:

Error 3569: POU for system event excpt_watchdog not defined
 
Last edited:
The python code act as modbus TCP client, and sets the coils which the server (PLC) reads from. Clicking on system events, shows the same screen as yours. But when i tick the "excpt_watchdog", and tries to compile the program I get an error message:

Error 3569: POU for system event excpt_watchdog not defined
 
You get the message because when you check mark the "watchdog" under events, you need to write a POU for that event.
Leave it as ii was originally (no check mark).
Not sure what the setup is but this is not your rproblem (the event "watchdog".
Can you run your program in a single step mode?
In Single step, the watchdog error , even if it exists will be set inactive.
 
If you go online you have the option to run the actual program continiously or have breaks and even do a single step where you actually drive the program/scan.
Look under "Online" menu, it shoud be there.
 
Since you are using a Master/Slave, I'd look into that setup in order to figure out how/if the watchdog is setup.Open any configuration screens related to your network setup and look for it.
The dropbox location does not contain anything with the extension ".pro".
That's what I use to open the wago/codesys software I have.
I assume you use an ABB PLC?
 
You mean single cycle?



Nothing happens when i press it.

yes.. I am using ABB PLC..

It does have a modbusTCP server setup screen..

 
Last edited:

Similar Topics

Omron AD081-V1 Analog Input Card Offset & Gain Adjustment Entering Adjustment Mode 1. Set the input card in adjustment mode (Turn ON Dip SW No-1)...
Replies
0
Views
49
I was loading a program onto an XE1e2 PLC and it got stuck on these two windows and won't progress. It won't let me connect from the PC to reload...
Replies
0
Views
61
Hi all, i have recieved some 4RF Aprisa SR+ ethernet radios from a customer to configure. Issue is that they are used and have non-default...
Replies
0
Views
63
I want to set user security level based on the value of a tag in my PLC called "ActiveUser". That tag will contain the A-P code which we use for...
Replies
6
Views
203
I've posted this on the ptc forum as well, but no luck with an answer (waiting for my service contract number) I keep getting the following error...
Replies
2
Views
106
Back
Top Bottom