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.

IEC Operators and additional norm extending functions<br />

Example in ST:<br />

VAR1 := 60 >= 40;<br />

Example in FBD:<br />

EQ<br />

Equal to<br />

A Boolean operator that returns the value TRUE when the operands are equal. The operands can be<br />

BOOL, BYTE, WORD, DWORD, SINT, USINT, INT, UINT, DINT, UDINT, REAL, LREAL, TIME,<br />

DATE, TIME_OF_DAY, DATE_AND_TIME and STRING.<br />

Example in IL:<br />

LD 40<br />

EQ 40<br />

ST Var 1 (* Result is TRUE *)<br />

Example in ST:<br />

VAR1 := 40 = 40;<br />

Example in FBD:<br />

NE<br />

Not equal to<br />

A Boolean operator that returns that value TRUE when the operands are not equal. The operands can<br />

be BOOL, BYTE, WORD, DWORD, SINT, USINT, INT, UINT, DINT, UDINT, REAL, LREAL, TIME,<br />

DATE, TIME_OF_DAY, DATE_AND_TIME and STRING.<br />

Example in IL:<br />

LD 40<br />

NE 40<br />

ST Var 1 (* Result is FALSE *)<br />

Example in ST:<br />

VAR1 := 40 40;<br />

Example in FBD:<br />

10.6 Address Operators...<br />

ADR<br />

Address Function not prescribed by the standard IEC61131-3.<br />

CoDeSys V2.3 10-13

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

Saved successfully!

Ooh no, something went wrong!