06-29-2012 04:22 PM
I am programmming a PXI-4110 DC power supply. I want to disable and enable the outputs. I am using niDCPower_Disable() to disable the outputs. and using niDCPower_Initiate() to enable the outputs. Problem is after I disable the outputs with niDCPower_Disable() and enable with niDCPower_Initiate() I lose all of my settings like the output voltage. So what I do is call niDCPower_ConfigureVoltageLevel() and niDCPower_ConfigureCurrentLimit() before I call niDCPower_Initiate() so the outputs are set to the desired voltage.
What I want to do is enable and disable just like pusing a button on a power supply panel.
For example, I call niDCPower_Disable() to open the relay switch.
It would seem like there would be a function niDCPower_Enable() which would close that relay switch and not reset all of my voltage and current limit settings.
Any help on the best way to do this would be appreciated.
Solved! Go to Solution.
06-29-2012 05:38 PM
Figured it out using :
status = niDCPower_ConfigureOutputEnabled(vi_4110_0, channel0Name, VI_FALSE);
to disable and then I initiate with
status = niDCPower_Initiate(vi_4110_0);
This way my power supply is ready to go but my relay is open.
When I am ready to close the relay I do this:
status = niDCPower_ConfigureOutputEnabled(vi_4110_0, channel0Name, VI_TRUE);
Then later on if I want to open the relay again I only call this:
status = niDCPower_ConfigureOutputEnabled(vi_4110_0, channel0Name, VI_FALSE);
Problem solved.