是德科技
直播中

蔡明灼

7年用户 186经验值
私信 关注
[问答]

N6784A怎么使用AgilentN67xxLib的当前优先级模式下的电流限制

嗨,我是新来的。
我目前正在准备使用N6700准备C#应用程序。
对于我有N6784模块的通道,我想在当前优先级模式下设置电流限制。
下面我放了部分代码。
设置正电压和负电压看起来工作正常,但我无法设置电流限制。
我还要补充一点,电压prority模式工作正常。
如果有人知道如何在当前优先级模式下设置当前限制,我将很高兴告诉我?
如果您希望我上传整个visual studio项目,请告诉我。
这是我的代码:// Globals Agilent.AgilentN67xx.Interop.AgilentN67xx driver = null;
IAgilentN67xxProtection2 protectionPtr_ch2;
IAgilentN67xxMeasurement measurementPtr_ch2;
IAgilentN67xxOutput5 outputPtr_ch2;
public void Init(){// init driver.Initialize(“GPIB0 :: 7 :: INSTR”;, true,true,“”);
outputPtr_ch2 =(IAgilentN67xxOutput5)driver.Outputs.get_Item(driver.Outputs.get_Name(2));
protectionPtr_ch2 = driver.Protections.get_Item(driver.Protections.get_Name(2));
measurementPtr_ch2 = driver.Measurements.get_Item(driver.Measurements.get_Name(2));
} public void PSU2_SetCurrentPrio(double dCurrent,double dVoltPos,double dVoltNeg){//设置当前优先级outputPtr_ch2.SourceRegulationMode = AgilentN67xxSourceRegulationEnum.AgilentN67xxSourceRegulationCurrent;
outputPtr_ch2.CurrentLimit(dCurrent,dCurrent);
// outputPtr_ch2.NegComplicanceVoltage = dVoltNeg;
outputPtr_ch2.PosComplianceVoltage = dVoltPos;
} public void PSU2_SetVoltagePrio(双dVoltage,双dCurrPos,双dCurrNeg)//看起来效果正常{//设置电压优先级outputPtr_ch2.SourceRegulationMode = AgilentN67xxSourceRegulationEnum.AgilentN67xxSourceRegulationVoltage;
outputPtr_ch2.NegComplianceCurrent = dCurrNeg;
outputPtr_ch2.PosComplianceCurrent = dCurrPos;
outputPtr_ch2.VoltageLevel(dVoltage,dVoltage);
问候,Dawid

以上来自于谷歌翻译


     以下为原文

  Hi,  

I'm new here. I'm currently working on preparing C# application with N6700. For channel where I have N6784 module I'd like to set current limit in the current priority mode. Below I put part of my code. Setting the positive voltage and negative voltage looks that works fine, but I can't set the current limit. I must add also that the voltage prority mode works fine.  

If somebody know how to set the current limit in current priority mode I will appreciate to let me know? If you want me to upload the whole visual studio project please let me know too.  

Here is my code:

        //Globals
        Agilent.AgilentN67xx.Interop.AgilentN67xx driver = null;

        IAgilentN67xxProtection2 protectionPtr_ch2;
        IAgilentN67xxMeasurement measurementPtr_ch2;
        IAgilentN67xxOutput5 outputPtr_ch2;   

        public void Init()
        {
                //init
                driver.Initialize("GPIB0::7::INSTR";, true, true, "");

                outputPtr_ch2 = (IAgilentN67xxOutput5)driver.Outputs.get_Item(driver.Outputs.get_Name(2));
                protectionPtr_ch2 = driver.Protections.get_Item(driver.Protections.get_Name(2));
                measurementPtr_ch2 = driver.Measurements.get_Item(driver.Measurements.get_Name(2));
        }

        public void PSU2_SetCurrentPrio(double dCurrent, double dVoltPos, double dVoltNeg)
        {
                //Set Current Priority
                outputPtr_ch2.SourceRegulationMode = AgilentN67xxSourceRegulationEnum.AgilentN67xxSourceRegulationCurrent;
                outputPtr_ch2.CurrentLimit(dCurrent, dCurrent);  // <- I use this to set current limit but it looks that does't work ???
                outputPtr_ch2.NegComplicanceVoltage = dVoltNeg;
                outputPtr_ch2.PosComplianceVoltage = dVoltPos;
        }

        public void PSU2_SetVoltagePrio(double dVoltage, double dCurrPos, double dCurrNeg) // That one looks that works fine
        {
                //Set Voltage Priority
                outputPtr_ch2.SourceRegulationMode = AgilentN67xxSourceRegulationEnum.AgilentN67xxSourceRegulationVoltage;
                outputPtr_ch2.NegComplianceCurrent = dCurrNeg;
                outputPtr_ch2.PosComplianceCurrent = dCurrPos;

                outputPtr_ch2.VoltageLevel(dVoltage, dVoltage);
        }


Regards,
Dawid  

回帖(2)

蔡明灼

2018-12-27 16:15:50
嗨,安捷伦回答说,这是AgilentN67xxLib中的错误,并且该特定模式下的功能CurrentLimit无法正常工作。
问候

以上来自于谷歌翻译


     以下为原文

  Hi,

Agilent answered, this is bug in the AgilentN67xxLib and the function CurrentLimit in that specific mode doesn't work properly.

Regards
举报

罗敏

2018-12-27 16:23:36
引用: ncvttwer 发表于 2018-12-27 14:05
嗨,安捷伦回答说,这是AgilentN67xxLib中的错误,并且该特定模式下的功能CurrentLimit无法正常工作。
问候

我想我通过不同的渠道回答了这个问题。
你最后使用passthrough命令了吗?
passthrough命令允许您访问驱动程序的IO层,以便发送您可以发送的当前命令:.Systems.IO.WriteString(“CURR 1,(@ 2)”)谢谢。

以上来自于谷歌翻译


     以下为原文

  I think that I answered this via a different channel.  Did you wind up using the passthrough command?
The passthrough command allow you to access the IO layer of the driver so to send the current command you can send:
.Systems.IO.WriteString("CURR 1,(@2)")

Thanks.
举报

更多回帖

发帖
×
20
完善资料,
赚取积分