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.

Numeric Operators...<br />

Example in FBD:<br />

COS<br />

Returns the cosine of number. The value is calculated in arch minutes.<br />

IN can be type BYTE, WORD, DWORD, INT, DINT, REAL, SINT, USINT, UINT, UDINT, OUT must be<br />

type Typ REAL.<br />

Example in IL:<br />

LD 0.5<br />

COS<br />

ST q (*Result is 0.877583 *)<br />

Example in ST:<br />

q:=COS(0.5);<br />

Example in FBD:<br />

TAN<br />

Returns the tangent of a number. The value is calculated in arch minutes. IN can be type BYTE,<br />

WORD, DWORD, INT, DINT, REAL, SINT, USINT, UINT, UDINT, OUT must be type REAL.<br />

Example in IL:<br />

LD 0.5<br />

TAN<br />

ST q (*Result is 0.546302 *)<br />

Example in ST:<br />

q:=TAN(0.5);<br />

Example in FBD:<br />

ASIN<br />

Returns the arc sine (inverse function of sine) of a number. .<br />

IN can be type BYTE, WORD, DWORD, INT, DINT, REAL, SINT, USINT, UINT, UDINT, OUT must be<br />

type REAL.<br />

Example in IL:<br />

LD 0.5<br />

ASIN<br />

ST q (*Result is 0.523599 *)<br />

Example in ST:<br />

q:=ASIN(0.5);<br />

10-22 CoDeSys V2.3

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

Saved successfully!

Ooh no, something went wrong!