EasyManua.ls Logo

Siemens CP 1242-7 GPRS V2 - Page 101

Siemens CP 1242-7 GPRS V2
132 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
Loading...
Programming the program blocks
5.4 IF_CONF: SDT for the configuration data of the CP
CP 1242-7 GPRS V2
Operating Instructions, 10/2016, C79000-G8976-C311-02
101
1. Create a data block of the type "global DB" with block access "Standard".
2. Create a structure (data type "Struct") in the table of the parameter configuration of the
DB.
You can specify any name.
3. Under this structure add a header by assigning the name of the header and typing it in in
the cell of the data type "IF_CONF_Header".
The header of the structure and its three parameters (see below) is created.
4. Create a field for the first parameter to be changed by typing in the required data type (for
example "IF_CONF_APN") in the cell of the data type.
5. Repeat the last step for all parameters you want to change on the CP using the
TC_CONFIG instruction.
6. Finally, update the number of fields in the header in the "subfieldCnt" parameter.
Header of IF_CONF
Table 5- 1 IF_CONF_Header
Byte
Parameter
Data type
Initial value
Description
0 ... 1
fieldType
UINT
Field type: Must always be 0.
2 ... 3 fieldId UINT Field ID: Must always be 0.
4 ... 5
subfieldCnt
UINT
Total number of fields contained in the structure
General parameters of the parameter fields
Each field has the following general parameters:
Id
This parameter identifies the field and must not be modified.
Length
This parameter indicates the length of the field. The value serves as information.
Fields with strings and / or arrays have a variable length. Due to hidden bytes, the actual
length of fields can be greater than the sum of the displayed parameters.
Mode
The following values are permitted to these parameters:
Table 5- 2 Values of "Mode"
Value
Meaning
1 Permanent validity of the configuration data
Not relevant for the CP
2 Temporary validity of the configuration data, including deleting of existing permanent
configuration data
The permanent configuration data is replaced by the parameter fields of IF_CONF.

Table of Contents

Related product manuals