<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to How Could I Desactivated The Watchdog ?</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/c7f653395d/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/c7f653395d/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/c7f653395d/</id><updated>2020-02-27T21:44:42.717000Z</updated><subtitle>Recent posts to How Could I Desactivated The Watchdog ?</subtitle><entry><title>How Could I Desactivated The Watchdog ?</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/c7f653395d/?limit=25#5e3f" rel="alternate"/><published>2020-02-27T21:44:42.717000Z</published><updated>2020-02-27T21:44:42.717000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.comd91ca8cadaddf00a63ec2f016ff55896025f2782</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;The warning is correct, and you should change your program according.&lt;/p&gt;
&lt;p&gt;You have an endless loop in the while structure, if button is pressed the loop is active (doing nothing) but any other program is not being processed at all.&lt;/p&gt;
&lt;p&gt;You do not have to worry what the processor should be doing, only program what it should change.&lt;/p&gt;
&lt;p&gt;IF button THEN (&lt;em&gt; I press Down the Button&lt;/em&gt;)&lt;br/&gt;
WHILE button Do ; (&lt;em&gt; While I pressing Down The Button do not do Anything&lt;/em&gt;) END_WHILE&lt;br/&gt;
light:= TRUE; (&lt;em&gt;If I have left press Dow the button Turn on the Light&lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;In real you want the light true when button is released.&lt;br/&gt;
This is done with function R_TRIG in util.lib &lt;br/&gt;
also in oscat.lib available&lt;br/&gt;
And you can write your own.&lt;/p&gt;
&lt;p&gt;if (button=false and flag=true) then light:=true; end_if;&lt;br/&gt;
if button then flag:=true else flag:=false; end_if;&lt;/p&gt;
&lt;p&gt;take warnings serious as it will be your fault, you are a beginner the program knows it better &lt;br/&gt;
The only thing you will need a PLC is when timing gets critical or you have a big program, the simulation time is slower as the real PLC.&lt;br/&gt;
In the PLC the program is compiled and in the simulation it is interpreted.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How Could I Desactivated The Watchdog ?</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/c7f653395d/?limit=25#b12a" rel="alternate"/><published>2020-02-27T21:44:41.225000Z</published><updated>2020-02-27T21:44:41.225000Z</updated><author><name>jagomez340</name><uri>https://forge.codesys.com/u/jagomez340/</uri></author><id>https://forge.codesys.comd808eb0b5553959a1c2ea567bb758c9f988ce63a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I DO NOT have a PLC at this Right Moment But While It comes I have Simulated lots of things but there is one of these as far it has been very Hard because of the Watchdog. &lt;span style="color: #00FF00;"&gt;the exercise is so Easy&lt;/span&gt;, When I press down a Button , then = do not do anything ,but,  If I leave press down the button, Then = Turn on a Light, Here is the Code :&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #0000BF;"&gt;IF&lt;/span&gt; button &lt;span style="color: #0000FF;"&gt;THEN&lt;/span&gt; (&lt;em&gt; I press Down the Button&lt;/em&gt;)&lt;br/&gt;
 &lt;span style="color: #0000FF;"&gt;  WHILE&lt;/span&gt; button &lt;span style="color: #0000FF;"&gt;Do&lt;/span&gt;              ; &lt;span style="color: #008000;"&gt;(&lt;em&gt; While I pressing Down The Button do not do Anything&lt;/em&gt;)&lt;/span&gt; &lt;span style="color: #0000FF;"&gt;END_WHILE&lt;/span&gt; &lt;br/&gt;
  light:= TRUE; (&lt;em&gt;If  I have left  press Dow the button Turn on the Light&lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #0000FF;"&gt;END_IF&lt;/span&gt;&lt;br/&gt;
WHEN I SIMULATED IT THERE IS AN ERROR&lt;br/&gt;
IT SAYS :=   &lt;span style="color: #408000;"&gt; ERROR : WATCHDOG COMPUTING OF PROCESSOR CYCLE TAKE TOO LONG. ENDLESS LOOP ASSUMED!&lt;/span&gt;&lt;br/&gt;
I HAVE READ AT THE MANUAL BUT IT SAYS THAT I HAVE TO DESACTIVATE A &lt;span style="color: #408080;"&gt;bEnable&lt;/span&gt; of the &lt;span style="color: #408000;"&gt;SysWdgEnable &lt;/span&gt;Function From &lt;span style="color: #408000;"&gt; The Library SysLibPlcCtrl.lib&lt;/span&gt;SysWdgEnable&lt;br/&gt;
This function (see library SysLibPlcCtrl.lib) of type BOOL can be used to activate resp. deactivate the watchdog for a specified task. It will return TRUE in case of success, otherwise FALSE. &lt;/p&gt;
&lt;p&gt;Variable&lt;br/&gt;
 Data type&lt;br/&gt;
 Description&lt;/p&gt;
&lt;p&gt;bEnable&lt;br/&gt;
 BOOL&lt;br/&gt;
 if TRUE: The watchdog functionality gets activated &lt;br/&gt;
if FALSE: The watchdog functionality gets deactivated&lt;/p&gt;
&lt;p&gt;byIECTaskIndex&lt;br/&gt;
 BYTE&lt;br/&gt;
 Index of the IEC task, for which the watchdog should be activated/deactivated&lt;/p&gt;
&lt;p&gt;stIECTaskName&lt;br/&gt;
 POINTER TO STRING&lt;br/&gt;
 Name of the IEC task, can be a pointer to zero &lt;/p&gt;
&lt;p&gt;Codesys Do not have that Library&lt;/p&gt;
&lt;p&gt;So I add a FESTO CPX-CEC-C1 LIBRARY (SysLibPlcCtrl.lib) BUT WHEN I WANT TO CALL IT WITH AN INTANCE IT DOESN´T FUNCTION.&lt;br/&gt;
IT SAYS: &lt;span style="color: #BF0000;"&gt;ERROR3740&lt;/span&gt; &lt;span style="color: #008000;"&gt;: Unkwonw Type 'SysWdgEnablé'&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;Could You help me How could I Desactived the Watchdog PLeasE? &lt;br/&gt;
I hope Your Answer !.&lt;br/&gt;
The Lord God almighty Bless your Life In Jesús name !  Amén.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>