Jump to content

attila

Technical Forum Moderator
  • Posts

    6,956
  • Joined

  • Last visited

Posts posted by attila

  1. Hi @StefKay

    1. Yes

    dwf.FDwfDeviceOpen(-1, byref(hdwf))
    # the device will only be configured when FDwf###Configure is called
    dwf.FDwfDeviceAutoConfigureSet(hdwf, c_int(0)) 
    ...
    dwf.FDwfAnalogOutFrequencySet(hdwf, 0, c_double(hzNow))
    dwf.FDwfAnalogOutConfigure(hdwf, 0, 3)


    2. Unfortunately no. The channels need to be restarted to be in phase.

  2. Hi @Thomas1983

    The FDwfAnalogInStatusSample return only one sample for each FDwfAnalogInStatus(hdwf, 0 or 1, &sts)
    Collecting data this way will be done at inaccurate software/usb timing, 0.125ms to 10ms depending on system, load...

    The FDwfAnalogInStatus(hdwf, 1, &sts) FDwfAnalogInStatusData(...) returns capture with the specified frequency.
    The spacing between samples will be very precise, down to picoseconds, and trigger position at sample period precision, or better if you use FDwfAnalogInTriggerPositionStatus. If you don't use trigger the first sample will be collected immediately, with software/usb latency with us-ms delay. So, the approximate timing will be start_time+j/hzAcq.value as it is in VoltageWithTimestamp2.py Just use proper data&time instead perfcounter.

  3. Hi @MarchP

    My answer was for the following question:

    2 hours ago, MarchP said:

    Is it possible to generate this pulse with the eclypse Z7 and Zmod AWG card and your Waveforms GUI application or SDK? If yes, how?

    It was not clear to me if you need a simple pulse for an external modulator ('another signal') or you want to do something more (AM/FM...) in the device.

    If software control accuracy is acceptable, the Script tool or custom application/script may be an easier approach than using the EclypseZ7 as development board:
    https://digilent.com/reference/programmable-logic/eclypse-z7/star

     

  4. Hi @Thomas1983

    The samples are collected at the specified rate, at system frequency / N. FDwfAnalogInFrequencyGet returns the actual rate.

    The perfcounter you have used usually returns high resolution 'CPU' counter value, useful for dt measurements, but not for date&time.

    With AD1,2 you can use software timestamp + sample index/rate

    Newer devices AD3, ADP2230, ADP3X50... have a high resolution counter used for trigger timestamp (8-10ns) which is synchronized on software connection. The FDwfAnalogInStatusTime returns this and can be used to annotate +/- sample index relative to T0.

     

     

  5. Hi @Thomas1983

    As it is in most of the examples configure, wait, configure or ignore the first capture since this was performed before settle time.

    dwf.FDwfAnalogInConfigure(hdwf, c_int(1), c_int(0))
    # wait at least 2 seconds with Analog Discovery for the offset to stabilize, before the first reading after device open or offset/range change
    time.sleep(2)

    print("Starting repeated acquisitions")
    dwf.FDwfAnalogInConfigure(hdwf, c_int(0), c_int(1))

    For AD1,2 about 2sec is required and around 0.1sec with newer devices, mostly for the offset R/C to settle.
    The wait also depends on the accuracy you want to achieve. For more accurate measurement with any device you should wait about 10 minutes to reach its stable operation al temperature.

    You can also set the following before device open, used in many examples, 1 stop to have the device powered to prevent temperature drifts, or 0 continue running to also keep the last set offsets.

    dwf.FDwfParamSet(DwfParamOnClose, c_int(0)) # 0 = run, 1 = stop, 2 = shutdown
     

     

  6. Hi @Alexa

    I would list the options in difficulty order:
    - The easier would be using the WaveForms application, where you can simply adjust parameter and see the result.
    - To automate tasks you can use the Script tool of the WF app, the bottommost in the instrument list.
    - For simple tasks the dwfcmd command line application can also be used, which can be executed with arguments or task file.
    - For custom applications/scripts the WF SDK can be used, which can be optimized for better performance.

×
×
  • Create New...