import time import numpy ########################################################################### # Configuration collectionTime = 30 * 60 # Seconds sampleFreq = 2000.0 # Hz samplesPerTrigger = 1 currentSenseResistor = 0.173 # Ohms ########################################################################### sampleAperture = 1.0 / (1.05 * sampleFreq) totalSamples = collectionTime * sampleFreq voltage = dmm34411A("192.168.1.203") current = dmm34411A("192.168.1.204") freq = dmm34411A("192.168.1.205") freq.setOutput(0) freq.setSquare() freq.setVoltage(0, 3) freq.setFrequency(sampleFreq / samplesPerTrigger) voltage.setVoltageDC("10V", "MAX") voltage.setVoltageDCAperture(str(sampleAperture)) voltage.setSamplesPerTrigger(str(samplesPerTrigger)) voltage.setTriggerSource("EXT") voltage.setTriggerCount("INF") voltage.setTriggerDelay("0") voltage.setInitiate()
import time import numpy ########################################################################### # Configuration collectionTime = 30*60 # Seconds sampleFreq = 2000.0 # Hz samplesPerTrigger = 1 currentSenseResistor = 0.173 # Ohms ########################################################################### sampleAperture = 1.0 / (1.05 * sampleFreq) totalSamples = collectionTime * sampleFreq voltage = dmm34411A("192.168.1.203") current = dmm34411A("192.168.1.204") freq = dmm34411A("192.168.1.205") freq.setOutput(0) freq.setSquare() freq.setVoltage(0,3) freq.setFrequency(sampleFreq/samplesPerTrigger) voltage.setVoltageDC("10V", "MAX") voltage.setVoltageDCAperture(str(sampleAperture)) voltage.setSamplesPerTrigger(str(samplesPerTrigger)) voltage.setTriggerSource("EXT") voltage.setTriggerCount("INF") voltage.setTriggerDelay("0") voltage.setInitiate()
from agilent.dmm34411A.dmm34411A import dmm34411A import time import numpy totalSamples = 50000 sampleFreq = 500 freq = dmm34411A("172.17.5.121") voltage = dmm34411A("172.17.5.125") current = dmm34411A("172.17.5.124") #setup freq gen freq.setSquare() freq.setVoltage(0,3) freq.setFrequency(sampleFreq) #setup voltage meter voltage.setVoltageDC("10V", "MAX") # set external trigger voltage.setTriggerSource() voltage.setTriggerCount(str(totalSamples)) # wait for trigger voltage.setInitiate() current.setCurrentDC("100mA", "MAX") current.setTriggerSource() current.setTriggerCount(str(totalSamples)) current.setInitiate() time.sleep(1)