Basic Functions For Data Transfer S7-300/400; A_Field_Read - Siemens SIMATIC S7 Operating Instructions Manual

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

4.1.1 Basic Functions for Data Transfer S7-300/400

a_field_read

The function a_field_read reads "amount" of output bytes from the PLC starting
from "no" and stores the read value into a variable field of the PG/PC.
If there were no errors, the function supplies 0 as the return value, otherwise an
error message which can be evaluated in accordance with the error table (see
error_message).
See also e_field_read, m_field_read
C-Adapter
int
a_field_read (int no,int amount,void * buffer);
Example:
Output byte 10 is read. The read value is stored in "buffer".
C-Adapter
#include <w95_s7.h>
char
buffer;
int
error;
adr_table_type plc_adr_table[2] = { {2,0,2,0},{0,0,2,0} };
error = load_tool(1,"S7ONLINE",plc_adr_table);
:
error = a_field_read(10,1,&buffer);
:
error = unload_tool();
:
:
Toolbox for Data Link PGs/PCs to SIMATIC S7
22
PRODAVE S7

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents