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.

Programming error causing a CPU fault<br />

Access to a prohibited address:<br />

- *symbol parameter error,<br />

- *symbol_addr error,<br />

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

Importing an Object IMPORT<br />

Syntax<br />

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

SINT32 IMPORT(SINT8 *symbol, void **symbol_addr)<br />

symbol: Character string.<br />

symbol_addr: Pointer to symbol pointer.<br />

This <strong>function</strong> allows use of an object defined in another module. To be imported, an object must first be exported by<br />

another object.<br />

Report:<br />

- 0 = OK<br />

- -1 = call outside the initialisation task or too many import symbols.<br />

Example<br />

void(*import_<strong>function</strong>)();<br />

main()<br />

{<br />

IMPORT(«LABEL», &import_<strong>function</strong>);<br />

}<br />

void test()<br />

{<br />

import_<strong>function</strong>();<br />

<strong>function</strong> body<br />

}<br />

Programming error causing a CPU fault<br />

Access to a prohibited address:<br />

- *symbol parameter error,<br />

- **symbol_addr error,<br />

- end of symbol string outside the authorised area.

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

Saved successfully!

Ooh no, something went wrong!