public static IDIO GetInstanceInterface() { if (DIOBase.GetUseDIO()) { switch (DIOBase.GetKindOfDIO()) { case DIOBase.KIND_DIO.AJIN: return(DIOAjin.GetInstance()); } } return(null); }
public static DIOAjin GetInstance() { if (m_bIsUseDIO) { if (m_dioAjin == null) { m_dioAjin = new DIOAjin(); } return(m_dioAjin); } return(null); }
public static DIOAjin GetInstance(bool isUseIO, KIND_DIO kindOfDIO) { m_bIsUseDIO = isUseIO; m_kindOfDIO = kindOfDIO; if (m_bIsUseDIO) { if (m_dioAjin == null) { m_dioAjin = new DIOAjin(); } return(m_dioAjin); } return(null); }
public static void ReadIoINI(string path) { bool useIO = false; int kindOfIO = 0; IniFile ini = new IniFile(); string strIniValue = ""; strIniValue = ini.IniReadValue(DIOBase.INISECTION_IO_INITIAL, DIOBase.INIKEY_INIT_USE_IO, path); if (strIniValue != "") { useIO = Convert.ToBoolean(strIniValue); } strIniValue = ini.IniReadValue(DIOBase.INISECTION_IO_INITIAL, DIOBase.INIKEY_INIT_KIND_OF_IO, path); if (strIniValue != "") { kindOfIO = Convert.ToInt32(strIniValue); } if (useIO) { try { switch (kindOfIO) { case 0: // Ajin { DIOAjin ioAjin = null; ioAjin = DIOAjin.GetInstance(useIO, (KIND_DIO)kindOfIO); ioAjin.InitDIO(); ioAjin.LoadIOMap(DefPath.IOMap); } break; } } catch (Exception E) { MessageBox.Show(E.Message.ToString()); } } }