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.

16.4.9.2 Using System Functions<br />

Example: «EXPORT a table»<br />

In file EXP.C<br />

#include <br />

SINT16 table[100];<br />

main()<br />

{<br />

EXPORT(«LABEL», table);<br />

}<br />

In file IMP.C<br />

#include <br />

SINT16 *ptab;<br />

main()<br />

{<br />

IMPORT(«LABEL», &ptab);<br />

}<br />

Example: «EXPORT a <strong>function</strong>»<br />

In module 1<br />

#include <br />

SINT16 Display(UINT8 what, SINT16 quantity)<br />

{<br />

SINT16 i;<br />

for (i = 0; i < quantity; i++);<br />

{<br />

EMIV(what);<br />

}<br />

return(i);<br />

}<br />

main()<br />

{<br />

EXPORT(«FUNCT1», Display);<br />

}<br />

Programming in C Language<br />

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

16

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

Saved successfully!

Ooh no, something went wrong!