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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Return code<br />

If OK<br />

Not significant<br />

Error<br />

-1: n negative<br />

Programming error causing a CPU fault<br />

Access to a prohibited address:<br />

- &source parameter error,<br />

- &dest parameter error,<br />

- &source+n outside authorised area,<br />

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

6.6 Read the Parameters Stored on the Stack cpyarg<br />

Syntax<br />

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

cpyarg(&dest, n)<br />

&dest: Address of the memory block where the system copies the<br />

arguments.<br />

n: Number of arguments to be copied (maximum 6).<br />

Copies n arguments from the stack into local memory starting at address &dest, when the module is called by sp().<br />

Operation<br />

Each argument occupies 32 bits.<br />

Function cpyarg() must be called at the beginning of the %SP module before the stack is modified, such as would occur<br />

by a call to an internal label of the module (call()).<br />

If the number of arguments n specified is greater than the number of arguments m passed during the call, the system<br />

does not generate an error but obviously only the first m arguments are significant.<br />

Return code<br />

If OK<br />

Not significant.<br />

Error<br />

-1: n negative, zero or greater than maximum number authorised<br />

Programming error causing a CPU fault<br />

Access to a prohibited address:<br />

- &dest parameter error,<br />

- &dest+n outside authorised area.

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

Saved successfully!

Ooh no, something went wrong!