station.yaml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. # 默认工位配置
  2. # 单工位
  3. station:
  4. mode: single
  5. name: 正面装配
  6. stations:
  7. - code: OP150A
  8. line_sn: XT
  9. server:
  10. ip: 192.168.112.99
  11. tcp_port: 3000
  12. http_port: 8980
  13. heart_beat_cycle: 60
  14. workflow:
  15. # 提交模式:manual=手动点OK/NG,auto=自动提交
  16. submit_mode: auto
  17. # 功能开关(yaml为默认值,运行时可在"设置→工艺流程配置"勾选,写入config/project_config.json覆盖)
  18. features:
  19. cold_plate: true # 扫+校验冷板码
  20. bottom_plate: false # 扫+校验底护板码
  21. riveting: true # 拉铆流程(心跳+计数+等待完成+停心跳)
  22. prod_params: true # 拉铆过程参数采集(device.prod_params 生效状态受此开关控制)
  23. steps:
  24. - id: scan_product
  25. name: 扫描工件码
  26. # 前缀由"项目"决定(设置→切换项目),此处的 prefix 仅作 fallback
  27. config:
  28. prefix: "+KB24"
  29. - id: check_quality
  30. name: 质量检查
  31. craft: "100000" # 质量检查工艺号
  32. # ========== 冷板(feature: cold_plate) ==========
  33. - feature: cold_plate
  34. steps:
  35. - id: scan_material
  36. name: 扫描冷板码
  37. config:
  38. label: 冷板码
  39. prefix: "+KA94" # fallback,实际前缀由项目决定
  40. - id: validate_material
  41. name: 校验冷板码
  42. config:
  43. craft: "400004"
  44. # ========== 底护板(feature: bottom_plate) ==========
  45. - feature: bottom_plate
  46. steps:
  47. - id: scan_material
  48. name: 扫描底护板码
  49. config:
  50. label: 底护板码
  51. prefix: "+KB77" # fallback,实际前缀由项目决定
  52. - id: validate_material
  53. name: 校验底护板码
  54. config:
  55. craft: "400004"
  56. # ========== 拉铆(feature: riveting) ==========
  57. - feature: riveting
  58. steps:
  59. - id: start_heartbeat
  60. name: 启动心跳
  61. - id: reset_device_count
  62. name: 重置设备计数
  63. config:
  64. address: 8
  65. value: 1
  66. clear_addresses:
  67. - { address: 66, value: 0 }
  68. - { address: 68, value: 0 }
  69. - { address: 70, value: 0 }
  70. - id: wait_device_complete
  71. name: 等待拉铆完成
  72. - id: stop_heartbeat
  73. name: 停止心跳
  74. - id: upload_result
  75. name: 上传结果
  76. - id: reset_station
  77. name: 重置工位
  78. device:
  79. enabled: true
  80. type: modbus_tcp
  81. connect_timeout: 3000
  82. connections:
  83. - station_index: 0
  84. ip: 192.168.0.6 # 运行时可在"设置→修改拉铆设备IP"修改
  85. port: 502
  86. timeout_enabled: true
  87. heartbeat_address: 4160
  88. ready_signal_address: 8
  89. # 心跳配置
  90. heartbeat:
  91. enabled: true
  92. address: 4160 # 心跳值寄存器(MES 写入 1/2/3 循环)
  93. interval: 500 # 心跳周期(ms)
  94. timeout_address: 4170 # 心跳超时阈值寄存器
  95. timeout_value: 10 # 超时阈值(单位100ms,10=1秒)
  96. complete_condition:
  97. type: count
  98. # 拉铆过程参数采集(enabled 最终由 features.prod_params 决定)
  99. prod_params:
  100. enabled: true
  101. fout_address: 4112 # 力输出值 F-out
  102. sout_address: 4120 # 行程输出值 S-out
  103. fmin_address: 4116 # 力最小值 F-min
  104. smin_address: 4126 # 行程最小值 S-min
  105. fmax_address: 4114 # 力最大值 F-max
  106. smax_address: 4124 # 行程最大值 S-max
  107. qty_address: 4 # 数量寄存器地址(Int16)
  108. upload_interval: 60 # 上传间隔(秒)
  109. ui:
  110. # 设备信息行(最多2行)
  111. device_info_rows:
  112. - label: "A"
  113. connection_index: 0
  114. preset_address: 4534
  115. finished_address: 66
  116. show_material_input: false
  117. material_label: 冷板码