Ejemplo n.º 1
0
        /// <summary>
        /// Start to sweep reference data
        /// </summary>
        /// <param name="Channel"></param>
        /// <returns></returns>
        public Task StartSweepReference()
        {
            PLC.ClearReferenceData();
#if FAKE_REF
            for (var lambda = Config.SweepStart; lambda <= Config.SweepEnd; lambda += Config.SweepStep)
            {
                lambda = Math.Round(lambda, 3);
                //this.PLC.AddReferenceData(lambda, new List<double>(new double[] { 1.6, 1.6, 1.6, 1.6 }));
                this.PLC.AddReferenceData(lambda, new List <double>(new double[] { 0.1, 0.1, 0.1, 0.1 }));
            }
            return(Task.Run(() => { }));
#else
            return(SweepAsync((lambda, list) =>
            {
#if !FAKE_ME
                this.PLC.AddReferenceData(lambda, list);
#else
                this.PLC.AddReferenceData(lambda, new List <double>(new double[] { 4, 4, 4, 4 }));
#endif
            }));
#endif
        }