pyprofibus.conf 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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. ; The PHY device name/path.
  20. ; Can be a device like /dev/ttyS0 or /dev/ttyAMA0 for 'serial'.
  21. dev=/dev/ttyS0
  22. ; The Profibus on-wire baud rate.
  23. baud=19200
  24. ; FDL protocol layer configuration
  25. [FDL]
  26. ; DP protocol layer configuration
  27. [DP]
  28. ; The master device class. Either 1 or 2.
  29. master_class=1
  30. ; The Profibus address of this device.
  31. master_addr=2
  32. ; ---
  33. ; Slave configurations
  34. ; Add as many [SLAVE_xxx] sections as needed.
  35. ; ---
  36. ; First slave configuration
  37. [SLAVE_0]
  38. ; Optional slave name. Will be stored in slaveConf.name and slaveDesc.name.
  39. ; pyprofibus does not use the name internally.
  40. name=et200s
  41. ; This slave's Profibus address
  42. addr=8
  43. ; The path to the GSD file.
  44. gsd=si03806a.gsd
  45. ; Boolean: Sync mode enabled/available?
  46. sync_mode=1
  47. ; Boolean: Freeze mode enabled/available?
  48. freeze_mode=1
  49. ; 8 bit integer specifying the Profibus group ident mask.
  50. group_mask=1
  51. ; This slave's watchdog timeout, in milliseconds.
  52. watchdog_ms=300
  53. ; Module configuration.
  54. ; For each module plugged into the slave, add a module_xxx
  55. ; entry with the name of the module.
  56. ; The module name must match the name from the GSD file (approximately).
  57. ; The modules are used in the order of the index number.
  58. module_0=6ES7 138-4CA01-0AA0 PM-E DC24V
  59. module_1=6ES7 132-4BB30-0AA0 2DO DC24V
  60. module_2=6ES7 132-4BB30-0AA0 2DO DC24V
  61. module_3=6ES7 131-4BD01-0AA0 4DI DC24V
  62. ; The number of output bytes this slave transmits to the
  63. ; master in Data_Exchange.
  64. ; This usually depends on the modules plugged into the slave.
  65. output_size=2
  66. ; The number of input bytes this slave expects to receive
  67. ; in Data_Exchange.
  68. ; This usually depends on the modules plugged into the slave.
  69. input_size=1
  70. ; Request and interpret a slave diagnosis every n Data_Exchange telegrams.
  71. ; n defaults to 0, which means: Never periodically request diagnosis.
  72. ; If periodic diagnosis is switched off, then diagnostic information will only be requested on faults.
  73. ; Note that input-only slaves (output_size=0) probably need a non-zero diag_period.
  74. diag_period=0