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.

16.4.3 Exchange Area<br />

Programming in C Language<br />

All the variables of the exchange area (see Chapter 3) are accessible for <strong>programming</strong> in C. The exchange area is<br />

defined in header file NUM.H.<br />

It is necessary to include file NUM.H at the beginning of the source files that will be using the exchange area.<br />

File NUM.H is divided into four areas, validated by the following definitions:<br />

- the exchange area is validated by «#define VariablesLAD»,<br />

- the transparent mode <strong>function</strong> area is validated by «#define NCScreen»,<br />

- the grafcet formalism area is validated by «#define Grafcet»,<br />

- the file management area is validated by «»#define File_Management».<br />

Example<br />

To use the exchange area<br />

#define VariablesLAD<br />

#include <br />

To use the exchange area and transparent mode <strong>function</strong>s<br />

#define VariablesLAD<br />

#define NCScreen<br />

#include <br />

16.4.4 Accessing the Saved Common Internal Variables<br />

These byte, word or long word variables are accessible by the following keywords:<br />

Keyword Value Definition<br />

_MB(a) 0 < to < 77FF Signed byte<br />

_MW(a) 0 < to < 77FE Signed word<br />

_ML(a) 0 < to < 77FD Signed long word<br />

It is also possible to access data by the address (equivalent to the .& <strong>ladder</strong> operator).<br />

Keyword Value Definition<br />

_pM(a) 0 < to < 77FF<br />

16.4.5 Accessing Unsaved Common Internal Variables<br />

These byte, word or long word variables are accessible by the following keywords:<br />

Keyword Value Definition<br />

_VB(a) 0 < to < 77FF Signed byte<br />

_VW(a) 0 < to < 77FE Signed word<br />

_VL(a) 0 < to < 77FD Signed long word<br />

It is also possible to access data by the address (equivalent to the .& <strong>ladder</strong> operator).<br />

Keyword Value Definition<br />

_pV(a) 0 < to < 77FF<br />

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

16

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

Saved successfully!

Ooh no, something went wrong!