24.01.2015 Views

PLC Programming

  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

9 - DDE Communication with CoDeSys<br />

Dialog for configuring the GatewayDDE Server<br />

Motorola byteorder<br />

Check identity<br />

Updaterate [ms]<br />

Timeout [ms]<br />

Tries<br />

Motorola Byteorder is used<br />

It will be checked, whether the project ID given by the symbol file is<br />

the same as that stored in the <strong>PLC</strong>.<br />

Time interval for reading all symbol values from the <strong>PLC</strong>.<br />

Communication timeout for the used driver.<br />

Number of retries of the communication driver to transfer a data<br />

block (not supported by all drivers !)<br />

To set up the connection to the Gateway, the dialog 'Communication Parameters' is opened by the<br />

command 'Online' 'Parameters'. It is the same dialog as you get in CoDeSys with the command<br />

'Online' 'Kommunikationsparameter'. The settings you do here must be the same as in the<br />

corresponding CoDeSys Project.<br />

The actual configuraiton of the GatewayDDE Server can be stored in a file by the command 'File'<br />

'Save'. The standard dialog for saving a file will open, default for the extension of the file is *.cfg.<br />

To get the gateway in active mode, login by the command 'Online' 'Login'. (The gateway symbol in<br />

the status bar will get lightened then.) At login the desired connection will be built up and the available<br />

symbols can be accessed.. These must have been created before in the CoDeSys Project !<br />

To log out use the command 'Online' Logout'.<br />

General Approach to Data<br />

A DDE inquiry can be divided into three parts:<br />

1. Name of the program (here: CoDeSys),<br />

2. File name and<br />

3. Variable name to be read.<br />

Name of the program: CoDeSys<br />

File name: complete project path (c:\example\example.pro).<br />

Variable name: The name of a variable as it appears in the Watch and Receipt Manager .<br />

Which variables can be read<br />

All addresses and variables are readable. Variables or addresses should be entered in the format<br />

used in the Watch and Receipt Manager<br />

Examples:<br />

%IX1.4.1 (* Reads the input 1.4.1*)<br />

<strong>PLC</strong>_PRG.TEST (* Reads the variable TEST from the POU <strong>PLC</strong>_PRG*)<br />

CoDeSys V2.3 9-3

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

Saved successfully!

Ooh no, something went wrong!