SIEMENS AG PRODAVE S7
Toolbox for Data Link PGs/PCs to SIMATIC S7
28
Example:
DB10 consisting of 100 data words (DW 0 - DW 99) exists in the PLC.
45 data words are to be read starting from DW5.
The read values are stored in the data buffer “buffer” and are available for
processing.
C-Adapter
#include <w95_s7.h>
int buffer[100];
int error;
int dbno,dwno,amount;
:
:
dbno = 10;
dwno = 5;
amount = 45;
error = db_read(dbno,dwno,&amount,buffer);
:
error = unload_tool();
: