profibus GSD文件詳解
2015-6-19
?? 通過PROFIBUS?
?
GSD文件說明
?
1. GSD 文件簡介
????? PRO FlBUS 設備具有不同的性能特點,為達到PROFIBUS 簡單的即插即用配置.PROFIBUS設備的特性均在電子設備數據庫文件(GSD)中具體說明。標準化的GSD 數據將通信擴大到操作員控制級。使用基于GSD的組態工具可將不同廠商生產的設備集成在同一總線系統中.既簡單又是對用戶友好的。
2 .GSD 文件的組成
GSD 文件可以分為三個部分:
???? 一般規范 這部分包括生產廠商和設備的名稱,硬件和軟件的版本狀況,支持的波特率一可能的監視時間問隔以及總線插頭的信號分配;
????? 與DP 主站有關的規范這部分包括只運用于DP 主站的各項參數(如連接從站的最多臺數或上裝和下裝能力)。這一部分對從站沒有規定;
????? 與DP 從站有關的規范 這部分包括與從站有關的一切規范(如輸入/輸出通道的數量和類型、中斷測試的規范以及輸入/輸出數據一致性的信息)。
3 GSD 文件格式
??????? GSD 文件是ASCII 文件.可以用任何一種ASCII 編輯囂編輯 如計事本、UltraEdit 等,也可使用PROFIBus 用戶組織提供的編輯程序GSDEdit。GSD文件是由若干行組成,每行都用一個關鍵字開頭,包括關鍵字及參數(無符號數或字符串)兩部分。GSD文件中的關鍵字可以是標準關鍵字(在PROFIBUS 標準中定義)或自定義關鍵字。標準關鍵字可以被PROFIBUS的任何組態工具所識別,而自定義關鍵字只能被特定的組態工具識別。
一個GSD 文件的例子如下。
#Pr0fibus DP ;DP 設備的GSD 文件均以此關鍵存在
GSD Revision=1 ;GSD 文件版本
VendorName="Meglev" ;設備制造商
Model Name="DP Slave" ;產品名稱
Revision="Version 01" ;產品版本
RevisionNtmber=01 ;產品版本號(可選)
IdemNumber=0x01 ;產品識別號
StationType=0 ;站類型(0 表示從站)
FMS Supp=0 ;不支持FMS.純DP 從站
Hardware Realease="HW1.0" ;硬件版本
Soltware Realease="SWl.0" ;軟件版本
19.2 supp=l ;支持19.2kbps 波特率
MaxTsdr 9.6=60;9.6kbps 時最大延遲時間
RepeaterCtrl sig=0 ;不提供RTS 信號
24VPins=0 ;不提供24V 電壓
Implementation Type="SPC3" ;采用的解決方案
FreezeMode Supp=0 ;不支持鎖定模式
SyncMode Supp=0 ;不支持同步模式
AutoBaud Supp=l ;支持自動波特率檢測
Set SlaveAdd Supp=0 ;不支持改變從站地址
Fail Safe=0 ;故障安全模式類型
MaxUser PrmDataLen=0 ;最大用戶參數數據長度(0-237)
Usel prmDataLen=0 ;用戶參數長度
Min Slave Imervall=22 ;最小從站響應循環間隔
Modular Station=l ;是否為模塊站
MaxModule=l ;從站最大模塊數
MaxInput Len=8 ;最大輸入數據長度
MaxOutput Len=8 ;最大輸出數據長度
MaxData Len=16 ;最大數據的長度(輸入輸出之和)
MaxDiagData Len=6 ;最大診斷數據長度(6~244)Slave
Family=3 ;從站類型
Module=“Modulel”0x23,0x13;模塊1,輸入輸出各4 字節
EndModule ?
Module="Module2"0x27,0x17;模塊2.輸入輸出各8 字節
EndModule?
####################################
以下的例子是XXX的GSD文件;
;==========================================================
;;===========================================================
;===============================================================================
; Profibus Device Database of HMS Industrial Networks.
;
; Model:?????? Anybus-CC PROFIBUS DP-V1
; Description: Anybus-CC PROFIBUS DP-V1 slave
; Language:??? English
; Author:????? HMS Industrial Networks
; WWW:???????? www.anybus.com
;
; Revision log:
; 1.04?? 2005-05-26 Updated Revision, Software_Release and Model_Name.
;?????????????????? Increased C1_Response_timeout and C2_Response_Timeout.
; 1.03?? 2005-03-14 Updated Revision, Software_Release and Implementation_Type.
; 1.02?? 2004-11-29 Updated Revision, Software_Release, I/O lengths,
;?????????????????? Diag length, C1 and C2 data lengths.
; 1.01?? 2004-10-29 Updated Revision and Implementation_Type.
; 1.00?? 2004-09028 First release
;
;===============================================================================
#Profibus_DP
GSD_Revision??????? = 3
; Device identification
Vendor_Name???????? = "HMS Industrial Networks"
Model_Name????????? = "Anybus-CC PROFIBUS DP-V1"
Revision??????????? = "1.04"
Ident_Number??????? = 0x1811
Protocol_Ident????? = 0??????????????? ; DP protocol
Station_Type??????? = 0??????????????? ; Slave device
FMS_supp??????????? = 0??????????????? ; FMS not supported
Slave_Family??????? = 0??????????????? ; General device
Hardware_Release??? = "Version 1.00"
Software_Release??? = "Version 1.04"
; Supported hardware features
Redundancy????????? = 0??????????????? ; not supported
Repeater_Ctrl_Sig?? = 2??????????????? ; TTL
24V_Pins??????????? = 0??????????????? ; not connected
Implementation_Type = "VPC3+C"
; Supported DP features
Freeze_Mode_supp??? = 1??????????????? ; supported
Sync_Mode_supp????? = 1??????????????? ; supported
Auto_Baud_supp????? = 1??????????????? ; supported
Set_Slave_Add_supp? = 1??????????????? ; supported
Fail_Safe?????????? = 1??????????????? ; supported
; Supported baudrates
9.6_supp??????????? = 1
19.2_supp?????????? = 1
45.45_supp????????? = 1
93.75_supp????????? = 1
187.5_supp????????? = 1
500_supp??????????? = 1
1.5M_supp?????????? = 1
3M_supp???????????? = 1
6M_supp???????????? = 1
12M_supp??????????? = 1
; Maximum responder time for supported baudrates
MaxTsdr_9.6???????? = 15
MaxTsdr_19.2??????? = 15
MaxTsdr_45.45?????? = 15
MaxTsdr_93.75?????? = 15
MaxTsdr_187.5?????? = 15
MaxTsdr_500???????? = 15
MaxTsdr_1.5M??????? = 25
MaxTsdr_3M????????? = 50
MaxTsdr_6M????????? = 100
MaxTsdr_12M???????? = 200
; Maximum polling frequency
Min_Slave_Intervall = 1??????????????? ; 100 us
; I/O related keywords
Modular_Station???? = 1??????????????? ; modular
Max_Module????????? = 152
Max_Input_Len?????? = 152
Max_Output_Len????? = 152
Max_Data_Len??????? = 152
Modul_Offset??????? = 1
; Diagnostic related keywords
User_Prm_Data_Len?? = 3
User_Prm_Data?????? = 0xC0,0x00,0x00
Max_Diag_Data_Len?? = 80
;Status diagnostic messages
Unit_Diag_Area=16-17
Value(0)? = "Status not changed"
Value(1)? = "Status appears"
Value(2)? = "Status disappears"
Unit_Diag_Area_End
Unit_Diag_Area=24-31
Value(0)?? = "Minor, recoverable"
Value(16)? = "Minor, unrecoverable"
Value(32)? = "Major, recoverable"
Unit_Diag_Area_End
Unit_Diag_Area=32-39
Value(16)? = "Generic Error"
Value(32)? = "Current"
Value(33)? = "Current, device input side"
Value(34)? = "Current, inside the device"
Value(35)? = "Current, device output side"
Value(48)? = "Voltage"
Value(49)? = "Mains Voltage"
Value(50)? = "Voltage inside the device"
Value(51)? = "Output Voltage"
Value(64)? = "Temperature"
Value(65)? = "Ambient Temperature"
Value(66)? = "Device Temperature"
Value(80)? = "Device Hardware"
Value(96)? = "Device Software"
Value(97)? = "Internal Software"
Value(98)? = "User Software"
Value(99)? = "Data Set"
Value(112) = "Additional Modules"
Value(128) = "Monitoring"
Value(129) = "Communication"
Value(130) = "Protocol Error"
Value(144) = "External Error"
Value(240) = "Additional Functions"
Value(255) = "Device specific"
Unit_Diag_Area_End
; DPV1 related keywords
DPV1_Slave ?? ???????????? = 1
Check_Cfg_Mode????????? = 1
C1_Read_Write_supp????? = 1
C1_Max_Data_Len???????? = 64
C1_Response_Timeout???? = 100? ;1 sec
C2_Read_Write_supp????? = 1
C2_Max_Data_Len???????? = 64
C2_Response_Timeout???? = 100? ;1 sec
C2_Max_Count_Channels?? = 1
Max_Initiate_PDU_Length = 52
; Definition of modules
Module = "Input 1 byte" 0x90?????????? ;Byte, Consistency over whole module
1
EndModule
;
Module = "Input 1 word" 0xD0?????????? ;Word, Consistency over whole module
2
EndModule
;
Module = "Input 2 words" 0xD1????????? ;Word, Consistency over whole module
3
EndModule
;
Module = "Input 4 words" 0xD3????????? ;Word, Consistency over whole module
4
EndModule
;
Module = "Output 1 byte" 0xA0????????? ;Byte, Consistency over whole module
5
EndModule
;
Module = "Output 1 words" 0xE0???????? ;Word, Consistency over whole module
6
EndModule
;
Module = "Output 2 words" 0xE1???????? ;Word, Consistency over whole module
7
EndModule
;
Module = "Output 4 words" 0xE3???????? ;Word, Consistency over whole module
8
EndModule