Instrument Control (GPIB, Serial, VISA, IVI)

取消
显示结果 
搜索替代 
您的意思是: 

downloaded the IVI Driver for a DMM, how do I use it in Visual Studio.net

Hello fivealive,
          If you would like to use the Class Driver for the class functions and Specific Driver for the Instrument Specific Capabilities, you will need to generate a wrapper for the specific driver and add another specific driver constructor that passes through the instrument specific handle returned by the Class Driver function "GetSpecificDriverCHandle".

Here is an example of the new constructor:
        public agn6700(System.IntPtr driverSpecificHandle)
        {
            this._handle = driverSpecificHandle;
        }

Here is my simple example:

                IviDCPwr power = new IviDCPwr("DCPower", true, true);

                IntPtr driverHandle = new IntPtr();
               
                power.GetSpecificDriverCHandle(out driverHandle);

                agn6700 agn = new agn6700(driverHandle);

This downcasting is done automatically in LabVIEW when you use the Class and Specific driver wrapper VIs.

Just let me know if you have anymore questions,

NathanT
0 项奖励
11 条消息(共 11 条)
1,105 次查看