example_dummy_inputonly.conf 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. ; ----------------------------------------------- ;
  2. ; ;
  3. ; PROFIBUS configuration ;
  4. ; ;
  5. ; This file configures a pyprofibus instance. ;
  6. ; ;
  7. ; ----------------------------------------------- ;
  8. ; General settings
  9. [PROFIBUS]
  10. ; Enable/disable debug mode.
  11. ; 0 -> no debugging.
  12. ; 1 -> DP debugging.
  13. ; 2 -> DP and PHY debugging.
  14. debug=1
  15. ; PHY protocol layer configuration
  16. [PHY]
  17. ; The PHY layer driver type.
  18. ;type=serial
  19. ;type=fpga
  20. type=dummy_slave
  21. ; Only for type=serial:
  22. ; The PHY device name/path.
  23. ; Can be a device like /dev/ttyS0 or /dev/ttyAMA0
  24. dev=/dev/ttyS0
  25. ; Only for type=serial:
  26. ; Serial line flow control and handshaking
  27. rtscts=False
  28. dsrdtr=False
  29. ; Only for type=fpga:
  30. ; SPI bus (to PHY FPGA) configuration.
  31. spiBus=0
  32. spiCS=0
  33. spiSpeedHz=2500000
  34. ; The Profibus on-wire baud rate.
  35. ;baud=9600
  36. baud=19200
  37. ;baud=45450
  38. ;baud=93750
  39. ;baud=187500
  40. ;baud=500000
  41. ;baud=1500000
  42. ;baud=3000000
  43. ;baud=6000000
  44. ;baud=12000000
  45. ; FDL protocol layer configuration
  46. [FDL]
  47. ; DP protocol layer configuration
  48. [DP]
  49. ; The master device class. Either 1 or 2.
  50. master_class=1
  51. ; The Profibus address of this device.
  52. master_addr=2
  53. ; ---
  54. ; Slave configurations
  55. ; Add as many [SLAVE_xxx] sections as needed.
  56. ; ---
  57. ; First slave configuration
  58. [SLAVE_0]
  59. ; Optional slave name. Will be stored in slaveConf.name and slaveDesc.name.
  60. ; pyprofibus does not use the name internally.
  61. name=first
  62. ; This slave's Profibus address
  63. addr=8
  64. ; The path to the GSD file.
  65. gsd=../misc/dummy_modular.gsd
  66. ; Boolean: Sync mode enabled/available?
  67. sync_mode=1
  68. ; Boolean: Freeze mode enabled/available?
  69. freeze_mode=1
  70. ; 8 bit integer specifying the Profibus group ident mask.
  71. group_mask=1
  72. ; This slave's watchdog timeout, in milliseconds.
  73. watchdog_ms=300
  74. ; Module configuration.
  75. ; For each module plugged into the slave, add a module_xxx
  76. ; entry with the name of the module.
  77. ; The module name must match the name from the GSD file (approximately).
  78. ; The modules are used in the order of the index number.
  79. module_0=dummy output module
  80. module_1=dummy output module
  81. module_2=dummy input module
  82. ; The number of output bytes this slave transmits to the
  83. ; master in Data_Exchange.
  84. ; This usually depends on the modules plugged into the slave.
  85. output_size=0
  86. ; The number of input bytes this slave expects to receive
  87. ; in Data_Exchange.
  88. ; This usually depends on the modules plugged into the slave.
  89. input_size=2
  90. ; Request and interpret a slave diagnosis every n Data_Exchange telegrams.
  91. ; n defaults to 0, which means: Never periodically request diagnosis.
  92. ; If periodic diagnosis is switched off, then diagnostic information will only be requested on faults.
  93. ; Note that input-only slaves (output_size=0) probably need a non-zero diag_period.
  94. diag_period=16