-
Posts
6,469 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Gallery
Everything posted by attila
-
Unable to connect to Analog Discovery 2
attila replied to criniod's question in Test and Measurement
Hi @criniod Try using the original or other USB cables you have at hand, other USB socket, HUB... -
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.
-
FDwfDeviceOpen disables power supply on Analog Discovery 2
attila replied to DurandA's question in Test and Measurement
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) -
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.
-
FDwfDeviceOpen disables power supply on Analog Discovery 2
attila replied to DurandA's question in Test and Measurement
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... -
Python Script Not Reading Oscilloscope Channel 1 Voltage Correctly
attila replied to bhysjulien's question in Test and Measurement
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 -
Digital Discovery I2C Clock Stretching
attila replied to DavidLee1997's question in Test and Measurement
Hi @DavidLee1997 dwf.h DWFAPI int FDwfDigitalI2cTimeoutSet(HDWF hdwf, double sec); -
Is (beta version)digilent.waveforms_beta_v3.16.30.dmg borken?
attila replied to HILO's question in Test and Measurement
Hi @HILO -
Digital Discovery I2C Clock Stretching
attila replied to DavidLee1997's question in Test and Measurement
Hi @DavidLee1997 https://forum.digilentinc.com/topic/8908-waveforms-beta-download/ -
Hi @kazu Triggering in Protocol is not supported but you can create a Pattern of such signal and trigger it by Scope like this:
-
Hi @ZAT Use Record Mode for longer capture.
-
Digital Discovery I2C Clock Stretching
attila replied to DavidLee1997's question in Test and Measurement
Hi @DavidLee1997 timeout = normal-i2c-transfer-time + ( 25ms X number-of-bytes) + 1sec The next SDK version will add timeout option. -
Serviceability of damaged Analog Discovery-1 kit?
attila replied to Harsh Bolia's question in Test and Measurement
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. -
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:
-
-
voltmeter script complete example
attila replied to sergiodorazio's question in Test and Measurement
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" -
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") }
-
Is (beta version)digilent.waveforms_beta_v3.16.30.dmg borken?
attila replied to HILO's question in Test and Measurement
Hi @HILO Yes, it is broken. The next build will be out soon. Thank you for the observation. -
voltmeter script complete example
attila replied to sergiodorazio's question in Test and Measurement
Hi @sergiodorazio The selected script tab will be executed, as the workspace was saved. Save separate workspace with each script. -
-
Hi @oconn828 See the following post:
-
voltmeter script complete example
attila replied to sergiodorazio's question in Test and Measurement
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) }