Exemplo n.º 1
0
        /// <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();
        }
Exemplo n.º 2
0
        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));
        }
Exemplo n.º 3
0
        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));
        }
Exemplo n.º 4
0
        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));
        }