Ejemplo n.º 1
0
        public byte[] deltaCmdSendByte(byte[] byteDelta)
        {
            string str = DataProcess.byteToHexStr(byteDelta);

            byte[]      array   = System.Text.Encoding.ASCII.GetBytes(str);
            List <byte> cmdbyte = new List <byte>();

            cmdbyte.Add(0x3A);
            cmdbyte.AddRange(array);
            cmdbyte.Add(0x0d);
            cmdbyte.Add(0x0a);

            return(cmdbyte.ToArray());
        }
Ejemplo n.º 2
0
        //临时打包命令 读取D区
        private void tempDPack()
        {
            List <int> addrLst    = new List <int>();
            List <int> idLst      = new List <int>();
            List <int> addrcount  = new List <int>();
            List <int> breakPoint = new List <int>();

            addrLst.Add(0);
            //addrLst.Add(1);
            //addrLst.Add(5);
            //addrLst.Add(6);

            idLst.Add(DeltaPlcCommand.Delta_D_ID);
            //idLst.Add(DeltaPlcCommand.Delta_D_ID);
            //idLst.Add(DeltaPlcCommand.Delta_D_ID);
            //idLst.Add(DeltaPlcCommand.Delta_D_ID);

            plccmd.PackDelta10(addrLst, idLst);

            string str = DataProcess.byteToHexStr(plccmd.byteDelta10);
        }