SCTM : Telegram structure

Each telegram contains one so called header that includes the information needed for the controlling of the communication. If necessary a data block including the process information is added to the header. Header and  data block are each for itself with a block check character ( BCC/ HCC ) protected against transmission errors.

 

Telegram header

The Header telegram without data block is used from the central station ( ZS ) for the initialization of the communication or from the ZS as well as from the substation ( US ) for the acknowledge of data blocks.

 

 

There are header telegrams with four different lengths depending on the number of US-NO bytes.

  • Header length =   8, number of US-NO bytes = 0
  • Header length = 11, number of US-NO bytes = 3
  • Header length = 13, number of US-NO bytes = 5
  • Header length = 16, number of US-NO bytes = 8 ( US-No. + reflection )

The number of station fields is a system parameter. A dynamic change over between the different headers is not allowed.

 

Start of Header ( SOH ) :

Each SCTM telegram starts with SOH ( 01H ). This is always the first sign. 

 

Status :

 

AUZ

Number of station characters :

Status ( binary ) =  0011 0000  -> US no. has an odd  number of characters ( 3 or 5 )
Status ( binary ) =  0110 0000  -> US no. has an even number of characters ( 0 or 8 )

PR

Priority bit :

0 = Normal telegram
1 = Telegram with high priority

Telegrams with high priority are used for short urgent information especially for the time synchronization provided that it is not transmitted as broadcast command. 

F

Following bit :

0 = Single telegram
1 = A further telegram follows to the same data block. 

Data blocks that would exceed the max, data block length are distributed on several telegrams. For the identification of belonging together telegrams will, except in the last telegram, the F-bit set.

Z / U

Direction bit :

0 = Telegrams from the substation ( monitoring direction ).
1 = Telegrams from the central station ( control direction ).

 

The status character can assume the following values. 

Control direction :

a  c  e  g

for number of US characters = 0   or number of US characters = 8

1  3  5  7

for number of US characters = 3   or number of US characters = 5

Monitoring direction :

'   b  d  f

for number of US characters = 0    or number of US characters = 8

0  2  4  6

for number of US characters = 3    or number of US characters = 5

 

Station number and reflection bytes :

A device number is assigned to each substation unit as device address. With this address the single substations can be called and allocated from the central station.

The station field consists by default of 3 numbers ( 000...999 ). Optionally station fields with 5 or 8 numbers are used. The station number can be omitted for US telegrams and/ or ZS telegrams whereby the lengths of the header is reduced to 8 characters ( without ETX or STX ). 

US-No. = 0 indicates a  "Broadcast command" ( substations ).

 

Block number ( BL no. ) :

Data block sequence number : ( modulo 10 ) 0... 9 or " > "

The BL-No is always increased by 1 when a data block telegram is transmitted. Data blocks in each send direction are counted continuously independent one from the other. When a header is transmitted without data block the BL-No remains unchanged. The BL-No are set to ZERO with the initialization command ( INITCOM ) of the central station and so the communication with the US is re-initialized. 

The BL-No can also be used as "WAIT-FLAG" and includes then the character " > " ( 3EH ).

 

Quittance number ( Q no. ) :

Data block acknowledge : ( Modulo 10 ) 0... 9 or " ? "

The Q-No contains the number of the data block to be acknowledged and is like the BL-No set to ZERO with the initialization command ( INITCOM ) of the central station. 

The Q-No includes the character " ? " ( 3EH ) in the initialization command. 

 

Data block length ( DBL ) :

The DBL indicates the length of the data block in the telegram. The characters STX, ETX and the BCC are  counted. The maximum length of the DBL is 256 characters. 

 

Header Check Code ( HCC ) :

The HCC is the length parity completed to even over all header bytes exclusive the control characters SOH, ETX respectively STX and without the HCC byte. The HCC character accepts values in the range ( binary ) of  0011 XXXX and  0101 XXXX which do not effect any control function and therefore do not disturb the procedure.

 

End of Text ( ETX ) :

The control character ETX ( 03H ) concludes the header, if no data section is available. If a data block is available the ETX will be replaced by STX and initiates the begin of the data block. 

 

Telegram with header and data block

The telegram with data block is used for the transmission of the user data between the controlling ( ZS ) and the controlled ( US ) station and in the opposite direction. 

 

 

Start of Text ( STX ) :

The control character STX ( 02H ) concludes the header, respectively indicates the begin of the data section in the SCTM telegram. The STX is counted in the data block length ( DBL ).

 

End of Text ( ETX ) :

The data section of a SCTM telegram or the header of a telegram without data block is ended with the control character ETX ( 03H ). 

 

Block Check Code ( BCC ) :

The BCC is the length parity over all data block bytes completed to even, exclusive the control character STX and inclusive ETX. The BCC character accepts values in the range ( binary ) of  0011 XXXX and  0101 XXXX, which do not effect any control function and therefore do not disturb the procedure.

 

Data block structure in control direction

 

Information type character ( IAC ) :

A telegram in control direction is identified by 1 or 2 IAC characters.
Possible values of an IAC : E1... E8, D, P, I, N, S1... S3, T1... T4

 

Ring buffer enquiry ( BUFENQi, UPDATEi ) :

 

buffer no.

description

01

period 1 ( MP 1 )

02

period 2 ( MP 2 )

03

reserved for period 3 ( MP 3 )

04

reserved for period 4 ( MP 4 )

05

daily buffer

06

reserved

07

weekly buffer

08... 10

reserved

11

monthly buffer

...

reserved

21

PPR buffer ( data of the last period )

...

reserved

51

spontaneous buffer 1

52...

reserved for further spontaneous buffers

 

Data block structure in monitoring direction

The telegram circulation is controlled by the master station ( ZS ), i.e. the substation ( US ) only replies on inquiry. The analysis of data blocks in monitoring direction is only possible concerning the command sent before in control direction.

 

Type identification ( TypeID )

 

 

IAC direction

function : parameter, ...  - description

TypeID
-- con

INITCOM

1
-- con

ZS quittance

2
E1 con

TABENQ1 : table-address

3
E2 con

TABENQ2 : begin-address, end-address

4
E3 con

TABENQ3 : special IAC ( IACAi )

5
E4 con

BUFENQ1 : buffer number, time-pointer

6
E5 con

NEXTi : buffer number

7
E6 con

BUFENQ2 : buffer number, begin-pointer, end-pointer

8
E7 con

BUFENQ3 : IACAi, Measure-period-No., Measure-period, counter-No

9
E8 con

UPDATEi : buffer number

10
N con

NEXT

11
S1 con

TABSET1 : table-address, table-value

12
S2 con

TABSET2 : begin-address, end-address, table-value, ...

13
S3 con

BUFSET : data ( length and format device specific )

14
I con

IDENT

15
D , P con

IACPASSi : password

16
B0.. B9 con

IACCMD : command number, copy of command number

17
T1 con

SETTIME : date, day of week, time
The SETTIME command sets a time register in the substation that will be taken over from the device clock with the following sync command "SSYNC". 

18
T2 con

SSYNC
The time synchronization is only accepted from the substation  if a SETTIME was received. 

19
T3 con

HSYNC
The hour synchronization command is accepted from the substation without an additional SETTIME command but only to device specific set hours. Is the difference between the device clock and the HSYNC command more than +/- 29 seconds this command is discarded.  

20
T4 con

MSYNC
The minute synchronization command is accepted from the substation without an additional SETTIME command. With the receipt of the command from the substation the seconds register is set to ZERO. If the seconds register in the. Is the second register in the field from 30 to 59 seconds, the minutes register increases additionally by 1. 

21
   

 

 
-- mon

Request INITCOM

129
-- mon

US quittance

130
-- mon

Response TABENQ1 : table-value

131
-- mon

Response TABENQ2 : table-values, ...

132
-- mon

Response TABENQ3 : data ( format pre-programmed under IACAi )

133
-- mon

Response BUFENQ1 : pointer, device-state, counter-no, cnt-value, cnt-status

134
-- mon

Response BUFENQ2 : begin-pointer, end-pointer, device-state, counter-no., cnt-value, cnt-status, counter-no, ...

135
-- mon

Response BUFENQ3 : pointer, device-state, counter-no, cnt-value, cnt-status

136
-- mon

Response UPDATEi : begin-pointer, end-pointer, device-state, counter-no, cnt-value, cnt-status, counter-no, ...

137
-- mon

Response IDENT : ident text

138
-- mon

Response SPOINF1 :

139
-- mon

Response SPOINF2 :

140

 


MAYR Software

Wuerzburger Ring 39,  D 91056 Erlangen

Manual LIAN 98


LIAN 98 Protocol Router, Simulator and Analyzer
© Copyright 2001, 2006, 2011 by Werner Mayr. All Rights reserved.