///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public string button_Env_Click(object sender, EventArgs e) { MC07_S_RESULT sResult = new MC07_S_RESULT(0); MC07_S_UNIT_INFO unitInfo = new MC07_S_UNIT_INFO(); string resultStr = "Environment OK"; if (MC07.Environment(MC07.MC07_USB_UNIT_0, ref sResult) == false) { resultStr = "It failed in MC07_Environment() : MC07_Result(1)=" + sResult.MC07_Result[1].ToString(); } if (MC07.ReadUnitInfo(MC07.MC07_USB_UNIT_0, ref unitInfo, ref sResult) == false) { resultStr = "It failed in MC07_ReadUnitInfo() : MC07_Result(1)=" + sResult.MC07_Result[1].ToString(); } if (unitInfo.UnitType[0] == 0xFF) { resultStr = "NO CONTROLLER UNIT:Please Check USB connection"; } return(resultStr); }