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.

In module 2<br />

#include <br />

SINT16 (*ImpFunc)(UINT8, SINT16);<br />

/* ImpFunc: Pointer to a <strong>function</strong> requiring two parameters that return SINT16*/<br />

void funct2()<br />

{<br />

PCUR(5, 2);<br />

ImpFunc(«_», 10);<br />

/* Execution of the imported <strong>function</strong>*/<br />

}<br />

main()<br />

{<br />

IMPORT(«FUNCT1», &ImpFunc);<br />

/* Initialisation of the pointer to the external <strong>function</strong>*/<br />

}<br />

16.4.9.3 Functions for Exchanges by Protocol<br />

The operation and parameters of these <strong>function</strong>s are the same as for the corresponding <strong>ladder</strong> <strong>function</strong>s (see<br />

Chapter 15).<br />

Read the Answer from a Distant Server NETI<br />

Syntax<br />

Programming error causing a CPU fault<br />

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

UINT8 NETI(UINT8 port, UINT8 *buffer_addr)<br />

Access to a prohibited address:<br />

- *datagram parameter error,<br />

- *datagram+size outside authorised area.<br />

Send a UNITE Request to a Distant Server NETO<br />

Syntax<br />

Programming error causing a CPU fault<br />

Access to a prohibited address:<br />

- *datagram parameter error,<br />

- *datagram+size outside authorised area.<br />

UINT8 NETO(UINT8 port, UINT8 *buffer_addr)

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

Saved successfully!

Ooh no, something went wrong!