Jump to content
  • 0

SDK query: Analog configure


iitm04

Question

Hi,

I want to understand how the command analongimepedanceconfigure works with respect to changes made to let’s say impedance amplitude or frequency set changes.

The context of the query:

I had a simple circuit, the DUT being a 2 nano farad and a reference resistor to ground. 
I was passing a list of frequencies through impedance frequency set command. If I don’t apply impedanceconfigure after the change in frequencies, I got some random numbers for capacitance(not 2 nf) but I got ~2 nf if I apply impedanceconfigure after every change in frequencies through the frequency set.

 

BTW what number will AD2 throw if I change frequency set without impedanceconfigure.

Thanks!

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hi @iitm04

For faster operation after FDwfAnalogImpedanceStatus/done a new capture is immediately started. As a consequence if the frequency is changed the new capture will be invalid. Call configure again or ignore the following status.

See the WF SDK/ samples/ py/ AnalogImpedance_Analyzer.py example
"    dwf.FDwfAnalogImpedanceStatus(hdwf, None) # ignore last capture since we changed the frequency "
 

Edited by attila
Link to comment
Share on other sites

  • 0
18 hours ago, attila said:

Hi @iitm04

For faster operation after FDwfAnalogImpedanceStatus/done a new capture is immediately started. As a consequence if the frequency is changed the new capture will be invalid. Call configure again or ignore the following status.

See the WF SDK/ samples/ py/ AnalogImpedance_Analyzer.py example
"    dwf.FDwfAnalogImpedanceStatus(hdwf, None) # ignore last capture since we changed the frequency "
 

Hi attila ,

Thanks for the response.

Calling configure after changes works well as per expectation. However I did't see a change with dwf.FDwfAnalogImpedanceStatus(hdwf, None).

 

Here is a snippet of the code 

Quote

 

<some initialization code>

..........

dwf.FDwfAnalogImpedanceStatus(hdwf, None) 


capacitance = c_double()
 

# measurement reading loop
for i in range(10):


    dwf.FDwfAnalogImpedanceFrequencySet(hdwf, c_double(frequnecy)

    #dwf.FDwfAnalogImpedanceConfigure(hdwf, c_int(1))

    dwf.FDwfAnalogImpedanceStatus(hdwf, None) 
    dwf.FDwfAnalogImpedanceStatusMeasure(hdwf, DwfAnalogImpedanceSeriesCapactance, byref(capacitance))
    print(str(capacitance.value*1e9)+" nF")
    time.sleep(0.2)

so if I add the following line to the code, i get the expected 2nf as output, but if I # block the line it throws some numbers other than the expected 2nf. 

dwf.FDwfAnalogImpedanceConfigure(hdwf, c_int(1))

looking at the results I am not quite sure if making impedance status as "None" made a difference. Kindly let me know incase if my use case of 

dwf.FDwfAnalogImpedanceStatus(hdwf, None) 

is wrong.

Thanks!

Link to comment
Share on other sites

  • 0

Hi @iitm04

Are you using the following as it is in the AnalogImpedance_Analyzer example ?
# this option will enable dynamic adjustment of analog out settings like: frequency, amplitude...
dwf.FDwfDeviceAutoConfigureSet(hdwf, c_int(3))

Otherwise, when calling the FDwfAnalogImpedanceFrequencySet the AWG will be stopped and configure/start will be required to restart it.
dwf.FDwfAnalogImpedanceConfigure(hdwf, c_int(1))

Actually the FDwfAnalogImpedanceFrequencySet applies the AWG frequency and restarts the Scope, so the configuration is optional.
    dwf.FDwfAnalogImpedanceFrequencySet(hdwf, c_double(hz)) # frequency in Hertz
    # if settle time is required for the DUT, wait and restart the acquisition
    # time.sleep(0.01) 
    # dwf.FDwfAnalogInConfigure(hdwf, c_int(1), c_int(1))

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...