Siemens SIMATIC S7 Operating Instructions Manual page 55

Prodave s7 v5.5 toolbox for windows 95/98/nt/me/2000 applications for a data link of pgs/pcs to simatic s7 via mpi interface and pc/mpi cable
Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

SIEMENS AG
C-Adapter
int
as200_mix_read (void* data, void* buffer);
Example:
Input byte 0, output byte 3 and variable memory bytes 5 and 6 are read and the
values are stored in variables e, a v5 and v6.and d:
C-Adapter
#include <w95_s7.h>
#pragma pack(1)
typedef struct {
data_type data[10];
#pragma pack()
char
buffer[100];
char
e,a,v5,v6;
int
v;
int
error;
:
:
data[0].typ = 'e';
data[0].size= 'b';
data[0].no
data[1].typ = 'a';
data[1].size= 'b';
data[1].no
data[2].typ = 'v';
data[2].size= 'b';
data[2].no
data[3].typ = 'v';
data[3].size= 'b';
data[3].no
data[4].typ = 0;
error = mix_read(data,buffer);
e = buffer[0];
a = buffer[1];
v5= buffer[2];
v6= buffer[3];
:
Toolbox for Data Link PGs/PCs to SIMATIC S7
char typ;
char size;
int dbno;
int no;
} data_type;
/* eingangsbyte 0 */
= 0;
/* ausgangsbyte 3 */
= 3;
/* variablen speicher byte 5 */
= 5;
/* variablen speicher byte 6 */
= 6;
/* endekennung der liste */
51
PRODAVE S7

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents