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.

6.25 Set One or More Long Words setl<br />

Syntax<br />

6 - 22 en-938846/7<br />

setl(&dest, l, n)<br />

&dest: Destination address.<br />

l: Value of the long word to be set.<br />

n: Number of long words to be set.<br />

Sets n long words to the value l starting at address &dest.<br />

Return code<br />

If OK<br />

Not significant.<br />

Error<br />

-1: n negative or zero<br />

Programming error causing a CPU fault<br />

Access to a prohibited address:<br />

- &dest parameter error,<br />

- &dest+n outside authorised area.<br />

6.26 Call %SP Modules<br />

6.26.1 Call an %SP Module sp<br />

Syntax<br />

sp(moduleno{, argn}6 ...)<br />

moduleno: Number of the %SP module to be called.<br />

argn: Optional argument.<br />

Calls an %SP module (%SP0, ..., %SP255) and passes it any arguments via the stack.<br />

Operation<br />

The module number must be between 0 (call to %SP0) and 255 (call to %SP255).<br />

The arguments are extended to 32 bits and placed on the stack. The call is then made.<br />

The total number of arguments (including moduleno) must not exceed NBM_PARAM (set to 7).<br />

A call to <strong>function</strong> cpyarg() at the start of the called module allows the arguments passed via the stack to be recovered.

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

Saved successfully!

Ooh no, something went wrong!