EasyManuals Logo

Siemens SIMATIC S7 Operating Instructions

Siemens SIMATIC S7
82 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #26 background imageLoading...
Page #26 background image
SIEMENS AG PRODAVE S7
Toolbox for Data Link PGs/PCs to SIMATIC S7
22
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();
:
:

Table of Contents

Other manuals for Siemens SIMATIC S7

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens SIMATIC S7 and is the answer not in the manual?

Siemens SIMATIC S7 Specifications

General IconGeneral
BrandSiemens
ModelSIMATIC S7
CategoryController
LanguageEnglish

Related product manuals