I am writing a vb.net program to remotely control the 6060B (electric load). So far I have successfully connected my pc to the 6060B and I am able to query information from the load. Below is the part of the code I wrote:
Dim mbSession As MessageBasedSession;
mbSession = ResourceManager.GetLocalManager().Open("GPIB::6::INSTR");
Dim responseString As String = mbSession.Query("*idn?");
You need to find the command reference. There is a standard, SCPI, which has commands generally in the form
Again this is a standard, and you should find the specific command reference for your device, HP (Keysight / Agilent) 6060B 300 Watt DC Electronic Load.
A search engine result for hp 6060b manual should yield some good results. Look for an operating or programming manual which usually has the command reference.
This should work for you:
' This example sets the current level to 0.75 amps ' and then reads back the actual current value. ' set input off mbSession.Write("INPUT OFF") ' set mode to current mbSession.Write("MODE:CURR") ' set current range mbSession.Write("CURR:RANG 1") ' set current value mbSession.Write("CURR 0.75") ' set input on mbSession.Write("INPUT ON") ' measure current Dim result As String result = mbSession.Write("MEAS:CURR?") Dim measuredCurrent As Single = Single.Parse(result)
Example taken from page 70 of this operating manual I found.
In general, things are usually easier if you are provided example code. I will usually use the example code to get a baseline working operation, then copy the code to my project and manipulate as needed.