
DPC31 HW
SchnittStellenCenter
DPC31 HW Description
Version V1.0 Page 29
Copyright (C) Siemens AG 2000. All rights reserved. 12/00
Structure of the Diagnosis_Reply Buffers:
The user transfers the Diagnostic_Reply buffer shown in Figure 5.2-4. The buffer control area is located in
the first 6 bytes. In the 7
th
byte, the user only enters the bit ‘Diag.Ext_Diag’ and in the 8
th
byte the bit
‘Diag.Stat_Diag’. The remaining bits in these two bytes can be assigned as required. The user sets up Byte
9 (StationStatus_3), Byte 11,12 (Ident_Number) and Byte 13..250 (Ext_Diag data) completely. Byte 10 is
used as wildcard for ‘Master_Add’ and can be assigned as required. During buffer exchange, DPS enters the
internal Diagnosis_Flags in Bytes 7 and 8 and also enters the ‘Master_Add’ in Byte 10 (refer to Figure 5.2-5).
7 6 5 4 3 2 1 0 Byte Name
0-5: Buffer Header
- - - - Diag.Ext
_Diag
---
6: StationStatus_1
- - - - - - Diag.Stat_
Diag
-
7: StationStatus_2
Diag.Ext
Diag_
Overflow
00000 0 0
8: StationStatus_3
------ - -
9: Wildcard
10: Ident_Number_High
11: Ident_Number_Low
12-249: Ext_Diag-Data
Figure 5.2-4:
Structure of the User_Diag_Reply Buffer
76543210Byte Name
0-5: Buffer Header
0 Diag.
Prm_
Fault
0 Diag.Not
Sup-
ported
Diag.Ext
_Diag
Diag.
Cfg_
Fault
Diag.
Station_
Not_Rdy
0
6: StationStatus_1
0 0 Diag.
Sync_
Mode
Diag.
Freeze_
Mode
Diag.
WD_On
1 Diag.
Stat_
Diag
Diag.
Prm_
Req
7: StationStatus_2
Diag.Ext
Diag_
Overflow
0000000
8: StationStatus_3
9: Master_Address
10: Ident_Number_High
11: Ident_Number_Low
12-249: Ext_Diag-Data
Figure 5.2-5:
Structure of the MAC_Diag_Reply Buffer
5.2.5 Write_Read_Data (Default SAP)
The MAC accepts the Write_Read_Data message only in the ‘Data_Exchange’ mode and only from the
‘Master_Add’ i.e., the locking master; otherwise, a negative acknowledgement ‘RS’ is generated. If the
received net data (output data) does not fit into indication buffer ‘D’, the service is ignored and the response
is 'no resource’.
The length of the indication buffer ‘D’ corresponds exactly to the data output configuration of the respective
slave. If the received output data is less than the length of the indication buffer, there is a configuration error.
In this case, DPS does the following: it sets ‘Diag.Cfg_Fault =1 ‘ (refer to diagnostic data), executes the
‘Leave_Master macro’ transitioning to ‘Wait_Prm’) and transmits the input data from the response buffer.
Otherwise, the received net data is written to the assigned indication buffer and the net data that is to be sent
is fetched from the assigned response buffer.
For the output data, 4 exchange buffers are available and for the input data, 3 exchange buffers.
With the read operation ‘User_Dout_Buffer state’, the user receives the current buffer assignment without
initiating a buffer exchange!
Komentarze do niniejszej Instrukcji