Spc3 profibus interface center – Siemens SPC3 User Manual

Page 35

Advertising
background image

SPC3

PROFIBUS Interface Center

SPC3 Hardware Description

V1.3

Page 33

Copyright (C) Siemens AG 2003 All rights reserved.

2003/04


Address

Bit Position

Designation

Control
Register

7

6

5

4

3

2

1

0

0DH

0

0

0

0

0

0

New_Diag_Cmd

0

0

no Puffer

0

1

Diag_Puf1

1

0

Diag_Puf2


Figure 6.9: Coding Diag_Puffer_SM, New_Diag_Cmd

6.2.4.2 Structure of the Diagnostics Buffer:

The user transfers the diagnostics buffer displayed in the figure below to SPC3. The first 6 bytes are space
holders, except for the three least significant bit positions in the first byte. The user stores the diagnostics
bits, ‘Diag.Ext_Diag’ ‘Diag.Stat_Diag,” and Diag.Ext.Diag_Overflow’ in these three bit positions. The
remaining bits can be assigned in any order. When sending, SPC3 pre-processes the first six bytes
corresponding to the standard.

Byte

Bit Position

Designation

7

6

5

4

3

2

1

0

0

Ext_
Diag

Overf

Stat

Diag

Ext_
Diag

Spaceholder

1

Spaceholder

2

Spaceholder

3

Spaceholder

4

Spaceholder

5

Spaceholder

6-n

The user must input

Ext_Diag_Data (n = max 243)

Figure 6.10: Structure of the Diagnostics Buffer for Transfer to the SPC3

The ‘Ext-Diag_Data’ the user must enter into the buffers follow after the SPC3-internal diagnostics data.
The three different formats are possible here (device-related, ID-related, and port-related). In addition to the
‘Ext_Diag_Data,’ the buffer length also includes the SPC3 diagnostics bytes (R_Len_Diag_Puf1,
R_Len_Diag_Puf2).

6.2.5 Write_Read_Data / Data_Exchange (Default_SAP)

6.2.5.1 Writing Outputs

SPC3 reads the received output data in the D buffer. After error-free receipt, SPC3 shifts the newly filled
buffer from ‘D’ to ‘N.’ In addition, the ‘DX_Out_Interrupt’ is generated. The user now fetches the current
output data from ‘N.’ The buffer changes from ‘N’ to ‘U’ with the ‘Next_Dout_Buffer_Cmd,’ so that the
current data of the application can be sent back for the master’s Read_Outputs.

If the user’s evaluation cycle time is shorter than the bus cycle time, the user does not find any new buffers
with the next ‘Next_Dout_Buffer_Cmd’ in ‘N.’ Therefore, the buffer exchange is omitted, At a 12 Mbd baud
rate, it is more likely, however, that the user’s evaluation cycle time is larger than the bus cycle time. This
makes new output data available in ‘N’ several times before the user fetches the next buffer. It is
guaranteed, however, that the user receives the data last received.

For ‘Power_On’, ‘Leave_Master’ and the Global_Control-Telegram ‘Clear,’ SPC3 deletes the D buffer and
then shifts it to ‘N.’ This also takes place during the power up (entering into ‘Wait_Prm’). If the user fetches
this buffer, he receives the ‘U_buffer cleared’ display during the ‘Next_Dout_Buffer_Cmd.’ If the user is still
supposed to enlarge the output data buffer after the Check_Config telegram, the user must delete this delta
in the N buffer himself (possible only during the power-up phase in the ‘Wait_Cfg’ state).

If ‘Diag.Sync_Mode = 1’, the D buffer is filled but not exchanged with the Write_Read_Data-Telegram, but
rather exchanged at the next Sync or Unsync.

Advertising