<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Warning on apparently simple code (from codesys manual V2.3)</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4f4f3d3ebb/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4f4f3d3ebb/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/4f4f3d3ebb/</id><updated>2020-02-27T14:00:35.867000Z</updated><subtitle>Recent posts to Warning on apparently simple code (from codesys manual V2.3)</subtitle><entry><title>Warning on apparently simple code (from codesys manual V2.3)</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4f4f3d3ebb/?limit=25#b836" rel="alternate"/><published>2020-02-27T14:00:35.867000Z</published><updated>2020-02-27T14:00:35.867000Z</updated><author><name>fsahmed83</name><uri>https://forge.codesys.com/u/fsahmed83/</uri></author><id>https://forge.codesys.com88cf9fdf1bd5774029724c0cb7cd91643cf86b74</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;r.evbatyrov hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
Hello fsahmed83,&lt;br/&gt;
the IL in V3 is network-based, whereas it was text-based in V2.3, causing some conceptual incompatibilities. For example, in V3 you can place a label only at the beginning of a network (not everywhere between two lines). Hovewer, the content of the accumulator get lost between two networks. So, you cannot just copy the code of 2.3-IL and use it in V3-IL. &lt;br/&gt;
What you're missing.&lt;br/&gt;
1. V3-IL is a no more supported outdated feature that is not recommended to use for new development. So, avoid using IL.&lt;br/&gt;
2. Your ZAP is probably an instance of TP. There is no initialization of PT parameter before call, so it doesnot respect it. To realize, which logic correspond to your IL-code, convert the network to FBD (FBD-&amp;gt;View-&amp;gt;As FBD). The diagram shows clearly, that PT is not assigned.&lt;br/&gt;
3. Syntax checker expects, that the JMPC xxxxxx is the last code line in the network, causing that warning.&lt;br/&gt;
Regards,&lt;br/&gt;
Roman&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks both of you. Rewrote it in ST and it works now.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Warning on apparently simple code (from codesys manual V2.3)</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4f4f3d3ebb/?limit=25#3ce4" rel="alternate"/><published>2020-02-27T14:00:34.975000Z</published><updated>2020-02-27T14:00:34.975000Z</updated><author><name>r.evbatyrov</name><uri>https://forge.codesys.com/u/r-evbatyrov/</uri></author><id>https://forge.codesys.com5c47621ea8a69ccc9ca3fe871b88d75065a84fe6</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello fsahmed83,&lt;/p&gt;
&lt;p&gt;the IL in V3 is network-based, whereas it was text-based in V2.3, causing some conceptual incompatibilities. For example, in V3 you can place a label only at the beginning of a network (not everywhere between two lines). Hovewer, the content of the accumulator get lost between two networks. So, you cannot just copy the code of 2.3-IL and use it in V3-IL. &lt;/p&gt;
&lt;p&gt;What you're missing.&lt;br/&gt;
1. V3-IL is a no more supported outdated feature that is not recommended to use for new development. So, avoid using IL.&lt;br/&gt;
2. Your ZAP is probably an instance of TP. There is no initialization of PT parameter before call, so it doesnot respect it. To realize, which logic correspond to your IL-code, convert the network to FBD (FBD-&amp;gt;View-&amp;gt;As FBD). The diagram shows clearly, that PT is not assigned.&lt;br/&gt;
3. Syntax checker expects, that the JMPC xxxxxx is the last code line in the network, causing that warning.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br/&gt;
Roman&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Warning on apparently simple code (from codesys manual V2.3)</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4f4f3d3ebb/?limit=25#88e4" rel="alternate"/><published>2020-02-27T14:00:34.687000Z</published><updated>2020-02-27T14:00:34.687000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com832e66f7b5c19aa9e652e60f78b07912fca0a962</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; scott_cunningham&lt;/p&gt;
&lt;p&gt;If ZAB is a timer TON type of FB, then ZAB.Q will be False until the time expires. Then your code would not jump to MARK and would always be resetting and starting the timer over.  What is ZAB?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Warning on apparently simple code (from codesys manual V2.3)</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4f4f3d3ebb/?limit=25#426f" rel="alternate"/><published>2020-02-27T14:00:34.423000Z</published><updated>2020-02-27T14:00:34.423000Z</updated><author><name>fsahmed83</name><uri>https://forge.codesys.com/u/fsahmed83/</uri></author><id>https://forge.codesys.com398db0403c2a91e33685cad4392e7039ac194493</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Just started Codesys. Tried to implement a simplified version of the traffic signal example included in the V2.3 manual (controlling only one set of lights). Two problems :&lt;br/&gt;
1. The TP timer doesn't seem to respect the PT value. Same value for all lights and it randomly lengthens or shortens the period. &lt;br/&gt;
2. Warning after JMPC instruction : Part of the statements have no effect. (Code in the attached screenshot). &lt;/p&gt;
&lt;p&gt;What am I missing?&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Warning_Codesys.jpg" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=2511"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>