content.gif menu.gif basics.gif

Time Stamp Push Protocol - Configuration

With TSPP it is possible to transmit data from the PLC to the WinCC OA driver spontaneous and with time stamps generated in the PLC. This allows the optimization of communication since the data can be transferred only on change. It furthermore allows a better resolution of time stamps in comparison to polling because time stamps are already generated in the PLC when a value change is detected.

To use this mode some programming effort in the PLC is necessary. The PLC must prepare a defined data buffer with the data to be transferred and the PLC must send this data using a BSEND PLC function call. The structure of the data buffer is outlined below.

 

The TSPP data block consists of a header and several equal length records. The length of the record is defined in the header and the number of records is calculated from the overall block length.

 

Each record consists of

  • UTC timestamp,

  • DB number,

  • Start address, which is the address of the first word in the record and

  • The data in the following words.

note.gifNote

An UTC timestamp must exist in the TSPP data record. If the PLC is running with local time, two hours must be always subtracted in the PLC during the generation of the timestamp for the TSPP record.

 

The size of a record is arbitrary. There can be, for example, a lot of small records or fewer large records in a TSPP block. Of course the maximum size of a BSEND function call cannot be exceeded.

 

The mapping of data in WinCC OA is done in the usual way. The input address mode must be spontaneous and all address types can be configured. If, for example, a record has DB 100, start address 1000 and 4 words, bit addresses of DB100.DBX1000.0 till DB100.DBX1007.7 are covered by this record.

note.gifNote

The DB must exist in the PLC, else no communication can be established.

 

Data block structure of the TSP protocol

Byte

Description

Meaning

Content

Format

Data Set Length

Data Length

0

TS Header

Time Stamp Protocol ID 1

T

char

 

 

1

Time Stamp Protocol ID 2

S

char

2

Time Stamp Protocol ID 3

P

char

3

record length

(n)

byte

4

length of entire block [WORD]

(6 + n) * x

int

5

6

1. record with timestamp

Date Time

 

SIMATIC TIME & DATE (8 Byte)

 

(6 + n)

[WORD]

7

8

9

10

11

12

13

14

DB Number

 

UINT

15

16

Start Address

 

UINT

17

18

Value 1

 

WORD

n

[WORD]

29

20

Value 2

 

WORD

21

22

.................

...

...

Value n

 

WORD

...

...

2. record with timestamp

Date Time

 

SIMATIC TIME & DATE (8 Byte)

 

(6 + n)

[WORD]

 

...

...

...

...

...

...

...

...

DB Number

 

UINT

...

...

Start Address

 

UINT

...

...

Value 1

 

WORD

n

[WORD]

...

...

Value 2

 

WORD

...

...

.................

...

...

Value n

 

WORD

...

 

...

 

...

x. record with timestamp

Date Time

 

SIMATIC TIME & DATE (8 Byte)

 

(6 + n)

[WORD]

...

...

...

...

...

...

...

...

DB Number

 

UINT

...

...

Start Address

 

UINT

...

...

Value 1

 

WORD

n

[WORD]

...

...

Value 2

 

WORD

...

...

.................

...

...

Value n

 

WORD

x

 

note.gifNOTE

If a TSPP telegram with the header "TSH" instead of "TSP" is received, the "Record Length" is interpreted as a 2 byte word. The telegram is processed as usual. Therefore, it is possible to send up to 65535-6 16 Bit Words in a TSPP record.

 

 

S7_Driver-24.png

 

The parameters you have to define for a S7-TSPP connection in the S7 configuration panel are:

 

Connection type

The connection type changes automatically to "TSPP S7 connection" and cannot be changed when Use TSPP is active.

Connection Id

The ID of the S7 connection on the WinCC OA S7 driver side. This ID is only for local use.

It need not match the ID of the corresponding connection in the PLC.

CPId

The CPId must be set to the “local connection resource” specified in the PLC for the S7 connection.

PC-Rack

The rack of the PC as defined in the PLC.

PC-Slot

The slot of the PC as defined in the PLC.

PCId

The PCId must be set to the “remote connection resource” specified in the PLC for the S7 connection.

 

For the descriptions of the other configuration parameters see Configuration of the S7 driver.

 

note.gifNOTE

The TSPP specific parameters are stored in the _S7_Config.TSPPExtras DPE.

 

caution.gifCAUTION

If the S7 connection is projected through the integrated IE interface of the S7-300 controllers of the CPU31x-2PN/DP or the CPU319-3PN/DP, the FB12 "BSEND" and FB13 "BRCV" from the library "Standard Library -> Communication Blocks -> Blocks" with the family="CPU_300" must be used. These FBs can be used for the S7 communication through the integrated IE interface of the CPU as well as for the S7 communication through the S7-300 IE CPs.

caution.gifCAUTION

If no TSPP message is received within the Alive Interval (default value 30 seconds, see Possible config entries of the S7 driver), the driver closes the connection to the PLC and re-establishes the connection. If no TSPP message is received again, the driver closes the connection again. At least one TSPP signal has to be received within the Alive Interval.

note.gifNOTE

If a PLC is connected to a redundant WinCC OA system over TSPP, the Res.CPId and Res.PCId must be different for both connections. In a redundant project the panels allow to input these entries in two additional fields. These fields are visibly only in a redundant project.

 

Example of TSPP Configuration

On the PLC configured connections must be defined for each TSPP connection. You can do this with the STEP7 NetPro tool. The next two figures show such a configuration in the PLC and the figure thereafter shows the corresponding WinCC OA configuration.

 

 

Figure: STEP 7 Connection configuration for TSPP

S7_Driver-19.gif

 

Figure: Connection configuration for TSPP (cont)

S7_Driver-20.gif

 

 

 

page_top.gif

V 3.11 SP1

Copyright ETM professional control GmbH 2013 All Rights Reserved