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 />

Number of characters written in &dest not counting the terminal ZERO byte.<br />

Error<br />

-1: Format string containing invalid formats.<br />

Programming error causing a CPU fault<br />

Access to a prohibited address:<br />

- &dest parameter error,<br />

- &format parameter error,<br />

- end of string outside authorised area.<br />

General Purpose Functions<br />

6.28 Integer Square Root sqrt<br />

Syntax<br />

sqrt(n)<br />

n: Positive integer.<br />

Returns the integer square root of n.<br />

The calculation time is less than 60 microseconds.<br />

Return code<br />

If OK<br />

Positive integer closest to the square root of n.<br />

6.29 Analyse an ASCII String sscanf<br />

Syntax<br />

sscanf(&sourcestring, &formatstring, {, &argn}5)<br />

&sourcestring: Source string address.<br />

&formatstring: Format string address.<br />

&argn: Address of the variables to be loaded.<br />

Analyses an ASCII string (ending with a ZERO byte) at address &sourcestring and sets the parameters according to<br />

the format string conversion specifications.<br />

Function sscanf() supports the ANSI standard C <strong>language</strong> conversion specifications for C <strong>language</strong> conversion to<br />

ANSI standard.<br />

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

6

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

Saved successfully!

Ooh no, something went wrong!