Exemplo n.º 1
0
        private void ShowIVCurves(double ioc, double ipm, double vpm, double voc)
        {
            I_V_Point[] oriPointArray = new I_V_Point[3];
            I_V_Point   ivp           = new I_V_Point(ioc, 0);

            oriPointArray[0] = ivp;
            ivp = new I_V_Point(ipm, vpm);
            oriPointArray[1] = ivp;
            ivp = new I_V_Point(0, voc);
            oriPointArray[2] = ivp;
            ivCurves1.SetOriginalPoints(oriPointArray, true);
        }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            I_V_Point[] oriPointArray = new I_V_Point[3];
            I_V_Point   ivp           = new I_V_Point(8.97, 0);

            oriPointArray[0] = ivp;
            ivp = new I_V_Point(8.42, 30.73);
            oriPointArray[1] = ivp;
            ivp = new I_V_Point(0, 38.08);
            oriPointArray[2] = ivp;
            ivCurves1.SetOriginalPoints(oriPointArray, true);
        }
Exemplo n.º 3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="ioc"></param>
 /// <param name="ipm"></param>
 /// <param name="vpm"></param>
 /// <param name="voc"></param>
 /// <param name="oriPointArray">add by genhong.hu On 2017-12-31 </param>
 private void ShowIVCurves(double ioc, double ipm, double vpm, double voc, string LotID = "", I_V_Point[] oriPointArray = null)
 {
     if (oriPointArray == null || oriPointArray.Length < 4) // 4 个 以下用 ico、ipm、vpm、voc
     {
         oriPointArray = new I_V_Point[3];
         I_V_Point ivp = new I_V_Point(ioc, 0);
         oriPointArray[0] = ivp;
         ivp = new I_V_Point(ipm, vpm);
         oriPointArray[1] = ivp;
         ivp = new I_V_Point(0, voc);
         oriPointArray[2] = ivp;
     }
     ivCurves1.SetOriginalPoints(oriPointArray, true, LotID);
 }
Exemplo n.º 4
0
        public ModuleInfo ParserTagData(byte[] tagBuff)
        {
            try
            {
                MemoryStream memStream  = new MemoryStream(tagBuff);
                BinaryReader buffReader = new BinaryReader(memStream);

                if (buffReader.ReadString() != "@@")
                {
                    throw new Exception("数据包开始标志出错");
                }

                //string customer = buffReader.ReadString();
                string  strProductType = buffReader.ReadString();
                string  strModule_ID   = buffReader.ReadString();
                string  mfg_country    = buffReader.ReadString();
                string  mfg_name       = buffReader.ReadString();
                string  packingDate    = buffReader.ReadString();
                decimal dPmax          = (decimal)buffReader.ReadInt32() / 100M;
                decimal dVoc           = (decimal)buffReader.ReadInt16() / 100M;
                decimal dIsc           = (decimal)buffReader.ReadInt16() / 100M;
                decimal dVpm           = (decimal)buffReader.ReadInt16() / 100M;
                decimal dIpm           = (decimal)buffReader.ReadInt16() / 100M;
                decimal ff             = (decimal)buffReader.ReadInt16() / 100M;
                string  cell_mfg_name  = buffReader.ReadString();
                string  cell_mfg_date  = buffReader.ReadString();
                //string cell_source_country = buffReader.ReadString();
                //string iso_9000_date = buffReader.ReadString();
                //string iso_9000_name = buffReader.ReadString();
                //string iso_14000_date = buffReader.ReadString();
                //string iso_14000_name = buffReader.ReadString();
                //string polarity_of_terminal = buffReader.ReadString();
                string iec_date  = buffReader.ReadString();
                string iec_verfy = buffReader.ReadString();
                //string max_sys_vol = buffReader.ReadString();

                string packetEnd = buffReader.ReadString();

                if (packetEnd != "##")
                {
                    throw new Exception("数据包结束标志出错");
                }
                else
                {
                    ModuleInfo rfidTag = new ModuleInfo();
                    //rfidTag.customer = customer;
                    rfidTag.ProductType = strProductType;
                    rfidTag.mfg_country = mfg_country;
                    rfidTag.Module_ID   = strModule_ID;
                    rfidTag.PackedDate  = packingDate;
                    rfidTag.Pmax        = dPmax.ToString();
                    rfidTag.Voc         = dVoc.ToString();
                    rfidTag.Isc         = dIsc.ToString();
                    rfidTag.Vpm         = dVpm.ToString();
                    rfidTag.Ipm         = dIpm.ToString();
                    rfidTag.FF          = ff.ToString();
                    rfidTag.mfg_name    = mfg_name;

                    //rfidTag.polarity_of_terminal = polarity_of_terminal;
                    rfidTag.cell_mfg_name = cell_mfg_name;
                    rfidTag.cell_mfg_date = cell_mfg_date;
                    //rfidTag.cell_supplier_country = cell_source_country;

                    //rfidTag.iso_9000_date = iso_9000_date;
                    //rfidTag.iso_9000_name = iso_9000_name;
                    //rfidTag.iso_14000_date = iso_14000_date;
                    //rfidTag.iso_14000_name = iso_14000_name;

                    rfidTag.iec_date  = iec_date;
                    rfidTag.iec_verfy = iec_verfy;

                    //rfidTag.max_system_voltage = max_sys_vol;
                    //rfidTag.cell_supplier_country = cell_source_country;


                    //rfidTag.iso = ms_iso;
                    //rfidTag.mfg_name = ms_cfg_mfg_name;

                    //SetRFIDConstants(customer);


                    return(rfidTag);
                }


                short       length     = buffReader.ReadInt16();
                I_V_Point[] pointArray = new I_V_Point[length];
                for (int i = 0; i < length; i++)
                {
                    pointArray[i]         = new I_V_Point();
                    pointArray[i].Current = buffReader.ReadInt32() * 1.0 / 10000000;
                    pointArray[i].Voltage = buffReader.ReadInt32() * 1.0 / 10000000;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("解析数据包出错:\r\n" + ex.Message);
                return(null);
            }
        }