<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to SFC EDGE DETECTION ISSUE</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8dc64c0a77/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8dc64c0a77/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/8dc64c0a77/</id><updated>2020-02-27T14:00:21.560000Z</updated><subtitle>Recent posts to SFC EDGE DETECTION ISSUE</subtitle><entry><title>SFC EDGE DETECTION ISSUE</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8dc64c0a77/?limit=25#0418" rel="alternate"/><published>2020-02-27T14:00:21.560000Z</published><updated>2020-02-27T14:00:21.560000Z</updated><author><name>r.evbatyrov</name><uri>https://forge.codesys.com/u/r-evbatyrov/</uri></author><id>https://forge.codesys.com81aa37fb0508fc1c7b852a1a1d72ce3e5dae19ca</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Sverko,&lt;/p&gt;
&lt;p&gt;your actual design problem is the transition StopPB_ON which appears twice on the diagram and will be evaluated in adjacent cycles, confusing the logic which step should be activated in the next cycle. &lt;/p&gt;
&lt;p&gt;Adding R_TRIG to the transition code causes that the transition code will be evaluated TRUE on rising edge of xStopPB only - that means the transition is evaluated TRUE only once (for the transition element in the lower branch, preparing the Run_Mode step to be active in the next cycle). The second evaluation of the transition (in the next cycle from the the UPPER branch) will produce FALSE, preventing jumping to Stop_Mode. Without trigger the transition StopPB_ON would remain TRUE, causing jump to Stop_Mode.&lt;/p&gt;
&lt;p&gt;Regards&lt;br/&gt;
Roman&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>SFC EDGE DETECTION ISSUE</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8dc64c0a77/?limit=25#b655" rel="alternate"/><published>2020-02-27T14:00:20.661000Z</published><updated>2020-02-27T14:00:20.661000Z</updated><author><name>sverko</name><uri>https://forge.codesys.com/u/sverko/</uri></author><id>https://forge.codesys.com3338a23d34e737babbc63bea1e44ee049445a1db</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;
Hi sverko,&lt;br/&gt;
no, it is not.&lt;br/&gt;
"Calculate active transitions only" is an option to skip the evaluation of unrelated transitions. So, this option has no influence on the chain's logic. The decision whether some transition is considered to be active depends on the state of step before it.&lt;br/&gt;
Regards,&lt;br/&gt;
Roman&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Roman,&lt;/p&gt;
&lt;p&gt;Could you please explain why attached file is working differently with addition of R_TRIG next to edge detection contact (StopPB_ON)?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Sverko &lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://forum.codesys.com//download/file.php?id=2349" rel="nofollow"&gt;Test_11_22_16.project &lt;span&gt;&lt;span&gt;[158.56 KiB]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>SFC EDGE DETECTION ISSUE</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8dc64c0a77/?limit=25#15da" rel="alternate"/><published>2020-02-27T14:00:20.295000Z</published><updated>2020-02-27T14:00:20.295000Z</updated><author><name>r.evbatyrov</name><uri>https://forge.codesys.com/u/r-evbatyrov/</uri></author><id>https://forge.codesys.com23680a529bb7673e3c96a68ce95bc33c505448ca</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi sverko,&lt;/p&gt;
&lt;p&gt;no, it is not.&lt;br/&gt;
"Calculate active transitions only" is an option to skip the evaluation of unrelated transitions. So, this option has no influence on the chain's logic. The decision whether some transition is considered to be active depends on the state of step before it.&lt;br/&gt;
Regards,&lt;br/&gt;
Roman&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>SFC EDGE DETECTION ISSUE</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8dc64c0a77/?limit=25#3e7f" rel="alternate"/><published>2020-02-27T14:00:19.935000Z</published><updated>2020-02-27T14:00:19.935000Z</updated><author><name>sverko</name><uri>https://forge.codesys.com/u/sverko/</uri></author><id>https://forge.codesys.comd568ecac916e56ce22e6e5bc9e9f5d5acb889819</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;
Hi sverko,&lt;br/&gt;
you have race condition in the chart.&lt;br/&gt;
your Run_Mode step will get active state, but just for one cycle - that is why you did not notice that. In this cycle the upper branch is evaluated: the Run_Mode is now active and StopPB_ON is TRUE, causing that Stop_Mode jump (from upper branch) prepares Stop_mode to be active in the next cycle and Run_Mode to be inactive in the next cycle. &lt;br/&gt;
Regards&lt;br/&gt;
Roman&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Roman,&lt;/p&gt;
&lt;p&gt;First of all thank you for taking time to answer my question. I think that by selecting/checking "Calculate active transitions only" should take care of race condition and force StopPB_ON condition under Auto_Mode to be the only active transition. I might be wrong, but I thought that this is the main purpose of this option.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Sverko&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>SFC EDGE DETECTION ISSUE</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8dc64c0a77/?limit=25#6b18" rel="alternate"/><published>2020-02-27T14:00:19.570000Z</published><updated>2020-02-27T14:00:19.570000Z</updated><author><name>r.evbatyrov</name><uri>https://forge.codesys.com/u/r-evbatyrov/</uri></author><id>https://forge.codesys.com7aea9b300b704d6f3976fc97a1d9cf35d541fa23</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi sverko,&lt;/p&gt;
&lt;p&gt;you have race condition in the chart.&lt;br/&gt;
your Run_Mode step will get active state, but just for one cycle - that is why you did not notice that. In this cycle the upper branch is evaluated: the Run_Mode is now active and StopPB_ON is TRUE, causing that Stop_Mode jump (from upper branch) prepares Stop_mode to be active in the next cycle and Run_Mode to be inactive in the next cycle. &lt;br/&gt;
Regards&lt;br/&gt;
Roman&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>SFC EDGE DETECTION ISSUE</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8dc64c0a77/?limit=25#0a5c" rel="alternate"/><published>2020-02-27T14:00:18.546000Z</published><updated>2020-02-27T14:00:18.546000Z</updated><author><name>sverko</name><uri>https://forge.codesys.com/u/sverko/</uri></author><id>https://forge.codesys.comcf8a95343837724e08d9840814616b0cfbe73f42</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I'm running very simple test program and I'm having some issues with order execution. Please see following images for better understanding. I was able to get this to work by adding rising edge block to StopPB_ON transition, but I think that it should work with out it as well. Hopefully someone can explain why it does not.&lt;/p&gt;
&lt;p&gt;Thank You&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Auto Mode.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=2336"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Stope Mode.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=2337"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Stope Mode 02.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=2338"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: SFC Settings.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=2339"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>