Exemplo n.º 1
0
        private TVCLib.Tvc CreateAFG3022()
        {
            //刷新设备列表
            TekVRAPI.CRemoteAPI remoteAPI = new TekVRAPI.CRemoteAPI();
            if (!remoteAPI.TekVIsRMUPdateActive())
            {
                remoteAPI.TekVStartRmUpdate("");
            }
            //寻找AFG3022设备
            string descriptor = null;

            TekVISANet.VISA visa       = new TekVISANet.VISA();
            ArrayList       deviceList = new ArrayList();

            if (visa.FindResources("USB?*INSTR", out deviceList))
            {
                descriptor = deviceList[0].ToString();
            }
            afg3022.Descriptor = descriptor;
            if (descriptor != null)
            {
                Log.MessAgeLog(".\\xhtst.log", "找到USB设备" + descriptor);
            }
            else
            {
                Log.MessAgeLog(".\\xhtst.log", "未找到设备");
            }
            //    CreateFM(1, 1700, 0.100, 10.3, 11);
            visa.Dispose();
            visa = null;


            return(afg3022);
        }
Exemplo n.º 2
0
 public static ArrayList GetDevDescList()
 {
     deviceList = null;
     TekVRAPI.CRemoteAPI remoteAPI = new TekVRAPI.CRemoteAPI();
     if (!remoteAPI.TekVIsRMUPdateActive())
     {
         remoteAPI.TekVStartRmUpdate("");
     }
     //寻找AFG3022设备
     string descriptor = null;
     TekVISANet.VISA visa = new TekVISANet.VISA();
     if (visa.FindResources("USB?*INSTR", out deviceList))
     {
         descriptor = deviceList[0].ToString();
     }
     visa.Dispose();
     visa = null;
     return deviceList;
 }
Exemplo n.º 3
0
        static public ArrayList GetDevDescList()
        {
            deviceList = null;
            TekVRAPI.CRemoteAPI remoteAPI = new TekVRAPI.CRemoteAPI();
            if (!remoteAPI.TekVIsRMUPdateActive())
            {
                remoteAPI.TekVStartRmUpdate("");
            }
            //寻找AFG3022设备
            string descriptor = null;

            TekVISANet.VISA visa = new TekVISANet.VISA();
            if (visa.FindResources("USB?*INSTR", out deviceList))
            {
                descriptor = deviceList[0].ToString();
            }
            visa.Dispose();
            visa = null;
            return(deviceList);
        }
Exemplo n.º 4
0
        private TVCLib.Tvc CreateAFG3022()
        {
            //刷新设备列表
                TekVRAPI.CRemoteAPI remoteAPI = new TekVRAPI.CRemoteAPI();
                if (!remoteAPI.TekVIsRMUPdateActive())
                {
                    remoteAPI.TekVStartRmUpdate("");
                }
                //寻找AFG3022设备
                string descriptor = null;
                TekVISANet.VISA visa = new TekVISANet.VISA();
                ArrayList deviceList = new ArrayList();
                if (visa.FindResources("USB?*INSTR", out deviceList))
                {
                    descriptor = deviceList[0].ToString();

                }
                afg3022.Descriptor = descriptor;
                if (descriptor != null)
                {
                    Log.MessAgeLog(".\\xhtst.log", "找到USB设备" + descriptor);
                }
                else
                {
                    Log.MessAgeLog(".\\xhtst.log", "未找到设备");
                }
            //    CreateFM(1, 1700, 0.100, 10.3, 11);
                visa.Dispose();
                visa = null;

            return afg3022;
        }