| | |
| | | var (result, value) = modbus.GetDBValue(listPlcDevice.PosType, listPlcDevice.PlcPos); |
| | | if (result.IsSucceed) |
| | | { |
| | | var listPlcStation = _db.Queryable<WcsPosition>().Where(s => s.DeviceId == modPlc.Id).ToList(); |
| | | var listPlcStation = _db.Queryable<WcsPosition>().Where(s => s.DeviceId == listPlcDevice.Id).ToList(); |
| | | var modCarDl = listPlcStation.FirstOrDefault(s => s.Text == "电池电量"); |
| | | var (resultDl, valueDl) = modbus.GetDBValue(modCarDl.PosType, modCarDl.PlcPos); |
| | | if (resultDl.IsSucceed) |
| | | { |
| | | Dictionary<string, string> _dic = new Dictionary<string, string>(); |
| | | _dic.Add(modPlc.Text, valueDl); |
| | | _dic.Add(modPlc.Text, Convert.ToString(valueDl)); |
| | | |
| | | _dicList.Add(_dic); |
| | | } |