Ad Hoc Mode; Connection Ids For The Open User Communication Instructions - Siemens SIMATIC S7-1200 Manual

Easy book
Hide thumbs Also See for SIMATIC S7-1200:
Table of Contents

Advertisement

Easy to communicate between devices
7.5 PROFINET
7.5.1.1

Ad hoc mode

Typically, TCP and ISO-on-TCP receive data packets of a specified length, ranging from 1 to
8192 bytes. However, the TRCV_C and TRCV communication instructions also provide an
"ad hoc" communications mode that can receive data packets of a variable length from 1 to
1472 bytes.
Note
If you store the data in an "optimized" DB (symbolic only), you can receive data only in
arrays of Byte, Char, USInt, and SInt data types.
To configure the TRCV_C or TRCV instruction for ad hoc mode, set the ADHOC instruction
input parameter.
If you do not call the TRCV_C or TRCV instruction in ad hoc mode frequently, you could
receive more than one packet in one call. For example: If you were to receive five 100-byte
packets with one call, TCP would deliver these five packets as one 500-byte packet, while
ISO-on-TCP would restructure the packets into five 100-byte packets.
7.5.1.2

Connection IDs for the Open user communication instructions

When you insert the TSEND_C, TRCV_C or TCON PROFINET instructions into your user
program, STEP 7 creates an instance DB to configure the communications channel (or
connection) between the devices. Use the "Properties" of the instruction to configure the
parameters for the connection. Among the parameters is the connection ID for that
connection.
● The connection ID must be unique for the CPU. Each connection that you create must
have a different DB and connection ID.
● Both the local CPU and the partner CPU can use the same connection ID number for the
same connection, but the connection ID numbers are not required to match. The
connection ID number is relevant only for the PROFINET instructions within the user
program of the individual CPU.
● You can use any number for the connection ID of the CPU. However, configuring the
connection IDs sequentially from "1" provides an easy method for tracking the number of
connections in use for a specific CPU.
Note
Each TSEND_C, TRCV_C or TCON instruction in your user program creates a new
connection. It is important to use the correct connection ID for each connection.
134
Easy Book
Manual, 03/2014, A5E02486774-AF

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents