Siemens SIMATIC NET S7-300 Manual page 165

Cps for industrial ethernet
Hide thumbs Also See for SIMATIC NET S7-300:
Table of Contents

Advertisement

Example
Below, you will find a sample of a configuration data block with the parameter field
for system data and a parameter field for a TCP connection.
Table 6-1
CONF_DB
STL
DATA_BLOCK DB271
TITLE=IP_CONFIG for 1 active nTCP connection,
AUTHOR : Alfred //CP data : IP=200.12.1.144, Router=200.12.1.80
FAMILY : AS300 //Connection data: Destination IP addr=200.12.1.99,
NAME : ipconf //Local port = 4001, remote port = 5001, estab=active
VERSION : 1.0 //07-June-2005
STRUCT
DB_TYP :
// --------------------------------------------------------- System Data ------
sys_pb :
sys_id :
sys_sb_cnt:
ip_addr:
ip_netmask:
ip_router:
// --------------------------------------------------------- tcp VB 01 ---------
tcp_pb_01
:
tcp_id_01
:
tcp_sb_cnt_01
:
tcp_vb_ip_01
:
tcp_loc_01
:
tcp_rem_01
:
tcp_vb_01_name :
tcp_vb_01_kbus :
rq_01
:
// ------------------------------------------------------------------------------
END_STRUCT ;
BEGIN
tcp_loc_01.port
tcp_rem_01.port
END_DATA_BLOCK
// ------------------------------------------------ end
S7-CPs for Industrial Ethernet Configuring and Commissioning
Release 01/2007
C79000-G8976-C182-07
INT := 1;
//
INT:=0;
// Subfield type: System data for CP
INT:= 0;
// System parameter ID, always 0
INT:= 3;
// Number of subfields in
// System parameter field
SUB_IP_V4;
// IP address of the CP
SUB_NETMASK;
// Subnet mask of the CP
SUB_DEF_ROUTER; // Default router
INT := 1;
// Subfield type: TCP connection
INT := 1;
// 1. TCP_VB
int := 6;
// 6 Elements per TCP connection
SUB_IP_V4;
// IP address of the partner
SUB_LOC_PORT;
//
SUB_REM_PORT;
//
CON_NAME_L;
//
SUB_KBUS_ADDR;
// Relevant only for S7-400
ACT_CN_REQ;//
:= 4001;
// Definition of ports when value of
:= 5001;
// differs from predefinition !
6 Programmed Communication Connections
"IP_CONF_DB_271" -----
Ex-
plana-
tion
A -165

Advertisement

Table of Contents
loading

Table of Contents