Jump to content

attila

Technical Forum Moderator
  • Posts

    6,668
  • Joined

  • Last visited

Everything posted by attila

  1. Hi @Alessandro Are you using the latest sw version ? Do you see the same behavior with WaveForms application ? It is easier to use the app for troubleshooting, modify settings and see the result.
  2. Hi @Steve_3 It comes to mind now, to have consistent capture phases trigger the AWG on Scope. dwf.FDwfAnalogOutTriggerSourceSet(hdwf, c_int(ChNum), trigsrcAnalogIn) dwf.FDwfAnalogOutConfigure(hdwf, c_int(0), c_int(1)) dwf.FDwfAnalogInConfigure(hdwf, c_int(1), c_int(1)) You can also set: AnalogOutRepeatSet 0 infinite AnalogOutRepeatTriggerSet 1 This way, new generator outputs are automatically performed by the device for each capture. There is no need to reconfigure the Scope or AWG in the loop, just read the captures: def trigger_and_read_ch0(rgdSamples,numSamp): while True: dwf.FDwfAnalogInStatus(hdwf, c_int(1), byref(sts)) if sts.value == DwfStateDone.value: break dwf.FDwfAnalogInStatusData(hdwf, 0, rgdSamples, numSamp) # get channel 1 data y = 0 return y
  3. Hi @Steve_3 The fundamental problem is that the sampling is not synchronized. The Scope with decimate sampling for 1MHz stores every 100th ADC conversion, but this sampling is not synchronized with the AWG output, so consequent captures can have 100 phases. This Scope sampling start can not be synchronized with any trigger source. The only option would be using 100MHz sampling, but the AD2 is limited up to 16ki samples with the 2nd device configuration.
  4. Hi @Alessandro See the following: from ctypes import * from dwfconstants import * import math import time import matplotlib.pyplot as plt import sys import numpy if sys.platform.startswith("win"): dwf = cdll.dwf elif sys.platform.startswith("darwin"): dwf = cdll.LoadLibrary("/Library/Frameworks/dwf.framework/dwf") else: dwf = cdll.LoadLibrary("libdwf.so") #declare ctype variables hdwf = c_int() version = create_string_buffer(16) dwf.FDwfGetVersion(version) print("DWF Version: "+str(version.value)) dwf.FDwfParamSet(DwfParamOnClose, c_int(0)) # 0 = run, 1 = stop, 2 = shutdown #open device print("Opening first device") dwf.FDwfDeviceOpen(c_int(-1), byref(hdwf)) if hdwf.value == hdwfNone.value: szerr = create_string_buffer(512) dwf.FDwfGetLastErrorMsg(szerr) print(szerr.value) print("failed to open device") quit() dwf.FDwfDeviceAutoConfigureSet(hdwf, c_int(0)) # 0 = the device will only be configured when FDwf###Configure is called sts = c_byte() sampling_frequency = 10000 #500000 hzAcq = c_double(sampling_frequency) nSamples = 300 rgdSamples1 = (c_double * nSamples)() rgdSamples2 = (c_double * nSamples)() rgwDigital = (c_uint16 * nSamples)() cAvailable = c_int() cLost = c_int() cCorrupted = c_int() fLost = 0 fCorrupted = 0 sampling_time = 1 / sampling_frequency ############ set up acquisition ################ dwf.FDwfAnalogInChannelEnableSet(hdwf, c_int(0),c_int(1)) # the acquired channel is the scope 1+,1- dwf.FDwfAnalogInFrequencySet(hdwf, hzAcq) dwf.FDwfAnalogInBufferSizeSet(hdwf, c_int(nSamples)) dwf.FDwfAnalogInTriggerPositionSet(hdwf, c_double(0.5*nSamples/hzAcq.value)) ############ set up trigger ###################### dwf.FDwfAnalogInTriggerSourceSet(hdwf, trigsrcExternal1) # trigsrcDetectorAnalogIn ################# ACQUISITION ######################### sts = c_byte(0) rgdSamples1 = (c_double * nSamples)(0) rgdSamples2 = (c_double * nSamples)(0) rgwDigital = (c_uint16 * nSamples)(0) print("Starting oscilloscope") # dwf.FDwfAnalogInConfigure(hdwf, c_int(0), c_int(1)) dwf.FDwfAnalogInConfigure(hdwf, c_int(True), c_int(True)) iSample = 0 while True: if dwf.FDwfAnalogInStatus(hdwf, c_int(1), byref(sts)) != 1: szerr = create_string_buffer(512) dwf.FDwfGetLastErrorMsg(szerr) print("Error:") print(szerr.value) quit() if sts.value == DwfStateDone.value : break time.sleep(0.1) dwf.FDwfAnalogInStatusData(hdwf, 0, rgdSamples1, nSamples) # get channel 1 data dwf.FDwfAnalogInStatusData(hdwf, 1, rgdSamples2, nSamples) # get channel 2 data print("Acquisition done") if fLost: print("Samples were lost! Reduce frequency") if fCorrupted: print("Samples could be corrupted! Reduce frequency") rgdSamples1 = numpy.array(rgdSamples1, dtype=float) rgdSamples2 = numpy.array(rgdSamples2, dtype=float) plt.plot(numpy.fromiter(rgdSamples1, dtype = numpy.float)) plt.plot(numpy.fromiter(rgdSamples2, dtype = numpy.float)) plt.show()
  5. Hi @Steve_3 You are generating 4.33MHz sine and capturing it with 1MHz, so you are only capturing an alias of the output. Is this what you want ?
  6. Hi @Steve_3 Are you using low voltages and setting the input range to low, 5Vpk2pk ? FDwfAnalogInChannelRangeSet You could send me or attach the script.
  7. Hi @Empower Unfortunately, this project was not created by Digilent, but I hope we can solve its maintenance.
  8. Hi @jasonkee111 Specify command byte(s) in SubAddress field and use Read button, or specify argument for Read function in Custom and Sensor mode, and Script.
  9. Hi @Wayne Contello Thank you for the information. It looks like the communication with the device failed, probably the USB got disconnected, and adept runtime crashed on the following software disconnect/close. So far I was unable to reproduce this. @malexander Do you see something suspicious in multithreading with DVT::Term() DoTransThread() DoTimeoutThread() ?
  10. Hi @k_b Slow transitions plus noise can can cause ringing-like false triggers. In the following picture a glitch trigger was used to catch such an event. To reduce the chance of this use faster slew signal, and shielded or twisted signal wire with ground to reduce noise, or use pulse timeout trigger. Currently the max edge is 1.25ns (due to 800MHz internal sampling) but I'll try to add glitch filter adapting sample rate in the next sw version.
  11. Hi @janpi A floating high impedance input is not a good metric, it can pick up random radiation from anywhere.
  12. Hi @Oleg I'm glad the problem was resolved and sorry for the issue. A notification has already been sent to the testing house to ensure that the following batches are packed without headers.
  13. Hi @matthew-aedapt It would be helpful if you could provide more information, attach a screenshot or workspace with data... The Format can be specified in the I2S configuration: This is a script for logging the value: var rg = Logic1.Channels.I2S.events; //events var rgt = Logic1.Channels.I2S.eventStamps; // event time stamps var c = rg.length-1; // number of events var i = 0; if(rg[0].charAt(0)!="R") i++; // make sure to start with right var file = File("~/Desktop/i2s.csv"); file.writeLine("Right,Left"); for(; i < c; i+=2){ // trim leading R/L char print(rg[i].substring(2), rg[i+1].substring(2)); file.appendLine(rg[i].substring(2)+","+rg[i+1].substring(2)); }var rg = Logic1.Channels.I2S.events; //events var rgt = Logic1.Channels.I2S.eventStamps; // event time stamps var c = rg.length-1; // number of events var i = 0; if(rg[0].charAt(0)!="R") i++; // make sure to start with right var file = File("~/Desktop/i2s.csv"); file.writeLine("Right,Left"); for(; i < c; i+=2){ // trim leading R/L char print(rg[i].substring(2), rg[i+1].substring(2)); file.appendLine(rg[i].substring(2)+","+rg[i+1].substring(2)); }
  14. Hi @Oleg Check that you are connected to the correct COM port. COM# becomes available after ADP is turned on/connected, in Windows Device Manager COM# should be FTDIBUS... If there is no ADP USB device and no output on COM port, this means that the device/Zynq is not booting. You could open the device (remove rubber feet, unscrew) to make sure that J15 is not shorted with a jumper (behind the Reset button, "USB DEVICE" label). You can remove jumpers (J15, J12) as these are not required. (The J15 is only shorted for initial device programming, then removed for the subsequent testing and calibration. I assume the header was accidentally placed after the procedure.) If not, the device may have been damaged in transit. For warranty and replacement contact the support.digilent @ ni.com specifying the Date of Purchase, Seller and Purchase Order/ Web order Number.
  15. Hi @janpi I don't know what could be the cause of this. You could use Filter channel to filter hf components and/or various averaging options in the application. Edit: To measure the input 'internal' noise a (50R) terminator or a very short wire shorting the BNC input should be used. Additional wire will absorb more radiation. For instance a probe ground loop can be used to locate the source/orientation of the radiation:
  16. Hi @k_b To prevent edge trigger on glitch, the timeout trigger can be used:
  17. Hi @Oleg Make sure the COM port is set to 115.2 kbps On reset the firmware should print something like this: After PL programming, the front LED starts blinking during the software is initialization. For Linux it takes a few seconds, but baremetal (standard/recovery) loads quickly so the LED only blinks once.
  18. Hi @janpi It looks like you have a nearby radiation source of about 16 4.1 MHz. With shorted probe end I see about 5mV pk2pk noise, C3 of ADP3450 is in location C1 of ADP3250. (For nicer UI on MacOS and Linux, recommend to use the Settings/Options/Style: Fusion)
  19. Hi @ysrevol There is no such option, only sampling on trigger (Time/Options/Sampling) or post-processing the captured data like this: default.dwf3work
  20. Hi @Wayne Contello Notice the samples lost warning. The record uses data streaming which has limitation in average toggle rate. You could try reducing the sample Rate, the Samples captured or use the default Repeated Mode.
  21. Hi @TOIVI Currently the break trigger uses a negative pulse of at least 9 bits long, 1 + uart bits + ?parity, which is on the limit of NUL. It will be fixed in the next version 3.21.14 to be 10 bits long. Alternatively configure a pulse trigger of at least 520us
×
×
  • Create New...