Siemens 6GK7242-7KX30-0XE0 사용자 설명서

다운로드
페이지 108
Configuration and programming 
 
5.4 Programming the telecontrol instructions 
 
CP 1242-7 
72
 
Operating Instructions, 03/2012, C79000-G8976-C247-03 
5.4.8 
IF_CONF: SDT for telecontrol configuration data 
Structure of the system data type IF_CONF for the TC_CONFIG instruction 
The CONFIG parameter of the TC_CONFIG instruction references the memory area with the 
configuration data of the CP 1242-7 to be modified. The configuration data stored in a data 
block is described as a structure of the system data type (SDT) IF_CONF. 
IF_CONF is made up of a header followed by fields that correspond to the parameters or 
parameter areas of the CP in the device properties of the STEP 7 project. 
The CP configuration data to be modified is collected together as IF_CONF fields. 
Parameters that will not be modified are ignored in the IF_CONF structure and remain as 
they were configured in the STEP 7 project. 
Creating the DB and the IF_CONF structures 
You can create the parameters of the CP within the IF_CONF DB in one or more structures 
each with one or more fields. 
You will need to type in the data types of the fields using the keyboard. They are not 
displayed in the selection list. The data types are not case-sensitive. 
Follow the steps below to create IF_CONF: 
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- 5 
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