Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

E3631A IVI class driver - cannot enable power supply outputs

Solved!
Go to solution

I am trying to control an Agilent E3631A Triple Output DC power supply with IVI-C class drivers downloaded from the NI repository (NI developed drivers, I think).

I am able to control almost every settings of the power supply (voltage at each channel, limit current at each channel , etc). However, I cannot enable the output.
I realize that when using the power supply in manual operation, as well as in remote operation with specific drivers I have to enable all outputs at once, I cannot enable each output separately. But, the “IviDCPwr Configure Output Enabled” block of IVI class driver (which is the block that I am using to try turn on the output), I had to specify which channel the driver should enable.
I think this is what is causing the miss function, as I cannot “say” to the driver that I want to enable all the channels.

 

This is a common problem or I am doing something wrong?
In the first case, Is there a known way to solve this problem??

Thanks in advance,
Diogo Ribeiro

Diogo Ribeiro
0 Kudos
Message 1 of 15
(5,169 Views)

I'm a bit confused about your problem. What channel name are you providing? What channel name is in MAX? What error code do you get?

0 Kudos
Message 2 of 15
(5,154 Views)

Hello Diogo,

 

What exactly were you trying to accomplish - enabling a single output or enabling all outputs at once?

Regards,

Shawn S. | NIC
Instrument Driver/IVI PSE
National Instruments
0 Kudos
Message 3 of 15
(5,140 Views)

Sorry if I my my post was a little bit confusing. I hope I will be more clear this time.

 

 


Shawn_S. wrote: What exactly were you trying to accomplish - enabling a single output or enabling all outputs at once?

I am trying to enable any output of the power supply, but using the IVI class driver blocks (IviDCPwr). I don't care if I enable only output or all of them.

The problem is that the power supply that I am using only allows to enable all the channels at the same time.

So, I have to enable all the channels.

 

 


Wrote: What channel name are you providing? What channel name is in MAX? What error code do you get?

In Max I have 3 channel names CHANNEL1, CHANNEL2, CHANNEL3. With this LabView block (I am using the block "IviDCPwr Configure Output Enabled" to enable the output of the power supply), I have to provide the Channel of the power supply that I want to enable.

I am not getting any error code everything seems to work fine within LabView, but the power supply continues to have its outputs disabled after I run my code with the previous block.

 

 

 

I think I have discovered the source of the problem. I have looked inside the source code of the IVI drivers and I saw that the function called by the mentioned block of the IviDCPwr Palette does nothing. Because of the special behavior of my power supply the called function only returns a non error value.


To enable the output of the power supply with this driver the only given possibility is by using the IVI custom drivers palette, which has an output enable block that calls a different function inside the driver. However, by using the block of the custom palette, it then loses the interchangeability feature of IVI drivers.

I understand that who develops the driver have developed it in this way for safety reasons.

Anyway, is it possible that I modify the source code and recompile the drivers?? If It was possible I will be able to change the behavior of the function called by the "IviDCPwr Configure Output Enabled" block and adapt it to my needs.

 

 

Thanks for the help,

Diogo Ribeiro

 

 

Diogo Ribeiro
0 Kudos
Message 4 of 15
(5,056 Views)

Here is the two functions from the source code provided with the driver.

 

 

ViStatus _VI_FUNC hpe363xa_ConfigureOutputEnabled (ViSession vi,
                                                   ViConstString channelName,
                                                   ViBoolean enabled)
{
   return VI_SUCCESS;
}

ViStatus _VI_FUNC hpe363xa_ConfigureAllOutputEnabled (ViSession vi,
                                                      ViBoolean outputEnabled)
{
    ViStatus         error = VI_SUCCESS;    
    ViChar channelName[BUFFER_SIZE];
    viCheckErr(hpe363xa_GetChannelName(vi,1,BUFFER_SIZE,channelName));
    viCheckErr(Ivi_SetAttributeViBoolean (vi, channelName, HPE363XA_ATTR_OUTPUT_ENABLED,
                                      IVI_VAL_DIRECT_USER_CALL, outputEnabled));
Error:
    return error;
}

 

 

"hpe363xa_ConfigureOutputEnabled" is called by the IviDCPwr class block and

"hpe363xa_ConfigureAllOutputEnabled" is called by the custom IVI driver blocks.


Is it possible to change the "hpe363xa_ConfigureOutputEnabled" function, recompile the code into a .dll file and put the new DLL where it is the actual one??

 

 

Diogo Ribeiro

Diogo Ribeiro
0 Kudos
Message 5 of 15
(5,043 Views)
Solution
Accepted by topic author dcribeiro

If you have LabWindows/CVI, you can make whatever changes you want.

 

I would suggest you use the instrument.drivers@ni.com that is on the download page to provide feedback to NI as to what you see as the problem.

0 Kudos
Message 6 of 15
(5,027 Views)

Thank you!! It was really what I needed.

I use LabWindows/CVI and this link as a general guide to change the function behavior and recompile the DLL driver file.

 

Thank you for all the help.

Diogo Ribeiro

Diogo Ribeiro
0 Kudos
Message 7 of 15
(5,021 Views)

Hello Diogo,

 

After reviewing the IVI specification (pg. 30) for DC Power supplies, it is outlined that devices should have the ability to choose a channel and enable or disable its output.  However, after reviewing the device's user manual (pg. 77), I see that there only an instruction for enabling all or disabling all of the channel outputs.  Our drivers are limited by the capabilities of the instruments.  I would agree that it's best to call the ConfigureAllOutputEnabled function to enable outputs for the E3631A.

 

I hope this helps!

Regards,

Shawn S. | NIC
Instrument Driver/IVI PSE
National Instruments
0 Kudos
Message 8 of 15
(5,000 Views)

@dcribeiro wrote:

Thank you!! It was really what I needed.

I use LabWindows/CVI and this link as a general guide to change the function behavior and recompile the DLL driver file.

 

Thank you for all the help.

Diogo Ribeiro


Hi,

I have same problem with HP e3631a  to enable all three output at same time 

i want to ask,how do you recompile the DLL driver file?thanks if you can give me some advise

 

Kai

0 Kudos
Message 9 of 15
(4,914 Views)

Hi.

As I said, I use LabWindows/CVI to open the source files and proceed with the necessary modifications. Then I use the next link as a guide to create the dll file:
http://digital.ni.com/public.nsf/allkb/9E1411A470C12C258625707E0008DB52?OpenDocument

In the last step you have to replace the original dll file in the directory ...\IVI\Bin\ by the one created in the previous step.

I have turn around that individual driver behaviour with this procedure successfully, but maybe there are simpler ways of doing it without the need to modify the source code. If there is and you would be able to find it please tell me.

Hope it helps.
Regards,
Diogo Ribeiro

Diogo Ribeiro
0 Kudos
Message 10 of 15
(4,908 Views)