AnsweredAssumed Answered

N6705B data logging Voltage and Current

Question asked by n12i on May 22, 2017
Latest reply on Feb 1, 2018 by slinghui


I hope this is the right forum. I have a N6705B power generator and I am trying to use pyvisa to communicate with it. I wan to try to read in the voltage and current at the same time. I read that the power generator is able to interleave data, but is not able to read both at the same time. How would I do this? I tried to find some example codes but nothing seemed to come up. Also is there a way to continuously read in data and display it on the computer screen. Thank you

This is an example of my code so far

#request info from keysight power generator
#set voltage, current and turn on otuput
keysight.write("VOLT 3, (@1)")
keysight.write("CURR 1, (@1)")
keysight.write("OUTP ON,(@1)")
#read current volt and curr
print(keysight.query_ascii_values("MEAS:VOLT? (@1)"))
print(keysight.query_ascii_values("MEAS:CURR? (@1)"))
#sets a limit on current and voltage
keysight.write("CURR:PROT:STAT .5, (@1)")
keysight.write("VOLT:PROT 30, (@1)")
keysight.write("SENS:FUNC:VOLT ON,(@1)")
#keysight.write("SENS:FUNC:CURR ON,(@1)")
keysight.write("SENS:SWE:TINT .001,(@1)")
keysight.write("SENS:SWE:POIN 5000,(@1)")
keysight.write("INIT:ACQ (@1)")
keysight.write("TRIG:ACQ (@1)")
x=keysight.query_ascii_values("FETC:ARR:VOLT? (@1)")
print x