15.07.2013 Views

Automatic control function programming manual ladder language

Automatic control function programming manual ladder language

Automatic control function programming manual ladder language

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Sequence 3 - Increment idex %V100.B and repeat loop if %V100.B < 16<br />

5.3 Function Calls<br />

Ladder <strong>language</strong> allows <strong>function</strong> calls.<br />

The syntax is as follows:<br />

[ ] ( []<br />

{,}6)<br />

The numerical assignment to the left of the <strong>function</strong> name is optional. It is used to recover the code returned by the<br />

<strong>function</strong> when the programmer wishes.<br />

Examples of Function Calls:<br />

%M100.L = atoi(%M20.l) // %M100.L receives the conversion result<br />

bit(%M20.&, M30.&, 8); // the return code is lost<br />

cpyb(%V100.&, %V100.& + %M10.B, %V110.W + 10) // the return code is lost<br />

5.4 Parameter Check<br />

The number of parameters passed is checked during compilation.<br />

The values of the parameters passed can not be checked during compilation. The monitor checks them when calling<br />

the <strong>function</strong>, before executing it, only in the debugging mode.<br />

5 - 26 en-938846/3

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

Saved successfully!

Ooh no, something went wrong!