private void initLaunchEnable() { int error_code; PluserActive active = PluserActive.OFF; error_code = GetPulserTransmitDAQ.Active(SelectAscan.sessionIndex, SelectAscan.port, ref active); if (error_code != 0) { return; } switch (active) { case PluserActive.OFF: rdoOFF.Checked = true; break; case PluserActive.ON: rdoON.Checked = true; break; default: MessageShow.show("Error:Initial launch enable failed", "错误:初始化发射使能失败!"); break; } }
public static int Active(uint ascanNum, uint ascanPort, PluserActive active) { int error_code; uint attr = DaqAttrType.pulserTranmit.Active; uint val = (uint)active; if (ascanNum < ascanNumMin || ascanNum > ascanNumMax) { error_code = -1; return(error_code); } error_code = DAQ.daqSet(ascanNum, ascanPort, attr, val); if (error_code != (int)PDAQ_ERR.GOOD) { MessageShow.show("Error:Set Pulser transmit reciviever active failed", "错误:设置Pulser transmit reciviever active失败"); } return(error_code); }