Jump to content

attila

Technical Forum Moderator
  • Posts

    6,469
  • Joined

  • Last visited

Everything posted by attila

  1. Hi @criniod Try using the original or other USB cables you have at hand, other USB socket, HUB...
  2. Hi @su_21 Leave the 100/400MHz ADC sampling frequency and skip the unneeded samples to reduce to the required rate, or perform averaging/filtering. Changing the ADC freq would affect the vertical range (and offset), would require new calibration. The 4x input clock is useful to reduce the jitter, to have better accuracy.
  3. Hi @DurandA I don't notice any shutdown with latest WF version 3.16.3 or 3.16.31 https://reference.digilentinc.com/reference/software/waveforms/start https://forum.digilentinc.com/topic/8908-waveforms-beta-download/ from ctypes import * import sys import time from dwfconstants import * if sys.platform.startswith("darwin"): dwf = cdll.LoadLibrary("/Library/Frameworks/dwf.framework/dwf") else: dwf = cdll.LoadLibrary("dwf") hdwf = c_int() dwf.FDwfParamSet(DwfParamOnClose, c_int(0)) for i in range(10): dwf.FDwfDeviceOpen(c_int(-1), byref(hdwf)) if hdwf.value == 0: print("failed to open device") szerr = create_string_buffer(512) dwf.FDwfGetLastErrorMsg(szerr) print(str(szerr.value)) quit() dwf.FDwfDeviceAutoConfigureSet(hdwf, c_int(0)) dwf.FDwfAnalogIOChannelNodeSet(hdwf, c_int(0), c_int(0), c_double(1)) dwf.FDwfAnalogIOChannelNodeSet(hdwf, c_int(0), c_int(1), c_double(1.0+i/2)) dwf.FDwfAnalogIOEnableSet(hdwf, c_int(1)) dwf.FDwfAnalogIOConfigure(hdwf) dwf.FDwfDeviceClose(hdwf) from ctypes import * import sys import time from dwfconstants import * if sys.platform.startswith("darwin"): dwf = cdll.LoadLibrary("/Library/Frameworks/dwf.framework/dwf") else: dwf = cdll.LoadLibrary("dwf") cDev = c_int() dwf.FDwfEnum(0, byref(cDev)) if cDev == 0: print("no device detected") quit() dwf.FDwfParamSet(DwfParamOnClose, c_int(0)) hdwf = c_int() for i in range(10): dwf.FDwfDeviceOpen(c_int(0), byref(hdwf)) if hdwf.value == 0: print("failed to open device") szerr = create_string_buffer(512) dwf.FDwfGetLastErrorMsg(szerr) print(str(szerr.value)) quit() dwf.FDwfDeviceAutoConfigureSet(hdwf, c_int(0)) dwf.FDwfAnalogIOChannelNodeSet(hdwf, c_int(0), c_int(0), c_double(1)) dwf.FDwfAnalogIOChannelNodeSet(hdwf, c_int(0), c_int(1), c_double(1.0+i/2)) dwf.FDwfAnalogIOEnableSet(hdwf, c_int(1)) dwf.FDwfAnalogIOConfigure(hdwf) dwf.FDwfDeviceClose(hdwf)
  4. Hi @kazu See the Help tab or tutorials at https://reference.digilentinc.com/software/waveforms/waveforms-3/start No. The Protocol uses the Pattern Generator and Logic Analyzer device resources, so it can't be used at the same time.
  5. Hi @DurandA Use the following in all apps and scripts using the device: ... dwf.FDwfParamSet(DwfParamOnClose, c_int(0)) # 0 = run, 1 = stop, 2 = shutdown dwf.FDwfDeviceOpen(... dwf.FDwfDeviceAutoConfigureSet(hdwf, c_int(0)) # 0 = the device will be configured only when calling FDwf###Configure ... dwf.FDwfAnalogIOChannelNodeSet(hdwf, c_int(0), c_int(0), c_double(True)) dwf.FDwfAnalogIOChannelNodeSet(hdwf, c_int(0), c_int(1), c_double(1.20)) dwf.FDwfAnalogIOEnableSet(hdwf, c_int(True)) dwf.FDwfAnalogIOConfigure(hdwf) ... dwf.FDwfDeviceClose...
  6. Hi @ABwalker Such configuration is not available. You could use the Scope Record mode to capture more samples at lower rate < 1-2MHz
  7. Hi @bhysjulien Most probably the voltage is out of range on the selected 5Vpk2pk range. Set it to 50V like this: dwf.FDwfAnalogInChannelRangeSet(hdwf, c_int(0), c_double(50)) # channel 1 dwf.FDwfAnalogInChannelRangeSet(hdwf, c_int(1), c_double(50)) # channel 2
  8. Hi @DavidLee1997 dwf.h DWFAPI int FDwfDigitalI2cTimeoutSet(HDWF hdwf, double sec);
  9. Hi @DavidLee1997 https://forum.digilentinc.com/topic/8908-waveforms-beta-download/
  10. Hi @kazu Triggering in Protocol is not supported but you can create a Pattern of such signal and trigger it by Scope like this:
  11. Hi @ZAT Use Record Mode for longer capture.
  12. Hi @DavidLee1997 timeout = normal-i2c-transfer-time + ( 25ms X number-of-bytes) + 1sec The next SDK version will add timeout option.
  13. Hi @Harsh Bolia Next to a blown IC others may be damaged as well. Which IC is blown? The USB connector re-solder or replacement should be viable.
  14. Hi @wsz You could store the measurements in array and write to file only at the end. You can also capture the min/max values directly in the Scope like this:
  15. Hi @Wayne Contello It looks like in some places instead of the Digital color the Style is used. As a solution use the Dark Style option.
  16. Hi @sergiodorazio At the time when these arguments where added the Script had no tabs, only one script could exist. The next WF version (3.16.31) will support selecting the tab, reusing the script argument to load a file, like: WaveForms mywork.dwf3work -script "tab 2"
  17. Hi @kazu It could be done like this: for(var t = 0; t < 10 && wait(0.5); t++){ // wait 500ms Scope.single() Protocol.I2C.Write(0x2A) Scope.wait() // Scope trigger on Ch0-SDA falling, T0 var rg = Scope.Channel2.data // SCL var i0 = Scope.Channel2.IndexOfTime(0) // sample index at T0 var i1 = 0 // count SCL samples above 1.5V, dT SDA->SCL while(i1 < rg.length && rg[i1]>1.5) i1++ var dt = (i1-i0)/Scope.Time.Rate.value print(t, dt*1e6,"us") }
  18. Hi @HILO Yes, it is broken. The next build will be out soon. Thank you for the observation.
  19. Hi @sergiodorazio The selected script tab will be executed, as the workspace was saved. Save separate workspace with each script.
  20. Hi @oconn828 See the following post:
  21. Hi @sergiodorazio Voltmeter.run() wait(0.1) for(var i = 0; i < 10 && wait(Voltmeter.State.Update.value); i++){ print(Voltmeter.Input.Channel1.DC.value) }
×
×
  • Create New...