Configuration
5.4 Configuring the telecontrol instructions
CP 1242-7
Operating Instructions, 09/2011, C79000-G8976-C247-02
57
The ID parameter references the GPRS connection. The value of ID must correspond to the
value used for ID by TC_CON.
The InterfaceID parameter references the GPRS interface of the required local CP. The
value must be the same as that used by TC_CON for InterfaceID.
The maximum amount of data to be received is specified with the LEN parameter.
The size of the data area specified in DATA must be at least as large as the number of bytes
configured for LEN. Permitted data types in the data area specified in DATA are all except
BOOL and ARRAY of BOOL. The received data is interpreted as if the sending partner had
used the same data types.
The DB (system data type) used for the connection description of TC_RECV must differ from
a DB used for TC_SEND.
Call interface in FBD representation
7&B5(&9
&211B28&
%22/
8,17
+:B,17(5)$&(
%86<
,'
/(1
,17(5)$&(
(1B5
'$7$
(5525
1'5
5&9'B/(1
%22/
%22/
%22/
8,17
9$5,$17
:25'
67$786
Explanation of the formal parameters
The following table explains all the formal parameters for the TC_RECV instruction
Parameter
Declaration Data type
Possible values
Description
EN_R
INPUT
BOOL
0: Data reception locked
1: Data reception enabled
Enables / locks the reception of data
ID
INPUT
CONN_OUC
1...07FF
h
Reference to the relevant connection
InterfaceID
INPUT
HW_ANY
Reference to the interface of the local
CP 1242-7 (see STEP 7 > CP
configuration > Telecontrol interface >
"Hardware identifier")
LEN
INPUT
UINT
1...2048
(minimum) number of bytes of data to be
received, maximum 2048
DATA
INOUT
VARIANT
Address reference to the receive data
area of the CPU
ENO
OUTPUT
BOOL
0: Error
1: Error-free
Enable output
If there is a runtime error with the
instruction, ENO = 0 is set.
RCVD_LEN OUTPUT
UINT
Number of bytes of received data