24.01.2015 Views

PLC Programming

  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

What is What in CoDeSys<br />

Syntax:<br />

IF THEN<br />

<br />

{ELSIF THEN<br />

<br />

.<br />

.<br />

ELSIF THEN<br />

<br />

ELSE<br />

}<br />

END_IF;<br />

The part in braces {} is optional.<br />

If the returns TRUE, then only the are executed and none<br />

of the other instructions.<br />

Otherwise the Boolean expressions, beginning with , are evaluated one after<br />

the other until one of the expressions returns TRUE. Then only those instructions after this Boolean<br />

expression and before the next ELSE or ELSIF are evaluated.<br />

If none of the Boolean expressions produce TRUE, then only the are evaluated.<br />

Example:<br />

IF temp

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!