GSD文件简介

来源:互联网 发布:电子表格办公软件2007 编辑:程序博客网 时间:2024/06/06 01:34

西门子的PLC采用GSD文件进行接口通信配置,使得不需要更改任何硬件的情况,可以满足客户的诸多需求。

GSD即电子设备数据库文件,用于Profibus-Dp主站与从站交换数据时的参考数据,当主站与从站使用简介组态时,可以利用组态工具存取当前的参数和有关DP从站的GSD数据(电子设备数据库文件)?。

GSD 文件的组成:

  1. 一般规范 这部分包括生产厂商和设备的名称,硬件和软件的版本状况,支持的波特率一可能的监视时间问隔
  2. 与DP 主站有关的规范这部分包括只运用于DP 主站的各项参数(如连接从站的最多台数或上装和下装能力)。这一部分对从站没有规定;
  3. 与DP 从站有关的规范 这部分包括与从站有关的一切规范(如输入/输出通道的数量和类型、中断测试的规范以及输入/输出数据一致性的信息)。

GSD文件规范:
在GSD文件中,“;”作为注释符。#Profibus_D作为文件正式开头。
GSD_Revision——GSD文件的版本ID
Vendor_Name——制造商名字
Model_Name——制造商所设计的DP设备名字
Revision——DP设备的版本号
Ident_Number——DP设备的设备类型
Protocol_Ident——DP设备的协议ID
Station_Type——DP设备类型
Hardware_Release——该DP设备的硬件版本
Software_Release——该DP设备的软件版本
9.6_supp:(选项组)
19.2_supp:
31.25_supp:(GSDv2增加)
45.45_supp:(GSDv2增加)
93.75_supp:
187.5_supp:
500_supp:
1.5M_supp:
3M_supp:(GSDv1增加)
6M_supp:(GSDv1增加)
12M_supp:(GSDv1增加) ——DP设备是否支持xxx波特率

MaxTsdr_9.6:(选项组)
MaxTsdr_19.2:
MaxTsdr_31.25:(GSDv2增加)
MaxTsdr_45.45:(GSDv2增加)
MaxTsdr_93.75:
MaxTsdr_500:
MaxTsdr_1.5M:
MaxTsdr_3M:(GSDv1增加)
MaxTsdr_6M:(GSDv1增加)
MaxTsdr_12M:(GSDv1增加) ——在xxx波特率下,从站响应一个请求消息所需要的最大时间。(参阅EN50170 8-2 部分 8.8条款)。(注意:为了保证可靠性,此参数必须与设备实际支持的数值一致)

Redundancy:(默认) ——设备是否支持冗余传输机制。
Repeater_Ctrl_Sig:(默认)——Here, the level of the bus connector signal CNTR-P is specified——0: Not connected, 1: RS485, 2:TTL
24V_Pins:(默认)——Here, the meaning of the bus connector signal M24V and P24V is specified——0: Not connected, 1:Input, 2:Output
Implementation_Type——描述了DP从站使用了哪些标准实现。比如,软件标准,控制器或是ASIC方案。此描述由标准方案提供商给出,GSD规范里也要遵从它。(例:“SPC3”)
Bitmap_Device——用于一般情况下,代表设备特征的位图文件的文件名。格式为.DIB,70*40像素(宽高)
Bitmap_SF——用于特殊运行情况下,代表设备特征的位图文件的文件名。格式为.DIB,70*40像素(宽高)
Bitmap_Diag——用于诊断情况下,代表设备特征的位图文件的文件名。格式为.DIB,70*40像素(宽高)
OrderNumber——规格?产品序列号,可按用户名修改
Freeze_Mode_supp——DP设备是否支持冻结模式。支持此模式的DP从站要保证在冻结控制命令之后的下一个数据周期开始,传入值要冻结在最后的状态。
Sync_Mode_supp——DP设备是否支持同步模式
Auto_Baud_supp——DP设备是否支持自动检测识别总线的波特率
Min_Slave_Intervall——两个DP设备列表周期间最小的时间间隔
Fail_Safe——DP device with fail safe workaround
Slave_Family——组态中的分类名
Max_Diag_Data_Len——诊断信息的最大长度
Modul_Offset——第一个插槽号进行配置
Modular_Station——紧凑型从站
Max_Module——模块的最大数量
Max_Input_Len——输入数据的最大长度
Max_Output_Len——输出数据的最大长度
Max_Data_Len——输入输出数据的最大长度
User_Prm_Data_Len——Length of User_Param_Data
;— Module-Definitions —
Module——I/O配置数据,与初始化报文中的CFG一致
EndModule

一个例子:

;==========================================================; GSD File  for SINEC CP 342-5       SIEMENS AG; MLFB  : 6GK7 342-5DA03-0XE0;; Dated   : 20.04.2010 V1.0 RT; File    : SI0180D6.GSD;===========================================================#Profibus_DPGSD_Revision=4                         ; Version ID of the GSD file formatVendor_Name="SIEMENS"                  ; Manufacturer's nameModel_Name="CP 342-5 DA03"             ; Manufacturer's designation of DP deviceRevision="V1.0"                        ; Revision version of the DP deviceIdent_Number=0x80D6                    ; Device type of the DP deviceProtocol_Ident=0                       ; Protocol ID of the DP device                                       ; 0 : PROFIBUS DPStation_Type=0                         ; DP device type                                       ; 0 : DP SlaveHardware_Release="V 1.0"               ; Hardware release of the DP deviceSoftware_Release="V 6.0"               ; Software release of the DP device;;9.6_supp=119.2_supp=145.45_supp=193.75_supp=1187.5_supp=1500_supp=11.5M_supp=13M_supp=16M_supp=112M_supp=1;MaxTsdr_9.6=60MaxTsdr_19.2=60MaxTsdr_45.45=250MaxTsdr_93.75=60MaxTsdr_187.5=60MaxTsdr_500=100MaxTsdr_1.5M=150MaxTsdr_3M=250MaxTsdr_6M=450MaxTsdr_12M=800;;Implementation_Type="SOC1"                   ; String (32)Bitmap_Device="SI9001TN"                     ; (*.DIB) (70x40 pixels 16 colors);; Slave-Specification:OrderNumber="6GK7 342-5DA03-0XE0"            ; Spec?;; Basic DP-Slave Related Key WordsAuto_Baud_supp=0                             ; DP device supports automatic baudrateUser_Prm_Data_Len=3                          ; Length of User_Param_DataUser_Prm_Data = 0x40,0x00,0x00               ; Default value of User_Param_DataMin_Slave_Intervall=6                        ; Min interval between two slave list                                             ; cycles;Modular_Station=1                            ; DP device is a modular stationMax_Module=63                                ; Max modules of a modular stationMax_Input_Len=240                            ; Max length of input dataMax_Output_Len=240                           ; Max length of output dataMax_Data_Len=480                             ; Max length of input and output data;Freeze_Mode_supp=1                           ; The DP device supports the Freeze modeSync_Mode_supp=1                             ; The DP device supports the Sync mode;Fail_Safe=1                                  ; DP device with fail safe workaroundMax_Diag_Data_Len=6                          ; Max length of diagnostic informationModul_Offset=1                               ; First slot number to configuringSlave_Family=3@SIMATIC                       ; Function class an family;Info_Text="CP 342-5 as PROFIBUS DP Slave, \ Firmware: V6.0"                             ; String (256) max length of line : 80;;<Module Definition List>;****************************************************************************;                    BYTE MODULES  (special identification formats);****************************************************************************;**************************** I N P U T *************************************;****************************************************************************; Input * Byte Consistentcy* Bytes of Data  * 1..64 bytes;**********************************************************Module = " 1 byte DI / Consistency 1 byte " 0x40,0x001EndModuleModule = " 2 bytes DI / Consistency 1 byte" 0x40,0x012EndModuleModule = " 4 bytes DI / Consistency 1 byte" 0x40,0x033EndModuleModule = " 8 bytes DI / Consistency 1 byte" 0x40,0x074EndModuleModule = "16 bytes DI / Consistency 1 byte" 0x40,0x0F5EndModuleModule = "32 bytes DI / Consistency 1 byte" 0x40,0x1F6EndModuleModule = "64 bytes DI / Consistency 1 byte" 0x40,0x3F7EndModule;**********************************************************; Input * Total Consistency * Bytes of Daten * 1..64 bytes;**********************************************************Module = " 1 byte DI / Total consistency  " 0x40,0x8011EndModuleModule = " 2 bytes DI / Total consistency " 0x40,0x8112EndModuleModule = " 4 bytes DI / Total consistency " 0x40,0x8313EndModuleModule = " 8 bytes DI / Total consistency " 0x40,0x8714EndModuleModule = "16 bytes DI / Total consistency " 0x40,0x8F15EndModuleModule = "32 bytes DI / Total consistency " 0x40,0x9F16EndModuleModule = "64 bytes DI / Total consistency " 0x40,0xBF17EndModule;**********************************************************; Input * Word Consistency * Words of Data * 1..64 words;**********************************************************Module = " 1 word AI / Consistency 1 word " 0x40,0x4021EndModuleModule = " 2 words AI / Consistency 1 word" 0x40,0x4122EndModuleModule = " 4 words AI / Consistency 1 word" 0x40,0x4323EndModuleModule = " 8 words AI / Consistency 1 word" 0x40,0x4724EndModuleModule = "16 words AI / Consistency 1 word" 0x40,0x4F25EndModuleModule = "32 words AI / Consistency 1 word" 0x40,0x5F26EndModuleModule = "64 words AI / Consistency 1 word" 0x40,0x7F27EndModule;**********************************************************; Input * Total Consistency * Words of Data * 1..64 words;**********************************************************Module = " 1 word AI / Total consistency  " 0x40,0xC031EndModuleModule = " 2 words AI / Total consistency " 0x40,0xC132EndModuleModule = " 4 words AI / Total consistency " 0x40,0xC333EndModuleModule = " 8 words AI / Total consistency " 0x40,0xC734EndModuleModule = "16 words AI / Total consistency " 0x40,0xCf35EndModuleModule = "32 words AI / Total consistency " 0x40,0xDF36EndModuleModule = "64 words AI / Total consistency " 0x40,0xFF37EndModule;****************************************************************************;**************************** O U T P U T ***********************************;****************************************************************************; Output * Byte Consistency * Bytes of Data * 1..64 bytes;**********************************************************Module = " 1 byte DO / Consistency 1 byte " 0x80,0x0041EndModuleModule = " 2 bytes DO / Consistency 1 byte" 0x80,0x0142EndModuleModule = " 4 bytes DO / Consistency 1 byte" 0x80,0x0343EndModuleModule = " 8 bytes DO / Consistency 1 byte" 0x80,0x0744EndModuleModule = "16 bytes DO / Consistency 1 byte" 0x80,0x0F45EndModuleModule = "32 bytes DO / Consistency 1 byte" 0x80,0x1F46EndModuleModule = "64 bytes DO / Consistency 1 byte" 0x80,0x3F47EndModule;**********************************************************; Output * Total Consistency * Bytes of Data * 1..64 bytes;**********************************************************Module = " 1 byte DO / Total consistency  " 0x80,0x8051EndModuleModule = " 2 bytes DO / Total consistency " 0x80,0x8152EndModuleModule = " 4 bytes DO / Total consistency " 0x80,0x8353EndModuleModule = " 8 bytes DO / Total consistency " 0x80,0x8754EndModuleModule = "16 bytes DO / Total consistency " 0x80,0x8F55EndModuleModule = "32 bytes DO / Total consistency " 0x80,0x9F56EndModuleModule = "64 bytes DO / Total consistency " 0x80,0xBF57EndModule;**********************************************************; Output * Word Consistency * Words of Data * 1..64 words;**********************************************************Module = " 1 word AO / Consistency 1 word " 0x80,0x4061EndModuleModule = " 2 words AO / Consistency 1 word" 0x80,0x4162EndModuleModule = " 4 words AO / Consistency 1 word" 0x80,0x4363EndModuleModule = " 8 words AO / Consistency 1 word" 0x80,0x4764EndModuleModule = "16 words AO / Consistency 1 word" 0x80,0x4F65EndModuleModule = "32 words AO / Consistency 1 word" 0x80,0x5F66EndModuleModule = "64 words AO / Consistency 1 word" 0x80,0x7F67EndModule;**********************************************************; Output * Total Consistency * Words of Data * 1..64 words;**********************************************************Module = " 1 word AO / Total consistency  " 0x80,0xC071EndModuleModule = " 2 words AO / Total consistency " 0x80,0xC172EndModuleModule = " 4 words AO / Total consistency " 0x80,0xC373EndModuleModule = " 8 words AO / Total consistency " 0x80,0xC774EndModuleModule = "16 words AO / Total consistency " 0x80,0xCf75EndModuleModule = "32 words AO / Total consistency " 0x80,0xDF76EndModuleModule = "64 words AO / Total consistency " 0x80,0xFF77EndModule