<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to If Then Else  and Case in FBD</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/db36cbc3ff/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/db36cbc3ff/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/db36cbc3ff/</id><updated>2020-02-27T22:44:34.404000Z</updated><subtitle>Recent posts to If Then Else  and Case in FBD</subtitle><entry><title>If Then Else  and Case in FBD</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/db36cbc3ff/?limit=25#a040" rel="alternate"/><published>2020-02-27T22:44:34.404000Z</published><updated>2020-02-27T22:44:34.404000Z</updated><author><name>sgronchi</name><uri>https://forge.codesys.com/u/sgronchi/</uri></author><id>https://forge.codesys.com2bb92445927bfcde4755075b3032ac64141ab551</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;For IF-THEN-ELSE:&lt;br/&gt;
SEL is an idiomatic way, if (and only if) the two branches do not have side effects.&lt;br/&gt;
An ugly way is using a chain of boxes each with EN/ENO.&lt;br/&gt;
But please, even if you can write a FOR loop in Ladder, it does not mean it is a good idea. If you are unable to avoid side effects in branches, it is better to stay in ST: the resulting code will be more clear to others (including your future self).&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>If Then Else  and Case in FBD</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/db36cbc3ff/?limit=25#0745" rel="alternate"/><published>2020-02-27T22:44:29.890000Z</published><updated>2020-02-27T22:44:29.890000Z</updated><author><name>JayDeeTech</name><uri>https://forge.codesys.com/u/jaydeetech/</uri></author><id>https://forge.codesys.com230a6800bcb165c537a9539fb82e0a31c9cc86e0</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
First steps in codesys...&lt;br/&gt;
Is there an equivalent to IF-Then-Else or Case in the FBD language?  It seems to exist in the ST and I naively assume the you could do in FBD the same as in ST. &lt;br/&gt;
thanks, J.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>