Piotr Rzeszut

  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Piotr Rzeszut

  1. @attila As always: Thank you very much Another suggestion: In scope we do have Average and Oversampling options. None is followed by maximum value, then decreasing to reach 1 (which is equivalent to none). Ex. for Oversampling, we have options arranged like this: None, 16, 8, 4, 2, 1 In my opinion better order would be to place None value next to minimal (and maybe replacing value of 1 by "1 (none)", so it will be: 16, 8, 4, 2, 1, None or 16, 8, 4, 2, 1 (none).
  2. Hi, Windows 7x64 Waveforms 3.8.22 (beta) Analog Discovery 2 / Digital Discovery Issue: inverting polarity in Protocol has no transfer to Logic analyzer window Steps to reproduce: Run Protocol Select UART Polarity: Inverted Click Logic Analyzer In Logic UART is set to be decoded with Standard polarity Suggestion: UART data should be also available with HEX formatting or other non-ASCII formats. Also an option to break line after N chars received would be nice Kind Regards
  3. No it cannot. You may use a mini computer like Orange pi.
  4. You have to connect a CAN transceiver to the AD2 to provide a physical layer.
  5. Hi, @remalytics It can be definitely done by preparing custom software using Python, LabVIEW, etc...
  6. @attila, @Astro-Smart I am referring to Protocol window, where I can see ASCII representation of data. I am not sure if this representation will be visible in Protocol window only when it is selected in Logic, or permanently. If it is visible only when selected in Logic I think it would be ok, but permanently displaying ASCII in Protocol window may be confusing in some general use cases.
  7. Hi, @attila Would user be able to disable such decoding in Protocol mode? Sometimes such decoding is usefull, sometimes - it is not. Kind regards and thank's for a great job. PR
  8. These pins are disconnected from pin header in order to minimise parasitic parameters, I suppose. The only way to use BNC and 2.54 connector would be to solder some wires, but being aware that negative terminals of the scope are hardwired to GND. On the breadboard adapter all signals are routed to connectors. And you can use breadboard adapter with BNC adapter but with analog signals provided and probed using BNC cables/oscilloscope probes
  9. That would be suitable. I wonder if decoding some control characters would also be useful (like CR, LF).
  10. I also think that ascii representation would be nice as sometimes text data are being transmitted using other protocols.
  11. Hi, I have noticed an issue in WF 3.8.8 (beta) x64 Windows To reproduce: Run WF (device already plugged in - in my case DD) Run Protocol Enter a text in TX window (see attached image) Click send The Send button remains presses Click send again Change the text Click Send button Old text appears again ad. 3. ad. 5. ad. 6. ad. 9.
  12. TX and RX channels are defined in Protocol -> CAN Window: Functions for setting Rx and Tx channels are described in SDK Reference Manual: Also, in my opinion, you have to use a proper CAN transceiver for TX, as the transceiver is not only a level shifter, but realizes differential interface. Maybe you can monitor without a ttransceiver, if I/O threshold would be sufficient to voltage levels on one of CAN lines.
  13. Yes. First you should measure your resistance with a precise multimeter and enter it in Compensation window. Then open compensation is without load, and short is with shorted DUT terminals. Please be aware, that compensation should be repeated when you change frequency range, frequency step, etc.
  14. Have you performed calibration (open, short, ...)? Additionally such small capacitance can be a parasitic capacitance of cables, AD2 connector etc.
  15. Hi. I think that programming may be implemented quite easily using the WaveForms SDK (and for example a python script). In my opinion debugging would be harder to achieve, because it would require integration with existing debugging drivers.
  16. And also are you using USB cable provided with the AD2?
  17. Hi, NI myDAQ has an input sample rate of 200 kSPS and bandwidth of 400kHz, where AD2 has 100MSPS and 30MHz+ (with adapter) => point for AD2 NI myDAQ has maximum input voltage +-10V, where AD2 has +-25V => point for AD2 NI myDAQ has an output sample rate of 200 kSPS, where AD2 has 100MSPS => point for AD2 NI myDAQ has maximum output voltage of +-10V, where AD2 has +-5V => point for NI myDAQ NI myDAQ has a built-in multimeter (so it is able to measure in addition to voltage, also resistance, current, diode voltage without any additional adapters) AD2 requires separate adapters for such measurements => point for NI myDAQ NI myDAQ has fixed +-15V supplies (32 mA) and +5V (100mA), where AD2 has 0...5V and 0...-5V voltage outputs (700mA max with external power supply) => point for ??? Ni myDAQ has 8 digital IO, where AD2 has 16 of them. Also AD2 IOs can be controlled much faster than ones in myDAQ => point for AD2 This is a fast comparison of a key features. Full documentation of each device are available here: https://reference.digilentinc.com/reference/instrumentation/analog-discovery-2/reference-manual http://www.ni.com/pdf/manuals/373061f.pdf Summing up all above (in my opinion): AD2 is a better choice for debugging fast analog and analog/digital circuits. A software adds a great value by allowing various measurements and tools without any need of programming. Also an interface for python scripting allows designing own applications. There is also LabVIEW interface provided. You can always see all these functions in interactive demo - just download recent Waveforms software. https://reference.digilentinc.com/reference/software/waveforms/waveforms-3/start NI myDAQ offers much slower I/O and less digital channels. At the other hand it can be used as off-the-shelf multimeter`. It also includes basic software and interface for LabVIEW, but lacks for example interface control (I2C, SPI, ...). http://www.ni.com/tutorial/11431/en/ Also AD2 can be purchased in reduced price for academic use. This is of course my private opinion on these devices - you have to decide which one to buy by analyzing use cases.
  18. It looks great! Will there be a switch between new and old mode? Or per-channel option hide/show channel scale? The option may be a thing for users of smaller screens.
  19. Hi @attila, Thank you for your answer. In my next attempts I have removed aligning of the data, and achieved the same using following settings: # number of samples after trigger dwf.FDwfDigitalInTriggerPositionSet(hdwf, c_int(0)) # number of samples before trigger dwf.FDwfDigitalInTriggerPrefillSet(hdwf, c_int(1)) It would be nice to include information what effect have setting one of these parameters to 0 or -1 in the documentation. The explanation of the glitches is very clear, as we are running devices with separate clock domains without any synchronization stages - it turned out to be very nice demonstration of the effect
  20. Well, first of all, as You set trigger to normal, only data before (around) the trigger will be saved. Second question is how fast acquisition do you need? You can always write a python script, as I am doing now. Maybe @attila will give you soon more complete answer
  21. I think triggering in normal mode on that data with correct trigger position i.e. long enough pre-trigger time/correct position. See Mode: record
  22. Well, I figured out somehow following code: """ DWF Python Example Author: Digilent, Inc. Revision: 11/24/2014 Requires: Python 2.7, numpy, """ from ctypes import * from dwfconstants import * import math import sys import time import matplotlib as mpl import matplotlib.pyplot as plt 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() sts = c_byte() cdevices = c_int() devicename = create_string_buffer(64) # print DWF version version = create_string_buffer(16) dwf.FDwfGetVersion(version) print "DWF Version: " + version.value #enumerate and print device information #4 for AD2 dwf.FDwfEnum(c_int(0), byref(cdevices)) print "Number of Devices: "+str(cdevices.value) # open device print "Opening device:" for i in range(0, cdevices.value): dwf.FDwfEnumDeviceName (c_int(i), devicename) if devicename.value == "Digital Discovery": dwf.FDwfDeviceOpen(c_int(i), byref(hdwf)) print "\t", i, " : ", devicename.value if hdwf.value == hdwfNone.value: print "failed to open device" quit() print "Configuring Digital Out / In..." dwf.FDwfAnalogIOChannelNodeSet(hdwf, c_int(0), c_int(1), c_double(3.3)) time.sleep(0.1) dwf.FDwfDigitalInReset(hdwf) #dwf.FDwfDigitalOutReset(hdwf) dwf.FDwfDigitalInInputOrderSet(hdwf, c_bool(False)) # generate counter #for i in range(0, 8): # dwf.FDwfDigitalOutEnableSet(hdwf, c_int(i), c_int(1)) # dwf.FDwfDigitalOutDividerSet(hdwf, c_int(i), c_int(1 << i)) # dwf.FDwfDigitalOutCounterSet(hdwf, c_int(i), c_int(1000), c_int(1000)) #dwf.FDwfDigitalOutConfigure(hdwf, c_int(1)) # set number of sample to acquire nSamples = 200000 rgwSamples = (c_uint8 * nSamples)() cAvailable = c_int() cLost = c_int() cCorrupted = c_int() iSample = 0 fLost = 0 fCorrupted = 0 # in record mode samples after trigger are acquired only dwf.FDwfDigitalInAcquisitionModeSet(hdwf, acqmodeRecord) # sample rate = system frequency / divider, 100MHz/100 = 1MHz dwf.FDwfDigitalInDividerSet(hdwf, c_int(100)) # 16bit per sample format dwf.FDwfDigitalInSampleFormatSet(hdwf, c_int(8)) # number of samples after trigger dwf.FDwfDigitalInTriggerPositionSet(hdwf, c_int(0)) # 50% # number of samples before trigger dwf.FDwfDigitalInTriggerPrefillSet(hdwf, c_int(1)) # enable data compression by select used lines dwf.FDwfDigitalInSampleSensibleSet(hdwf, c_int(0x00FF)) # trigger when all digital pins are low dwf.FDwfDigitalInTriggerSourceSet(hdwf, trigsrcNone) # trigger detector mask: low & hight & ( rising | falling ) # dwf.FDwfDigitalInTriggerSet(hdwf, c_uint(0xFFFF), c_uint(0), c_uint(0), c_uint(0)) # begin acquisition dwf.FDwfDigitalInConfigure(hdwf, c_bool(1), c_bool(1)) print "Starting record" mpl.rcParams['toolbar'] = 'None' ax1 = plt.gca() while True: dwf.FDwfDigitalInStatus(hdwf, c_int(1), byref(sts)) dwf.FDwfDigitalInStatusRecord(hdwf, byref(cAvailable), byref(cLost), byref(cCorrupted)) iSample += cLost.value iSample %= nSamples if cLost.value: fLost = 1 if cCorrupted.value: fCorrupted = 1 iBuffer = 0 while cAvailable.value > 0: cSamples = cAvailable.value # we are using circular sample buffer, make sure to not overflow if iSample + cAvailable.value > nSamples: cSamples = nSamples - iSample dwf.FDwfDigitalInStatusData2(hdwf, byref(rgwSamples, iSample), c_int(iBuffer), c_int(cSamples)) iBuffer += cSamples cAvailable.value -= cSamples iSample += cSamples iSample %= nSamples #print sts.value, " ", iSample if sts.value == DwfStateDone.value: break if not plt.get_fignums(): print "CLOSED" break ax1.clear() ax1.plot(rgwSamples) plt.pause(0.0001) dwf.FDwfDeviceClose(hdwf) print "Recording finished" if fLost: print "Samples were lost! Reduce sample rate" if cCorrupted: print "Samples could be corrupted! Reduce sample rate" f = open("record.csv", "w") for i in range(0, nSamples): iAlign = (i + iSample) % nSamples # first sample in our buffer is at iSample index f.write("%s\n" % rgwSamples[iAlign]) f.close() But quite often I get reading with nasty glitches: The signal is generated using Analog Discovery 2. For a connection I am using High-speed inputs 0..7 of DD and DIO 0..7 for AD2. Configuration of AD2: