Jump to content

attila

Technical Forum Moderator
  • Posts

    6,469
  • Joined

  • Last visited

Everything posted by attila

  1. Hi @Tonguç Endem The backward compatibility is solved in newer beta versions: https://forum.digilentinc.com/topic/8908-waveforms-beta-download/
  2. Hi @logicmax The following example starts by generating a sawtooth then switches to square signal using FDwfAnalogOutNodeDataSet. Generated by AD2 and captured with ADP. import sys import time from ctypes import * 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") hdwf = c_int() channel = c_int(0) # AWG 1 print("Opening first device...") #dwf.FDwfEnum(0,0) 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.FDwfAnalogOutNodeEnableSet(hdwf, channel, 0, c_bool(True)) dwf.FDwfAnalogOutNodeFunctionSet(hdwf, channel, 0, c_int(31)) #funcPlay dwf.FDwfAnalogOutNodeAmplitudeSet(hdwf, channel, 0, c_double(0.8)) cBuffer = c_int(0) dwf.FDwfAnalogOutNodeDataInfo(hdwf, channel, 0, 0, byref(cBuffer)) dwf.FDwfAnalogOutNodeFrequencySet(hdwf, channel, 0, c_double(1e3*cBuffer.value)) # 1kHz to sample rate rgdSamples = (c_double*cBuffer.value)() for i in range(0, cBuffer.value): # saw rgdSamples[i] = 2.0*i/cBuffer.value-1.0 dwf.FDwfAnalogOutNodeDataSet(hdwf, channel, 0, rgdSamples, cBuffer) dwf.FDwfAnalogOutConfigure(hdwf, channel, c_bool(True)) # start print("sawtooth started") time.sleep(5) for i in range(0, cBuffer.value): #square if i<cBuffer.value/2: rgdSamples[i] = -1 else: rgdSamples[i] = 1 dwf.FDwfAnalogOutNodePlayData(hdwf, channel, 0, rgdSamples, cBuffer) print("change to square") time.sleep(5) print("done") dwf.FDwfAnalogOutReset(hdwf, channel) dwf.FDwfDeviceClose(hdwf)
  3. Hi @logicmax 1. If you are using the Play mode the DataSet (prefill) and Configure (start) needs to be called only in the initialization. The following data chunks sent with PlayData, see AnalogOut_Play.py 2. If you are generating a periodic signal (FGen) and want to change the signal or other parameters: FDwfDeviceOpen(...) FDwfDeviceAutoConfigureSet(hdwf, 0); // the device will be configured only when calling FDwf###Configure ... FDwfAnalogOutConfigure(hdwf, channel, 1); // start Wavegen loop: ... FDwfAnalogOutOffsetSet(...) FDwfAnalogOutNodeDataSet(...) FDwfAnalogOutConfigure(hdwf, channel, 3); // apply, do not change state 3. A non-intended usage of Play mode, if you only want to change the generated periodic signal could be using the FDwfAnalogOutNodePlayData. With this method the full device buffer size of data should be sent and frequency set as sample rate. This method should be faster than 2. since only the data is sent, other configurations are not applied. 2-3 Depending on the generator rate you may notice altering samples at the output, from the previous and new signal. This due to the concurrence between write to device buffer and reading from this to the output.
  4. Hi @ees4all Wavegen (+-V) -> 100nF -> Scope 1 | DUT -> Scope 2 -> RefRes-> GND or Wavegen (3.7V+-V) -> Scope 1 | DUT -> Scope 2 -> RefRes-> GND
  5. Hi @blipton The Digital IOs can be used as OC/OD but on Analog Discovery the 0/3.3V protection circuit could draw significant current and the 5V signal may drop. The Wavegen outputs have no high impedance option but you could simulate (generate) 0/5V signals with these. Or you could use DIOs with external level shifter.
  6. Hi @longboard Yes, the procedure is the same.
  7. Hi @Sebastian C Use: # trigger detector mask: low & hight & ( rising | falling ) dwf.FDwfDigitalInTriggerSet(self.hdwf, c_int(0), c_int(0), c_int(1<<self.idxCS), c_int(1<<self.idxCS)) The FDwfDigitalSpi# functions are for master. For spy purpose it is suffice to use the FDwfDigitalIn functions, see: WF SDK/ samples/ py/ DigitalIn_Spi_Spy.py
  8. Hi @Resul I think you could use the FDwfAnalogImpedanceStatusInput example: AnalogNetwork_Analyzer.py dwf.FDwfAnalogImpedanceStatusInput(hdwf, c_int(0), byref(gain1), 0) # relative to FDwfAnalogImpedanceAmplitudeSet Amplitude/C1 dwf.FDwfAnalogImpedanceStatusInput(hdwf, c_int(1), byref(gain2), byref(phase2)) # relative to Channel 1, C1/C# For mode 0 (W1-C1-DUT-C2-R-GND) or 8 (AD IA adapter) : gain1 = Amp/VrmsC1 gain2 = VrmsC1/VrmsC2 VrmsC1 = A/gain1 VrmsC2 = A/gain1/gain2 Vrms = VrmsC1-VrmsC2 Irms = VrmsC2/Res Edit: Next software version will add such measurement options for the API.
  9. Hi @Camarillo Yes. The scope inputs are rated/protected up to +-50V relative to device ground. The range is 50V, with inputs between +-50V and offset -25V..+25V
  10. Hi @vkristof Yes. The Voltmeter and Logger tools basically perform scan capture in background and at the specified rate (Update time) calculate the DC, AC/DCRMS Just like performing separate captures on full device buffer size (at sample rate of buffer_size/update_time) for each set of value. With single just one set of value is calculated on device buffer size.
  11. Hi @criniod I still suspect there is a contact issue rather than damaged USB controller. Please try using the device with an older computer/laptop with ordinal USB Type A connector. For warranty and replacement contact the support.digilent at ni.com specifying the Date of Purchase, Seller and Purchase Order/ Web order Number
  12. Hi @Wayne Contello For the next version the progress is moved up, after the status: Thank you for the feedback.
  13. Hi @edwardjs If you are using the Logic Analyzer: - If you are using Digital Discovery you can capture up to 256M samples at up to 800MHz - With Analog Discovery you could record 100M samples at up to about 1MHz or using compression for burst at higher rate. With the Protocol tool SPI/Spy you can log data at similar rates.
  14. Hi @kang In Wavegen select Synchronized and check Run/Auto. The Wavegen trigger output is high while running. A trigger event is the edge of signal so the Scope will trigger only when Wavegen is started or restarted. With No Sync or Independent option the channels may drift from each other due to small difference in periods. With Sync option and finite Run time the channels are resynchronized periodically.
  15. Hi @sintech In the current WF version double click on Data view brings the selected time/sample to middle. For the next version I've added menu which lets you set first and last samples too. Then, this can be cut in a new tab.
  16. Hi @A-M You could synchronize them using the same trigger signal. At high frequency analysis you may notice the jitter between the independent oscillators of the devices.
  17. Hi @ees4all I don't know much about EIS but you probably need AC coupling for the Wavegen, like a 100nF. You could also try using 3.7V offset but it may take some time to charge (stabilize) the cell.
  18. Hi @Alejandro-Dev You could use a custom pattern and run it in repeated mode.
  19. Hi @sintech Could you elaborate this "Fit selection to window" ? How would you like to enter the amount of samples ? Type in the first index and number of samples ?
  20. Hi @A-M No. The adjustable DIO voltage 1.2-3.3V is the same for all IOs. If you are using these only as inputs, you can set it to 1.8V The ~0.8V logic threshold should be good for 1.8-3.3V signals. For outputs, depending on your requirements: - you could set it to 3.3V and use OD output for 1.8V signals with external pullup - or create resistive voltage divider for 1.8V - or use external level shifter/translator
  21. Hi @Alejandro-Dev The "Digital_Spi_Dual.py" examples is the following: dwf.FDwfDigitalSpiClockSet(hdwf, c_int(1)) # Clock = DIO-1, Digital Discovery DIO-25 dwf.FDwfDigitalSpiDataSet(hdwf, c_int(0), c_int(2)) # 0 DQ0_MOSI_SISO = DIO-2, Digital Discovery DIO-26 dwf.FDwfDigitalSpiDataSet(hdwf, c_int(1), c_int(3)) # 1 DQ1_MISO = DIO-3, Digital Discovery DIO-27 WaveForms SDK Reference Manual.pdf :
  22. Hi @sintech Use workspaces instead of projects. The projects are just instrument snapshots. A workspace represent a session and the name of the current one is shown in the app title. This contains all the used instruments and device options as well. The next version will improve cursor precision (for high position/range rations) and initial place glitch (in case the window is resized during workspace/project loading). Changing of byte/word order is not supported, only bit endianness. You can use delayed capture in normal (Repeated mode, like capture 1us a week after the trigger at 10ns precision) and in Record mode expressed in percentage. It is supported if you specify the WR signal as Clock for the Bus. The CS as Enable. You can add another Bus using the same data lines and different clock, like for RD... The next version will have "Add tab with visible data" button. This lets you cut chunks from a large capture. This data then can be processed, exported, saved....
  23. Hi @criniod It is most likely a contact issue. Does the microUSB plug enter in the socket AD2 fully? Some usb cables may have shorter metal tip. The plastic relief may hinder full insertion, this stumbling in the AD2 case.
×
×
  • Create New...