EasyManuals Logo

Siemens SIMATIC NET S7-300 User Manual

Siemens SIMATIC NET S7-300
317 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 #252 background imageLoading...
Page #252 background image
7 Programming FCs (Functions) and FBs for S7 Ethernet CPs
A-252
S7-CPs for Industrial Ethernet Configuring and Commissioning
Release 01/2007
C79000-G8976-C182-07
Example in STL representation:
STL Explanation
CALL FB 52, DB 52
CPLADDR := W#16#0110
WRITE_REC := M 1.1
ID := W#16#86A
INDEX := W#16#8000
DONE := M 1.3
ERROR := M 1.1
STATUS := MW 12
LEN := MW 16
RECORD := P#DB3.DBX0.0 BYTE 80
// PNIO_RW_REC block call
(read/write data record)
// Module address from hardware configuration
// TRUE: write data record;
FALSE: read data record
// Logical address of the module to be addressed
// Data record number
// Address for return parameter DONE
// Address for return parameter ERROR
// Address for return parameter STATUS
// Length of the data record that was read or
will be written in bytes
// Destination or source of the data record to
be transferred (here max. 80 bytes)
Explanation of the Formal Parameters
The following table explains all the formal parameters for FB52:
Paramet
er
Declarat
ion
Data
type
Possible
Values
Remarks
CPLADDR INPUT WORD - Module base address
WRITE_
REC
INPUT BOOL 0: Read data record
1: Write data record
Job type;
The parameter must not be changed
while the block is executing.
ID INPUT WORD Logical address of the PROFINET IO
component (module or submodule).
Bit 15 must be set for an output
module.
(Example of output address 5:
ID:=DW#16#8005).
For a mixed module, the lower of the
two addresses must be specified.
Index INPUT WORD See vendor information
for the data record
numbers supported by
the module.
Data record number that the user
wants to read or write.
DONE OUTPUT BOOL 0: -
1: Data record
transferred
successfully
This parameter indicates whether or
not the job was completed without
errors.
ERROR OUTPUT BOOL 0: -
1: Error
Error code
STATUS OUTPUT WORD 0: No error
Other value: Error
(see Table 7-13)
Status code

Table of Contents

Other manuals for Siemens SIMATIC NET S7-300

Questions and Answers:

Question and Answer IconNeed help?

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

Siemens SIMATIC NET S7-300 Specifications

General IconGeneral
Product Type DesignationSIMATIC NET S7-300
MountingDIN rail mounting
Protection ClassIP20
CPU ModelsVarious models available (e.g., CPU 312, CPU 314)
Communication InterfacesMPI, PROFIBUS DP
Power Supply24 V DC power supply required. Different power supply modules available.
I/O ModulesDigital input modules, digital output modules, analog input modules, analog output modules
ProgrammingSTEP 7 software
Supply Voltage24V DC or 120/230V AC (depending on model)
Digital InputsAvailable via digital input modules
Digital OutputsAvailable via digital output modules
Analog InputsAvailable via analog input modules
Analog OutputsAvailable via analog output modules
Communication FunctionsMPI, PROFIBUS DP, Ethernet (depending on model)
ProtocolsMPI, PROFIBUS DP, TCP/IP (depending on model)
Operating Temperature0°C to 60°C
Storage Temperature70 °C
MemoryDepends on CPU model (e.g., 32 KB to 1.5 MB)

Related product manuals