Browse Source

添加plc交互配置

pull/144/head
zhangxin 3 years ago
parent
commit
252e32a126
2 changed files with 28 additions and 1 deletions
  1. +13
    -1
      conf/config.go
  2. +15
    -0
      conf/config.yaml

+ 13
- 1
conf/config.go View File

@ -53,7 +53,19 @@ type EnvConfig struct {
CallOffPlcWrite string `yaml:"calloffplcwrite"` CallOffPlcWrite string `yaml:"calloffplcwrite"`
CallOffPlcWriteLen int `yaml:"calloffplcwritelen"` CallOffPlcWriteLen int `yaml:"calloffplcwritelen"`
CallOffPlcWriteSign string `yaml:"calloffplcwritesign"` CallOffPlcWriteSign string `yaml:"calloffplcwritesign"`
// 南沙 座椅返修
RepairPlcAddress string `yaml:"repairplcaddress"`
RepairPlcType string `yaml:"repairplctype"`
RepairPlcReadSign string `yaml:"repairplcreadsign"`
RepairPlcWrite string `yaml:"repairplcwrite"`
RepairPlcWriteLen int `yaml:"repairplcwritelen"`
// 南沙 座椅数据回写
BackFlushPlcAddress string `yaml:"backflushaddress"`
BackFlushPlcType string `yaml:"backflushplctype"`
BackFlushPlcReadSign string `yaml:"backflushreadsign"`
BackFlushPlcWriteSign string `yaml:"backflushwritesign"`
BackFlushPlcReadData string `yaml:"backflushreaddata"`
BackFlushPlcReadLen int `yaml:"backflushreadlen"`
} }
//read yaml config //read yaml config


+ 15
- 0
conf/config.yaml View File

@ -55,3 +55,18 @@ calloffplcreadsign: DB2.54.2
calloffplcwrite: DB2.56 calloffplcwrite: DB2.56
calloffplcwritelen: 50 calloffplcwritelen: 50
calloffplcwritesign: DB2.54.0 calloffplcwritesign: DB2.54.0
# 南沙座椅返修PLC配置
repairplcaddress: 10.207.0.3
repairplctype: S1500
repairplcreadsign: DB2.54.2
repairplcwrite: DB2.56
repairplcwritelen: 50
# 南沙座椅数据回写
backflushplctype: S1500
backflushaddress: 10.207.0.3
backflushreadsign: DB2.54.2
backflushreaddata: DB2.54.2
backflushwritesign: DB2.54.2
backflushreadlen: 50

Loading…
Cancel
Save