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.

General Purpose Functions<br />

6.31 Copy a Character String strcpy<br />

Syntax<br />

strcpy(&dest, &source)<br />

&dest: Destination address.<br />

&source: Source address.<br />

Copies the bytes of the string starting at address &source into &dest.<br />

The copy stops on the first ZERO byte of the source string. A ZERO byte is copied at the end of &dest.<br />

Return code<br />

If OK<br />

Pointer returned to the destination.<br />

Programming error causing a CPU fault<br />

Access to a prohibited address:<br />

- &source parameter error,<br />

- &dest parameter error,<br />

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

6.32 Calculate String Length strlen<br />

Syntax<br />

strlen(&string)<br />

&string: String start address.<br />

Calculates the length of a string (number of bytes before the first ZERO byte).<br />

Return code<br />

If OK<br />

String length.<br />

Programming error causing a CPU fault<br />

Access to a prohibited address:<br />

- &string parameter error,<br />

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

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

6

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

Saved successfully!

Ooh no, something went wrong!