コード例 #1
0
        //デバイスの初期化
        private void caioInitDevice()
        {
            if (aioDeviceInit == true)
            {
                aio.Exit(devId);
            }
            int aioInitState = aio.Init(comboBox1.SelectedItem.ToString(), out devId);

            if (devId == -1)
            {
                statusMsg(1, "デバイスが接続されていません");
                return;
            }
            else
            {
                if (aioInitState != 0)
                {
                    statusMsg(aioInitState, null);
                    return;
                }
                else
                {
                    int aioResetState = 0;
                    aioResetState = aio.ResetDevice(devId);
                    if (aioResetState != 0)
                    {
                        statusMsg(aioResetState, null);
                        return;
                    }
                    caioGetChannel();
                    statusMsg(0, "デバイスの初期化に成功しました");
                    aioDeviceInit = true;
                }
            }
        }
コード例 #2
0
ファイル: MyAIO.cs プロジェクト: riswey/TwinLogger
 public void Close()
 {
     foreach (DEVICEID id in devices)
     {
         aio.Exit(id);
     }
     devices.Clear();
 }
コード例 #3
0
 public void close()
 {
     if (_aio != null)
     {
         _aio.StopAi(_aioId);
         _aio.ResetDevice(_aioId);
         _aio.Exit(_aioId);
         _aio = null;
     }
 }
コード例 #4
0
ファイル: Device.cs プロジェクト: 0804kk/AcroDD-Cart
 public void close()//todo ちゃんとかく
 {
     for (int i = 0; i < 2; i++)
     {
         dio.Exit(dioId[i]);
     }
     for (int i = 0; i < 2; i++)
     {
         aio.Exit(aioId[i]);
     }
     EPX18QC.EPX18QC_Close(hDevice);
 }