I am attempting to use the hpe363xa IVI driver to control an Agilent E3631A power supply via the serial port. I am working in Measurement Studio C++ for the first time as well.
I am just trying the basics at this point. I just want to enable the supply and set the voltage for the 3 output channels. Things are fine if I just set the voltage for outputs 1 and 2, but when I compile and run with the following statement:
m_ps001->Output.SetVoltageLevel(m_ps01chan03, 5.0); // ch3 = -5.0V
the program crashes with an error:
"Primary Error: (Hex 0xBFFA0010) Invalid value for parameter or property.
Attribute: HPE363XA_ATTR_VOLTAGE_LEVEL, Channel: OUT_3"
FYI:
1) The 3rd output is a negative outp
ut, and is generally used in a mode where it tracks the positive voltage from output 2. Plus and minus rails for op-amps.
2) When I configured the IVI session in MAX, I had to add channel 3. The original configuration only had channels 1 and 2.
3) Statements to enable/disable output 3, and set the current limit for output 3 compile and run just fine.
4) If I comment out the attempt to set the voltage level on output 3, I can set the current limit for output 3, and I can set the voltage and current for outputs 1 and 2. But when I use a DMM to check, only outputs 1 and 2 are supplying a voltage, 3 is at 0 volts.
Is there a bug in the driver, or am I doing something wrong??