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.

Functions<br />

IMPORT() is used to process an external object in a module.<br />

EXPORT() is used to make an object available to other modules for use.<br />

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

! CAUTION<br />

An object cannot be imported until it has been exported by its owner module.<br />

The user defines the imported and exported objects in the main() <strong>function</strong> of his modules.<br />

When the translator is called, the monitor updates a table of exports and a table of imports. These two tables contain<br />

the lists of symbols and their respective addresses. Once all the main() <strong>function</strong>s of all the modules have been called,<br />

the monitor can create the links between exported objects and imported objects.<br />

The symbol name is used by the monitor to link objects. The same name can therefore not be used to export two<br />

different objects.<br />

Module A<br />

EXPORT ("NAME",<br />

Addr1)<br />

Monitor<br />

NAME : Symbol (Character string)<br />

This symbol is used during import<br />

Addr1: Address of the object to be exported (defined in module A)<br />

Addr2: Address of the object that will be used in module B<br />

Table of Exports<br />

Symbol @Symb<br />

NAME Addr1<br />

Addr2 = Addr1<br />

Table of Imports<br />

Symbol @Symb<br />

NAME Addr2<br />

Module B<br />

IMPORT ("NAME",<br />

Addr2)

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

Saved successfully!

Ooh no, something went wrong!