Exemplo n.º 1
0
        public static string WriteRemainQL(string str)
        {
            byte[] databuff = new byte[3];
            byte[] buff     = new byte[6];
            string f_i      = "";
            string data     = "";

            f_i   = LConvert.float_int(str);
            data  = LConvert.int_hex(f_i);
            icdev = IC.ic_init(1, 9600);
            buff  = System.Text.Encoding.ASCII.GetBytes(data);
            IC.asc_hex(buff, databuff, 6);
            st = IC4442.swr_4442(icdev, 61, 3, databuff);
            if (st == 0)
            {
                return("写数据成功!" + data);
            }
            else
            {
                return("写数据失败!" + data);
            }
        }