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

0<br />

Error<br />

-1: Period invalid (not between 0 and 10) (the default period remains<br />

valid).<br />

6.11 Convert a Signed Integer to an ASCII String itoa<br />

Syntax<br />

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

itoa(i, &dest)<br />

i: Integer to be converted (the value is considered signed).<br />

&dest: Address of the ASCII_ZERO string where the ASCII characters will<br />

be stored.<br />

Converts a signed base 10 integer. The resulting ASCII characters are stored in the string at address &dest. The<br />

strings ends with a ZERO byte.<br />

Return code<br />

If OK<br />

Number of characters in the string not counting the end ZERO byte.<br />

Programming error causing a CPU fault<br />

Access to a prohibited address:<br />

- &dest parameter error,<br />

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

6.12 Convert an Unsigned Integer to an ASCII String itostr<br />

Syntax<br />

itostr(u, &dest, base)<br />

u: Integer to be converted (the value is considered unsigned).<br />

&dest: Address of the string into which the ASCII characters will be loaded.<br />

base: Conversion base.<br />

Converts an unsigned integer in the base specified. The resulting ASCII characters are loaded into the string at<br />

address &dest. The string ends with a ZERO byte.<br />

The base must be between 2 and 36. The default base is 10.

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

Saved successfully!

Ooh no, something went wrong!