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

Operation Symbol Binding strength<br />

Put in parentheses (expression) Strongest binding<br />

Function call<br />

Exponentiation<br />

Negate<br />

Building of complements<br />

Multiply<br />

Divide<br />

Modulo<br />

Add<br />

Subtract<br />

Function name<br />

(parameter list)<br />

EXPT<br />

-<br />

NOT<br />

*<br />

/<br />

MOD<br />

+<br />

-<br />

Compare ,=<br />

Equal to<br />

Not equal to<br />

Boolean AND<br />

Boolean XOR<br />

=<br />

<br />

AND<br />

XOR<br />

Boolean OR OR Weakest binding<br />

There are the following instructions in ST, arranged in a table together with example:<br />

Instruction type<br />

Assignment<br />

Example<br />

A:=B; CV := CV + 1; C:=SIN(X);<br />

Calling a function block<br />

and<br />

use of the FB output<br />

RETURN<br />

CMD_TMR(IN := %IX5, PT := 300);<br />

A:=CMD_TMR.Q<br />

RETURN;<br />

IF<br />

D:=B*B;<br />

IF D

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

Saved successfully!

Ooh no, something went wrong!