Showing results for 
Search instead for 
Did you mean: 

agilent b2901A constant current source

Go to solution

hi so i have an agielnt b2901a sourcer unit and before had it set up to output a constant voltage but now i need a constant current being outout but i cant seem to get it to work. Any help is appreciated.

Thanks in advance

0 Kudos
Message 1 of 10

I am assuming you are using LabVIEW?  Have you installed the instrument driver?


I don't have labview infront of me and wont until monday but I remember it being pretty straight forward.  If you already have a program to output a constant voltage I think all you have to do is change the drop down from voltage to current on the configuration part of measurement.  Might have to change one or two other small things.  When I get into work on Monday I will look up the exact steps and repost.  

Certified LabVIEW Architect
0 Kudos
Message 2 of 10

So I took a few minutes and came up with a quick sample program using the Agilent instrument drivers I already linked to.  The driver uses the flow commonly seen in LabVIEW of initialize, configure, measure (in this case output), close.  The example will take the following steps.  The labeled numbers in the image and program match these steps.




  1. Initialize the b2901A
  2. Configure it to output a current
  3. Enable the output (basically turn it on).
  4. Take a software timed voltage measurement for 10 seconds.
  5. Disable the output.
  6. Close communication.  


To use you will have to set the VISA resource to your instrument and your output level.  Then you should be able to run the code.  Let me know if you have another questions.  I have found the B2901 to be a very powerful instrument.  In the only few months we have had it I have found several uses for it that were outside of what we purchased it for.  



Certified LabVIEW Architect
0 Kudos
Message 3 of 10

that was very helpful but i cant seem to go above 0.018 amps. what sub vi is needed to adjust the settings to allow highers amps?

0 Kudos
Message 4 of 10

this seems to be due to a limit setting of maximum 2 volts and i dont see where the setting can be changed


0 Kudos
Message 5 of 10
Accepted by topic author adgurrol

There are several things that could cause that.  My guess is you are hitting a compliance limit.  This is a safety setting in the instrument.  When you tell it to out put a current it will output that current and go to whatever voltage it needs to in order to do that.  There is a setting called compliance that prevents it going above X voltage and will limit current if necessary to stay under X voltage.  My guess is that this is what is causing your issue.  You can set this with the Configure Output Protection submit.  Another option is there is a safety setting where a safety switch must be connect to the system if it the voltage is going to be above 42V (I think that's the level).  So if you are above that you will need to check the manual and see what has to be done to set that up.  My tests are low voltage so I have never looked at that.    Let me know if you are still having issues.



Certified LabVIEW Architect
Message 6 of 10

Well looks like you figured out your issue on your own.  Try the subVI I mentioned and see if it works. 

Certified LabVIEW Architect
Message 7 of 10

so that worked but i cant go above 5volts now it seems to be that the lowest current source range is the problem. It is automatically set at 3A when it is at 1mA in manual it works but i dont see which sub vi has this setting.

0 Kudos
Message 8 of 10

i found it thanks for your help

0 Kudos
Message 9 of 10

Great!!!! Glad it worked for you.

Certified LabVIEW Architect
0 Kudos
Message 10 of 10