Siemens SPC3 manual Structure of the Diagnostics Buffer, WriteReadData / DataExchange DefaultSAP

Page 35

 

 

 

 

 

 

 

 

 

 

SPC3

 

PROFIBUS Interface Center

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Address

 

 

 

Bit Position

 

 

 

 

 

Designation

 

 

Control

7

6

5

4

3

2

 

1

 

0

 

 

 

Register

 

 

 

 

 

 

 

 

 

 

 

 

 

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_

Stat

Ext_

Spaceholder

 

 

 

 

 

 

 

 

Diag

Diag

Diag

 

 

 

 

 

 

 

 

 

Overf

 

 

 

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_Outnterrupt’I 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 theuser 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 butnot exchanged with the Write_Read_Data-Telegram, but rather exchanged at the next Sync or Unsync.

SPC3 Hardware Description

V1.3

Page 33

Copyright (C) Siemens AG 2003 All rights reserved.

 

2003/04

Image 35 Contents
Simatic NET Page SIM Atic NET SPC3 Hardware Description Profibus Interface CenterRelease Date Changes VersionsDirectory Mode RegisterStatus Register Interrupt Controller Watchdog Timer DPBuffer Structure Description of the DP ServicesPin Assignment Example for the RS 485 Interface 11.3 Diagnostics Processing from the System ViewAsic Test SPC3 Introduction Function Overview Cmos Pin DescriptionCPD Cmos with pull down TTLt Schmitt trigger V1.3 5FFH Memory AllocationMemory Area Distribution in the SPC3 Segment Processor Parameters Latches/Register 0EH 0FH Significance Write AccessOCH 0DH Organizational Parameters RAM 1DH 1AH1BH 1CHAsic Interface Mode RegisterDisstartcontrol EOI Mode Register 1 Mode-REG1, writableSTARTSPC3 Exiting the Offline stateStatus Register Status Register Bit15 . .readable FdlindstSPC3 IRR IMR Interrupt ControllerDxout IAR IMRResponse Time Monitoring Watchdog TimerAutomatic Baud Rate Identification Baud Rate MonitoringDPBuffer Structure PROFIBUS-DP InterfaceUart Aux-Buffer Management RAM Sequence for the SetSlaveAddress Utility Description of the DP Services SetSlaveAddress SAP55 Parameter Data Processing Sequence SetParam SAP61Parameter Data Structure SPC3 CheckConfig SAP62SPC3 Diagnostics Processing SequenceSlaveDiagnosis SAP60 Writing Outputs Structure of the Diagnostics BufferWriteReadData / DataExchange DefaultSAP Reading Inputs GlobalControl SAP58 UserWatchdogTimerReadOutputs SAP57 GetConfig SAP59ReadInputs SAP56 Bus Interface Unit BIU Hardware InterfaceUniversal Processor Bus Interface General DescriptionBus Interface V1.3 XINT/MO ModeLow Cost System with 80C32 Switching Diagram PrinciplesSystem X86-Mode Application with the 80 C SPC3Application with th 80 C Asic Test Interface SignalsUart DC-Specifikation of the I/O- Drivers Technical DataMaximum Limit Values Permitted Operating ValuesCurrent Tabelle 8.5 Leakage current of the output drivers AC-Specification for the Output DriversTabel 8.3 DC-Specifikation of the I/O- Drivers Clock Pulse Timing Timing CharacteristicsSYS Bus Interface Clock pulse 48 MhzTBD ResetTiming in the Synchronous C32-Mode ST-Vers Min Max UnitSynchronous Intel-Mode, Processor-Write-Timing Synchronous Intel-Mode, Processor-Read-TimingParameter Min Max Timing in the Asynchronous Intel Mode X86 ModeST-Vers XWR XCS Asynchronous Intel-Mode, Processor-Read-TimingXRD XCS Xready Asynchronous Intel-Mode, Processor-Write-TimingSynchronous Motorola-Mode, Processor-Read-Timing 4.1 74.2Timing in the Asynchronous Motorola-Mode for example, 68HC16 Synchronous Motorola-Mode, Processor-Write-TimingAsynchronous Motorola-Mode, Processor-Write-Timing Asynchronous Motorola-Mode, Processor-Read-TimingXCS Xdsack Pulse 48 MHz Serial Bus InterfaceHousing PQFP-44 Housing SPC3 Hardware Description 14.15 Symbol Min Typ Max AMI-Vers13.65 13.90TXD Profibus InterfacePin Assignment RTSSN65ALS1176 Example for the RS 485 InterfaceTechnical contact person at ComDeC in Germany AppendixAddresses Profibus User Organisation10.3.2 SPC3 ST General Definition of TermsOrdering of ASICs 10.3.1 SPC3 AMIStatdiag Appendix a Diagnostics Processing in Profibus DPDiagnostics Bits and Expanded Diagnostics IntroductionIdentifier Byte 7 has Etc Identifier Byte 0 has Combi Diagnostics Processing from the System ViewSingle Diagnostics Simatic S5 / COM ETData format in the Siemens PLC Simatic Appendix B Useful InformationPage Siemens Aktiengesellschaft