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 />

Modifiers and operators in IL<br />

In the IL language the following operators and modifiers can be used.<br />

Modifiers:<br />

• C with JMP, CAL, RET: The instruction is only then executed if the result of the<br />

preceding expression is TRUE.<br />

• N with JMPC, CALC, RETC: The instruction is only then executed if the result of the<br />

preceding expression is FALSE.<br />

• N otherwise: Negation of the operand (not of the accumulator)<br />

Below you find a table of all operators in IL with their possible modifiers and the relevant meaning:<br />

Operator Modifiers Meaning<br />

LD N Make current result equal to the operand<br />

ST N Save current result at the position of the operand<br />

S<br />

R<br />

Then put the Boolean operand exactly at TRUE if the current result is TRUE<br />

Then put the Boolean operand exactly at FALSE if the current result is TRUE<br />

AND N,( Bitwise AND<br />

OR N,( Bitwise OR<br />

XOR N,( Bitwise exclusive OR<br />

ADD ( Addition<br />

SUB ( Subtraction<br />

MUL ( Multiplication<br />

DIV ( Division<br />

GT ( ><br />

GE ( >=<br />

EQ ( =<br />

NE ( <br />

LE (

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

Saved successfully!

Ooh no, something went wrong!