Beispiel #1
0
        /**gate measment active*/
        public static int MeasActive(uint ascanNum, GateType type, ref MeasActive active)
        {
            int  error_code;
            int  gateNum = (int)type;
            uint attr    = DaqAttrType.gate[gateNum].MeasActive;
            uint val     = 0;

            if (ascanNum < ascanNumMin || ascanNum > ascanNumMax)
            {
                error_code = -1;
                return(error_code);
            }

            if (type < gateTypeMin || type > gateTypeMax)
            {
                error_code = -1;
                return(error_code);
            }

            error_code = DAQ.daqGet(ascanNum, attr, ref val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Get the Gate measment active failed!", "错误:获取Gate measment active失败!");
            }
            active = (MeasActive)val;
            return(error_code);
        }
Beispiel #2
0
        public static int MeasActive(uint ascanNum, uint ascanPort, DGateType type, MeasActive active)
        {
            int  error_code;
            int  gateNum = (int)type;
            uint attr    = DaqAttrType.dGate[gateNum].MeasActive;
            uint val     = (uint)active;

            if (ascanNum < ascanNumMin || ascanNum > ascanNumMax)
            {
                error_code = -1;
                return(error_code);
            }

            if (type < gateTypeMin || type > gateTypeMax)
            {
                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 measurement active of double gate failed!", "错误:设置门的测量使能失败!");
            }

            return(error_code);
        }