Siemens SIMATIC S7 CP340 Programming Manual page 33

Table of Contents

Advertisement

4 ASCII protocol communication
Fig. 53: Invoke SFB12 BSEND from OB1
3. At the same time, invoke SFB13 BRCV to receive data, and distribute
instance data block DB13, and create a new DB block DB2 to receive data.
Fig. 54: Receive data block DB2
Name
EN_R
ID
R_ID
RD_1
LEN
NDR
ERROR
STATUS
Table 11: Parameter definition of SFB13 BRCV
CP340/CP341/CP440/CP441 Communication and Programming
Entry-ID: 88867653,
V1.0,
Data type
comments
Receive enable bit, allowing receive when it is
BOOL
1. M8.0 is used in this example.
Local ID number, which is obtained from the
WORD
PtP connection properties and is hexadecimal.
W#16#0 must be used when in ASCII, 3964(R)
DWORD
communication.
Data receive area. DB2 is used in this example
ANY
to receive.
WORD
Receive data length memory area, in bytes
Receive complete bit, which is TRUE if Receive
BOOL
completes and has no error
BOOL
error bit, 1 indicating that it has an error
Status word, indicating error code. The specific
information may be seen in online diagnosis of
WORD
module or from CP441 Manual - Chapter 9:
Diagnosis information
02/2014
33

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7 cp341Simatic s7 cp441Simatic s7 cp440

Table of Contents