Configuration
5.4 Configuring the telecontrol instructions
CP 1242-7
64
Operating Instructions, 09/2011, C79000-G8976-C247-02
Byte
Parameter
Data type
Initial value
Description
6 ... 7 -
-
-
- reserved -
RemoteAddress
IP_V4
IP address of the connection partner
8 ... 11 ADDR
Array [1...4] of
Byte
IP address of the relevant connection partner
12 ...
13
RemotePort
UINT
1...65535
IP port of the connection partner
Not relevant if ActiveEstablished = 0
14 ...
15
LocalPort
UINT
1...65535
Local IP port ("0" is not permitted)
Not relevant if ActiveEstablished = 1
System data type TCON_phone for SMS connections
Note
Authorized phone numbers
The CP only accepts an SMS if the sending communication partner is authorized based on
its phone number. These numbers are in configured for the CP in STEP 7 in the "authorized
phone numbers" list.
Table 5- 3
Parameter TCON_phone
Byte
Parameter
Data type
Initial value
Description
0 ... 1 InterfaceID
HW_ANY
Reference to the interface of the local CP 1242-7
(see STEP 7 > CP configuration > Telecontrol
interface > "Hardware identifier")
2 ... 3 ID
CONN_OUC
1...07FF
h
Reference to the GPRS connection. The ID is
assigned and must be unique within the CPU.
Here, the same value as that of the ID parameter of
the TC_CON instruction must be used.
4
ConnectionType
BYTE
W#16#0E
Protocol variant 14 (E
h
): SMS connection
5
ActiveEstablished
BOOL
Identifier for the type of connection establishment
(not relevant for the CP 1242-7):
0: Passive connection establishment (not relevant
here)
1: Active connection establishment
6...7
-
-
-
- reserviert -
8 ... 31 PhoneNumber
STRING[22]
Call number of the connection partner
Permitted values: Plus character (+) and numbers
Without an entry, no connection partner is specified
(for example SMS reception from all authorized
connection partners).
Note the following during startup: Without an entry,
TC_RECV first delivers the oldest SMS message.