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
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
Agilent answered, this is bug in the AgilentN67xxLib and the function CurrentLimit in that specific mode doesn't work properly.
Regards