Exemplo n.º 1
0
        public static int Active(uint ascanNum, uint ascanPort, AscanVideoActive active)
        {
            int  error_code;
            uint attr = DaqAttrType.ascanVideo.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 Ascan video active failed", "错误:设置Ascan video active失败");
            }
            return(error_code);
        }
Exemplo n.º 2
0
        public static int Active(uint ascanNum, uint port, ref AscanVideoActive active)
        {
            int  error_code;
            uint attr = DaqAttrType.ascanVideo.Active;
            uint val  = 0;

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

            error_code = DAQ.daqGet(ascanNum, port, attr, ref val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Get Ascan video active failed", "错误:获得Ascan video active失败");
            }
            active = (AscanVideoActive)val;
            return(error_code);
        }