24.01.2015 Views

PLC Programming

  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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!