Exemple #1
0
 public SGSet(ILCard502 _lcard, SignalListDef _SL, DOnPr _OnPr = null)
 {
     lcard_local = false;
     lcard       = _lcard;
     gspf        = new GSPF(OnPr);
     SL          = _SL;
 }
Exemple #2
0
        static bool CheckDTypeSize0(bool _need, L502Ch _channel, ILCard502 _lcard)
        {
            if (_lcard == null)
            {
                return(false);
            }
            bool   ret    = false;
            double LevelD = ParAll.SG.LevelD;
            double v      = _lcard.GetValueV(_channel, ParAll.ST.Defect.Cross.L502, ref ret);

            if (!ret)
            {
                return(false);
            }
            if (_need)
            {
                if (v >= LevelD)
                {
                    return(true);
                }
            }
            else
            {
                if (v < LevelD)
                {
                    return(true);
                }
            }
            return(false);
        }
Exemple #3
0
 public SGSet(SignalListDef _SL, DOnPr _OnPr = null)
 {
     lcard_local = true;
     OnPr        = _OnPr;
     lcard       = LoadLCard(_OnPr);
     gspf        = new GSPF(OnPr);
     SL          = _SL;
 }
Exemple #4
0
 public JWorkSG(Bank _bank, SignalListDef _SL, ILCard502 _lcard, bool _restart, DOnStatus _OnStatus = null)
 {
     bank       = _bank;
     SL         = _SL;
     restart    = _restart;
     OnStatus   = _OnStatus;
     IsComplete = false;
     sgSet      = new SGSet(_lcard, _SL, pr);
     SGSet.SaveParsToDB();
     J.Add(jDemagnetizer = new JDemagnetizer(ParAll.ST.Defect.Demagnetizer, ParAll.CTS.DemagnetizerTS, false));
 }
Exemple #5
0
        public static bool SCheckDTypeSize(ILCard502 _lcard = null)
        {
            if (_lcard != null)
            {
                return(CheckDTypeSize0(_lcard));
            }
            ILCard502 l   = LoadLCard();
            bool      ret = CheckDTypeSize0(l);

            l.Dispose();
            return(ret);
        }
Exemple #6
0
 public void Dispose()
 {
     if (lcard != null)
     {
         lcard.Dispose();
         lcard = null;
     }
     if (gspf != null)
     {
         gspf.Dispose();
         gspf = null;
     }
 }
Exemple #7
0
 static bool CheckDTypeSize0(ILCard502 _lcard)
 {
     Thread.Sleep(50);
     if (!CheckDTypeSize0(ParAll.CTS.Cross.SG.Sensors.D0, ParAll.SG.Sensor_D0, _lcard))
     {
         return(false);
     }
     if (!CheckDTypeSize0(ParAll.CTS.Cross.SG.Sensors.D1, ParAll.SG.Sensor_D1, _lcard))
     {
         return(false);
     }
     if (!CheckDTypeSize0(ParAll.CTS.Cross.SG.Sensors.D2, ParAll.SG.Sensor_D2, _lcard))
     {
         return(false);
     }
     return(true);
 }
Exemple #8
0
        public JCollect(Bank _bank, EUnit _Tp, cIW _IW)
        {
            bank = _bank;
            IW   = _IW;
            Tp   = _Tp;
#if LCARD_VIRTUAL
            lcard = new L502virtual();
#else
            if (Tp == EUnit.Cross)
            {
                lcard = new LCard502(ParAll.ST.Defect.Cross.L502, pr);
            }
            else if (Tp == EUnit.Line)
            {
                lcard = new LCard502E(ParAll.ST.Defect.Line.L502, pr);
            }
#endif
            started   = false;
            LastError = null;
            LastExec  = Environment.TickCount;
        }