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.

Operation<br />

Each argument &argn must be the address of a variable %M, %V, %Q or %W.<br />

For specification of the conversion format, refer to <strong>function</strong> printf() (see Sec. 8.2.5).<br />

Return code<br />

If OK<br />

Number of parameters effectively loaded.<br />

Error<br />

0: Unsuccessful analysis of the source string, format string containing<br />

invalid formats.<br />

Programming error causing a CPU fault<br />

Access to a prohibited address:<br />

- &sourcestring parameter error,<br />

- &formatstring parameter error,<br />

- &argn parameter error for %d, %E, %C, %f, %G, %g, %i, %n, %o, %P, %u, %X or %x,<br />

- &argn parameter error for %s,<br />

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

6.30 Compare Two Character Strings strcmp<br />

Syntax<br />

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

strcmp(&string1, &string2)<br />

&string1: String 1 address.<br />

&string2: String 2 address.<br />

Compares two strings ending with a ZERO byte.<br />

Return code<br />

If OK<br />

n == 0 String 1 == string 2.<br />

n > 0 String 1 > string 2 (byte i of string 1 > byte i of string 2).<br />

n < 0 String 1 < string 2 (byte i of string 1 < byte i of string 2).<br />

Programming error causing a CPU fault<br />

Access to a prohibited address:<br />

- %string1 parameter error,<br />

- %string2 parameter error,<br />

- end of string outside authorised area.

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

Saved successfully!

Ooh no, something went wrong!