Ejemplo n.º 1
0
        public override void Initialize(string _CommonFolderPath)
        {
            DIOWnd = new DIOControlWindow((int)eProjectType.BLOWER, _CommonFolderPath);
            DIOWnd.InputChangedEvent += new DIOControlWindow.InputChangedHandler(InputChangeEventFunction);
            IsDIOInitialize           = DIOWnd.Initialize();

            SerialWnd = new SerialWindow();
            SerialWnd.SerialReceiveEvent += new SerialWindow.SerialReceiveHandler(SeraialReceiveEventFunction);
            IsSerialInitialize            = SerialWnd.Initialize("COM1");
        }
Ejemplo n.º 2
0
        public override void Initialize(string _CommonFolderPath)
        {
            DIOWnd = new DIOControlWindow((int)eProjectType.DISPENSER, _CommonFolderPath);
            DIOWnd.InputChangedEvent += new DIOControlWindow.InputChangedHandler(InputChangeEventFunction);
            DIOWnd.Initialize();

            EthernetServWnd = new EthernetWindow();
            EthernetServWnd.Initialize(_CommonFolderPath);
            EthernetServWnd.ReceiveStringEvent += new EthernetWindow.ReceiveStringHandler(ReceiveStringEventFunction);

            int _AutoCmdBit     = DIOWnd.DioBaseCmd.OutputBitIndexCheck((int)DIO_DEF.OUT_AUTO);
            int _CompleteCmdBit = DIOWnd.DioBaseCmd.OutputBitIndexCheck((int)DIO_DEF.OUT_COMPLETE);
            int _ReadyCmdBit    = DIOWnd.DioBaseCmd.OutputBitIndexCheck((int)DIO_DEF.OUT_READY);
            int _LiveCmdBit     = DIOWnd.DioBaseCmd.OutputBitIndexCheck((int)DIO_DEF.OUT_LIVE);

            if (_AutoCmdBit >= 0)
            {
                DIOWnd.SetOutputSignal((short)_AutoCmdBit, false);
            }
            if (_CompleteCmdBit >= 0)
            {
                DIOWnd.SetOutputSignal((short)_CompleteCmdBit, false);
            }
            if (_ReadyCmdBit >= 0)
            {
                DIOWnd.SetOutputSignal((short)_ReadyCmdBit, false);
            }
            if (_LiveCmdBit >= 0)
            {
                DIOWnd.SetOutputSignal((short)_LiveCmdBit, true);
            }

            AckStructs = new AckStruct[3];
            for (int iLoopCount = 0; iLoopCount < 3; ++iLoopCount)
            {
                AckStructs[iLoopCount] = new AckStruct();
            }
            ;

            ThreadAckSignalCheck = new Thread(ThreadAckSignalCheckFunc);
            ThreadAckSignalCheck.IsBackground = true;
            IsThreadAckSignalCheckExit        = false;
        }
Ejemplo n.º 3
0
        public override void Initialize(string _CommonFolderPath)
        {
            if (UseDIOCommFlag)
            {
                DIOWnd = new DIOControlWindow((int)eProjectType.NONE, _CommonFolderPath);
                DIOWnd.InputChangedEvent += new DIOControlWindow.InputChangedHandler(InputChangeEventFunction);
                DIOWnd.Initialize();
            }

            if (UseSerialCommFlag)
            {
                SerialWnd = new SerialWindow();
                SerialWnd.SerialReceiveEvent += new SerialWindow.SerialReceiveHandler(SeraialReceiveEventFunction);
                SerialWnd.Initialize("COM1");
            }

            int _CompleteCmdBit = DIOWnd.DioBaseCmd.OutputBitIndexCheck((int)DIO_DEF.OUT_COMPLETE);
            int _ReadyCmdBit    = DIOWnd.DioBaseCmd.OutputBitIndexCheck((int)DIO_DEF.OUT_READY);
            int _ResultCmdBit   = DIOWnd.DioBaseCmd.OutputBitIndexCheck((int)DIO_DEF.OUT_RESULT_1);
            int _LiveCmdBit     = DIOWnd.DioBaseCmd.OutputBitIndexCheck((int)DIO_DEF.OUT_LIVE);

            if (_CompleteCmdBit >= 0)
            {
                DIOWnd.SetOutputSignal((short)_CompleteCmdBit, false);
            }
            if (_ReadyCmdBit >= 0)
            {
                DIOWnd.SetOutputSignal((short)_ReadyCmdBit, false);
            }
            if (_ResultCmdBit >= 0)
            {
                DIOWnd.SetOutputSignal((short)_ResultCmdBit, false);
            }
            if (_LiveCmdBit >= 0)
            {
                DIOWnd.SetOutputSignal((short)_LiveCmdBit, true);
            }
        }