/// <summary> /// ocv检测 /// </summary> /// <param name="bytes"></param> public void CheckOCVTest(byte[] bytes) { string dxQrcode = ConvertHelper.ByteToString(bytes, 500, 80); if (dxQrcode.Length < 24) { myopcHelper.SendErrorsCode(23); messagaBLL.WriteMessage("发送错误代码:23", StnModel.StationCode, 23); } float dxvol = ConvertHelper.ByteArrtoFolat(bytes, 580); int res = prodbll.GetDianXinOCVTestResult(StnModel.StationCode, dxQrcode, dxvol); if (res != 0) { myopcHelper.SendOCV_NGCmd(); myopcHelper.SendErrorsCode((byte)res); messagaBLL.WriteMessage("发送OCV测试NG", StnModel.StationCode, res); } else { myopcHelper.SendOCV_OKCmd(); myopcHelper.SendErrorsCode((byte)res); messagaBLL.WriteMessage("发送OCV测试合格", StnModel.StationCode, res); } // myopcHelper.SendOCV_NGCmd(); }
public string ReadQRCodeData() { string readDb = MyStationModel.DataReadDB; NodeIdCollection readNode = new NodeIdCollection(); readNode.Add(new NodeId(readDb + ".380" + ",b," + 64, ServerIndex));//读取二维码 DataValueCollection valuecoll = new DataValueCollection(); MyServer.ReadValues(readNode, out valuecoll); byte[] bArray = (byte[])valuecoll[0].Value; return(ConvertHelper.ByteToString(bArray, 0, 64)); }
public string ReadOperatorNum() { string readDb = MyStationModel.DataReadDB; NodeIdCollection readNode = new NodeIdCollection(); readNode.Add(new NodeId(readDb + ".362" + ",b," + 10, ServerIndex));//读取安东物料号 DataValueCollection valuecoll = new DataValueCollection(); MyServer.ReadValues(readNode, out valuecoll); byte[] bArray = (byte[])valuecoll[0].Value; return(ConvertHelper.ByteToString(bArray, 0, 10)); }
public string ReadPackID() { string readDb = MyStationModel.DataReadDB; NodeIdCollection readNode = new NodeIdCollection(); readNode.Add(new NodeId(readDb + ".120" + ",b," + 70, ServerIndex));//读取packid DataValueCollection valuecoll = new DataValueCollection(); MyServer.ReadValues(readNode, out valuecoll); byte[] bArray = (byte[])valuecoll[0].Value; return(ConvertHelper.ByteToString(bArray, 0, 70)); }