11.12.2012 Views

Cable and adapter manual

Cable and adapter manual

Cable and adapter manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The S7/MPI-LAN sends only data when something is recieved on the open TCP/IP<br />

Socket on Port 133 (regardless of the length).<br />

Press now the -Key several times, then the S7/MPI-LAN will response with<br />

some data:<br />

The Structure of the recieved data is descriped in the next table::<br />

Data Description<br />

30h<br />

30h<br />

31h<br />

00h<br />

32h<br />

35h<br />

35h<br />

00h<br />

Parity – Counter as ASCII-Text, including leading Zeros <strong>and</strong> ending ‚\0’<br />

here „001“<br />

Spike - Counter as ASCII-Text, including leading Zeros <strong>and</strong> ending ‚\0’<br />

here „255“<br />

01h Binary Parity – Counter (8 Bit)<br />

FFh Binary Spike - Counter (8 Bit)<br />

On the MEGA-ToolBox CD is also a console-application including source which<br />

shows an example of access to S7/MPI-LAN.<br />

// WDTest.cpp : Definiert den Einsprungpunkt für die Konsolenanwendung.<br />

//<br />

#include "stdafx.h"<br />

typedef struct {<br />

unsigned char ucASCIIParity[4]; // Anzahl Paritätsfehler seit letzter Abfrage<br />

// 3 Ziffern mit abschließender '\0'<br />

unsigned char ucASCIISpikes[4]; // Anzahl erkannter Spikes seit letzter Abfrage<br />

// 3 Ziffern mit abschließender '\0',<br />

unsigned char ucBINParity; // Binärwert der Anzahl Paritätsfehler<br />

unsigned char ucBINSpikes; // Binärwert der Anzahl Spikes<br />

} S7LANINFO;<br />

Page 44 <strong>Cable</strong> <strong>and</strong> <strong>adapter</strong> <strong>manual</strong> © by PI 2009

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

Saved successfully!

Ooh no, something went wrong!