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"); }
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); } }