void Start() { _cdio = new Cdio(); var res = _cdio.Init("DIO000", out _id); if (res == (int)CdioConst.DIO_ERR_SUCCESS) { StartCoroutine(Spawn()); } }
private bool DioInit(string deviceName, out short dioId, out string returnCode) { // Initialization handling int Ret = dio.Init(deviceName, out dioId); string ErrorString; dio.GetErrorString(Ret, out ErrorString); returnCode = "Ret = " + System.Convert.ToString(Ret) + " : " + ErrorString; Console.WriteLine(returnCode); if (Ret != (int)CdioConst.DIO_ERR_SUCCESS) { return(false); } return(true); }
public CdioMethod() { Ret = dio.Init("DIO000", out m_Id); //Ret = 0;//模拟电机运行 }