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.

Return code<br />

If OK<br />

If > 0: The positive direction (increasing numbers) is the shortest. Indicates<br />

the number of steps.<br />

If < 0: The negative direction (decreasing numbers) is the shortest. The<br />

absolute value indicates the number of steps.<br />

If = 0: No movement is required because the carousel is already in the<br />

destination position.<br />

If = n: Outside carousel.<br />

6.16 Search for the Value of a Byte rchb<br />

Syntax<br />

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

rchb(&source, b, step, n)<br />

&source: Search start address.<br />

b: Value of the byte to be searched for.<br />

step: Value of the search step in bytes.<br />

n: Maximum number of search steps.<br />

Search, with a step, for the first occurrence of byte b starting from address &source.<br />

The step can be positive or negative.<br />

Positive step: The search is made by increasing addresses.<br />

Negative step: The search is made by decreasing addresses.<br />

Return code<br />

Value found<br />

Positive number equal to the number of steps made to the first occurrence.<br />

Positive step: Return code = (occurrence address - &source)/step<br />

Negative step: Return code = (&source - occurrence address)/(-step)<br />

Value not found<br />

-1: Value not found<br />

Programming error causing a CPU fault<br />

Access to a prohibited address:<br />

- &source parameter error,<br />

- &source+step*n outside authorised area.

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

Saved successfully!

Ooh no, something went wrong!