Пример #1
0
 public static bool InitHardware()
 {
     HardwareManage.InitHardWare();
     TableManage.InitTables();
     IOManage.InitIOs();
     return(true);
 }
Пример #2
0
        //OUTNum输出多个IO集合
        //
        //

        public bool OUTInput_CheckComb(List <string> OUTNum)//输出多个//
        {
            bool CheckIsOk = false;

            IOManage.OUTPUT("Y轴后模组定位上").SetOutBit(true);
            return(CheckIsOk);
        }
Пример #3
0
        public static bool LoadData()
        {
            HardwareManage.LoadData();
            TableManage.LoadData();
            IOManage.LoadData();
            DataManage.LoadData();
            PathDataManage.InitData();
            BarcodeDataManage.Load();

            return(true);
        }
Пример #4
0
 private void RecieveMessage()
 {
     IOManage.OUTPUT("扫码完成信号").SetOutBit(true);
 }
Пример #5
0
        private void timerScan_Tick(object sender, EventArgs e)
        {
            if (MainModule.FormMain.bAuto)
            {
                if (MainModule.FormMain.Parse == true && showCount == 0)
                {
                    showCount++;
                    buttonStart.Text      = "暂停";
                    buttonStart.BackColor = Color.GreenYellow;
                    // MainModule.FormMain.Parse = false;
                }
                else
                {
                }
                if (bPreAuto == false && MainModule.FormMain.bHomeReady == true)
                {
                    buttonStart.BackColor = Color.Green;
                    //  buttonStart.Text = "启动";
                    buttonStart.ImageIndex = 2;
                    if (IOManage.OutputDrivers.drivers.ContainsKey("START"))
                    {
                        IOManage.OUTPUT("START").SetOutBit(true);
                    }
                    if (IOManage.OutputDrivers.drivers.ContainsKey("STOP"))
                    {
                        IOManage.OUTPUT("STOP").SetOutBit(false);
                    }
                    if (IOManage.OutputDrivers.drivers.ContainsKey("三色灯红"))
                    {
                        IOManage.OUTPUT("三色灯红").SetOutBit(false);
                    }
                    if (IOManage.OutputDrivers.drivers.ContainsKey("三色灯黄"))
                    {
                        IOManage.OUTPUT("三色灯黄").SetOutBit(false);
                    }
                    if (IOManage.OutputDrivers.drivers.ContainsKey("三色灯绿"))
                    {
                        IOManage.OUTPUT("三色灯绿").SetOutBit(true);
                    }
                }
            }
            else
            {
                if (bPreAuto)
                {
                    buttonStart.BackColor  = Color.Red;
                    buttonStart.Text       = "启动";
                    buttonStart.ImageIndex = 3;
                    if (IOManage.OutputDrivers.drivers.ContainsKey("START"))
                    {
                        IOManage.OUTPUT("START").SetOutBit(false);
                    }
                    if (IOManage.OutputDrivers.drivers.ContainsKey("STOP"))
                    {
                        IOManage.OUTPUT("STOP").SetOutBit(true);
                    }
                    if (IOManage.OutputDrivers.drivers.ContainsKey("三色灯红"))
                    {
                        IOManage.OUTPUT("三色灯红").SetOutBit(false);
                    }
                    if (IOManage.OutputDrivers.drivers.ContainsKey("三色灯黄"))
                    {
                        IOManage.OUTPUT("三色灯黄").SetOutBit(true);
                    }
                    if (IOManage.OutputDrivers.drivers.ContainsKey("三色灯绿"))
                    {
                        IOManage.OUTPUT("三色灯绿").SetOutBit(false);
                    }
                }
                else
                {
                    if (IOManage.OutputDrivers.drivers.ContainsKey("三色灯黄") && IOManage.OUTPUT("三色灯黄").GetOn())
                    {
                        IOManage.OUTPUT("三色灯黄").SetOutBit(false);
                    }
                    else if (IOManage.OutputDrivers.drivers.ContainsKey("三色灯黄") && IOManage.OUTPUT("三色灯黄").GetOff())
                    {
                        IOManage.OUTPUT("三色灯黄").SetOutBit(true);
                    }
                }
            }
            bPreAuto = MainModule.FormMain.bAuto;
            if (MainModule.FormMain.bHomeReady)
            {
                if (bPreHomeReady == false)
                {
                    buttonHome.BackColor = Color.Green;
                }
            }
            else
            {
                if (bPreHomeReady)
                {
                    buttonHome.BackColor = Color.Red;
                }
            }
            bPreHomeReady = MainModule.FormMain.bHomeReady;

            if (MainModule.FormMain.bAlarm && IOManage.OutputDrivers.drivers.ContainsKey("BIZZ") && IOManage.OUTPUT("BIZZ").GetOn())
            {
                IOManage.OUTPUT("BIZZ").SetOutBit(false);
                IOManage.OUTPUT("三色灯红").SetOutBit(false);
                IOManage.OUTPUT("三色灯黄").SetOutBit(false);
            }
            else if (MainModule.FormMain.bAlarm && IOManage.OutputDrivers.drivers.ContainsKey("BIZZ") && IOManage.OUTPUT("BIZZ").GetOff())
            {
                IOManage.OUTPUT("BIZZ").SetOutBit(true);
                IOManage.OUTPUT("三色灯红").SetOutBit(true);
                IOManage.OUTPUT("三色灯黄").SetOutBit(false);
                IOManage.OUTPUT("三色灯绿").SetOutBit(false);
            }
        }