Search the Community

Showing results for tags 'analog discovery 2'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News
    • New Users Introduction
    • Announcements
  • Digilent Technical Forums
    • FPGA
    • Digilent Microcontroller Boards
    • Non-Digilent Microcontrollers
    • Add-on Boards
    • Scopes & Instruments
    • LabVIEW
    • Other
  • General Discussion
    • Project Vault
    • Learn
    • Suggestions & Feedback
    • Buy, Sell, Trade
    • Sales Questions
    • Off Topic
    • Educators
    • Technical Based Off-Topic Discussions

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 111 results

  1. Hi, I find that LabView 2014 was not working with AD2-WaveForms 2015. After days of investigation now i know that it’s not working with WaveForms runtime 3.2.6 (latest) If i replace it with the WafeForms runtime 2.9.4 (older, from install file 3.1.5) all seems to work fine! Perhaps anyone can tell me what the consequences are ? and / or perhaps Digilent can make a backward compatible runtime? Thanks in advance, Sinserely, Hans Volbeda.
  2. Hello Digilent world First, before I write my questions, I would like to provide some information: - Used device: Analog Discovery 2 (revision 3) - Programming language is C++ - IDE: Visual Studio Community 2013, version 12 - Operating System: Windows 10 I am trying to control the device with the SDK but I got issues with the Digital-In-Instrument. I attached a .cpp file with my code. My aim is to configure digital pin 0 to take 1000 samples as soon as a rising edge on the same pin occurs. To generate a rising edge on this pin, I connect digital pin 0 and digital pin 1 and configure pin 1 to pulse on enabling. I checked if the pulse on pin 0 really occurs: This works fine. Furthermore, I try to read out the logged samples after the triggering and print them on the console. Now the description of my problems: - With the following code I expect the digitalIn Instrument to be armed just one time (setting of acqmodeSingle in row 27). But the print on row 76 prints "DwfStateArmed". I expect it to stay on "DwfStateDone". Do I missunderstand something here? - I totally don't understand the format of the data that I get with FDwfDigitalInStatusData(...) In the digilent examples I saw it like this: FDwfDigitalInStatusData(deviceId, Pointer to array with size of "nrOfSamples", nrOfSamples*sizeof(unsigned short)) Why is there a multiplication with the size of an unsigned short? - Could you please explain me, in which format the logged values are stored in the data-array? Is it a bitfield with the value of each pin or something different? Thank you very much in advance for the given answers. If somethings not clear, don't hesitate to ask. Kind regards Aaron example.cpp
  3. jma_1

    Waveforms CAN bus

    I am new to the WaveForms software. In browsing the protocol section, it lists CAN. I'm happy and surprised to see this feature. How is this intended to be used? For example, using an external CAN bus transceiver to DIO 0 and DIO 1? A two wire CAN bus is a differential signal (similar to RS485) with clear limits on dominant / recessive states. I am using the Analog Discovery 2 hardware. What are the recommended connections? I'm hoping any responses to this will also apply to the logic analyzer as well. Having a CAN bus decoder would be awesome. WaveForms: 3.8.2 64 bit; Qt 5.6.3; Windows 7 Hardware: Analog Discover 2 Cheers, JMA
  4. I wish to use the Analog Discovery 2 as a power supply for a set up which will involve variable currents through a helmholtz coil configuration in order to model the Upper Atmosphere's Magnetic Field. I will be running a real time model in Simulink that will contain values of the magnetic field in several directions. I have the coils set up so that a known current, and thus voltage, should be able to create the magnetic field in the center, which will be detected by a magnetometer. I would like to send the Simulink values to the Analog discovery to alter the voltage output of the Analog Discovery accordingly so that the current in the coil setup can vary in real time, thus spoofing the magnetic field for the magnetometer. Is this something that is possible with the Analog Discovery 2.
  5. I'm using WaveForms (and Javascript) for the first time. My problem is really simple; I measure a voltage signal with the Analog Discovery 2, and want to get a "long" file with data over several seconds. When using the record-function and exporting data, I only get 1000.000 data points with the frequency required, and I can't seem to figure out how to save the raw data in the script. If anyone can help this rookie, I'll be very grateful! I think I'll need a whole new script, but it looks like this right now: ch = Scope.Channel1 var newfile = File("~/Desktop/scope/measure.csv") if(!nyfil.exist()){ var AllData = Date()+","+ch.data+" nyfil.appendLine(AllData) Index++
  6. I want to control Analog Discovery 2 in micro second order using Waveforms 2015. Control procedure in Waveforms 2015 is as follows, 1.Run the Wavegen and keep it for 250 microseconds. 2.Run the Scope 54 microseconds after running the Wavegen and keep it for 186 microseconds. 3.Output the Scope data of 186 microseconds. When I do this, setting of analog discovery 2 is Connect 1+ to W1 and 1- to GND. Is this possible with Waveforms 2015? Thanks.
  7. Hi, I'm considering buying one of these to play with but I was wondering which version is best: the one from Digilent, or the NI edition from National Instruments. What exactly is different between both? Thanks! Stuk
  8. Hello, Learning to create/manage custom scope measurements in Waveforms for the AD2. So far I have created a couple of custom measurements but do not understand how/what is actually going on regarding how they are managed. Any help would be appreciated. Here are the steps I took to create a custom measurement: Added the "stock" Custom Channel measurement Modified it Changed its name to Capacitor Value Saved the script in a directory as a txt file Subsequently: Modified the measurement script (Capacitor Value) some more Changed its name to CapVal Saved the updated script txt file Here is where I am confused: When I go to the Custom Measurement drop down menu is see BOTH custom measurement scripts listed. I had assumed that when I changed the measurement name and saved the modified script by overwriting the script text file that there would be no trace of the original script - but this is not the case. QUESTIONS: How/where are custom measurements saved? Are custom measurement scripts they stored internal to Waveforms based on their name in the measurement editor window? What does the script->save menu do - let you save for off-line editing only? How do you remove custom measurement scripts from the "add measurement" menu? What is the correct way for creating and managing custom measurement scripts? Is there documentation/resources that already exist that can be referred to? Again, any help would be appreciated. Thanks. TerryF
  9. Hello, I am trying to send oscilloscope data from the Analog Discovery 2 to the Arduino Uno. Would there be a way I could do this so that the Arduino could read it in live time? Miranda
  10. I was wondering whether it is possible to use the second function generator while the first one is being used for the network analyzer tool. Here is the use case: I'm testing part of a class-D amplifier, in which the triangle wave to the comparator is generated by the second function generator of the Analog Discovery 2. I'd like to use the network analyzer interface to characterize the amplifier, while keeping a fixed triangle wave on channel 2. I realize that there is probably some way to write a script to do this, but it would be nice to have all the GUI of the network analyzer and export.
  11. Hello, I’m trying to generate the data whose length is over 1000bits by using the pattern generator in Analog discovery 2. I use Microsoft Excel VBA or Python and command FDwfDigitalOutDataSet. But the VBA cannot treat the int data whose length is over 1000bit in binary. Is there any way to transmit the large data to the pattern generator by using VBA or Python? Thanks.
  12. Hi, I'm trying to measure the capacitance of a sensor, and am using the impedance analyzer tool to do so. If I do not connect anything I notice it sees a 22pF parallel capacitance. Is this because the program does not automatically compensate for the internal 24pF capacitance? EDIT: I am using the Analog Discovery 2 with Waveforms 3.8.2
  13. I encountered a peculiar issue when using AWG2 of the Analog Discovery 2. Physical connections were as follows: 1+ to W2 1- to GND When AWG2 is set to generate a sine wave voltage <= 1.00V, the output seems to be a clipped version of a voltage referenced to +5V (USB +ve rail). At any voltage above that (>1.001), the output is fine. I'm using Waveforms 3.8.2 on a 64bit Win10 PC. I've attached a screen capture:
  14. Hello, I have some problems with jitter with analog discovery 2 during acquisition with a python script. I used both AnalogIn_Record.py (after parsing with futurize to comply with python 3.5) and a modified version using ScanScreen as acquisition mode (see attachment). The last one can run much faster than the suggested AnalogIn_Record.py. I can reach 1MHz sampling rate. """ DWF Python Example Author: Digilent, Inc. Revision: 10/17/2013 Requires: Python 2.7, numpy, matplotlib python-dateutil, pyparsing """ from __future__ import division from __future__ import print_function from builtins import range from past.utils import old_div from ctypes import * from dwfconstants import * import math import time import matplotlib.pyplot as plt import sys from scipy.fftpack import fft import numpy as np 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() hzAcq = c_double(1000000) hzGen = c_double(1000000/8) nSamples = 1000000 rgdSamples = (c_double*nSamples)() #rgdSamples16 = (c_short*nSamples)() pidxWrite = c_int() acqMode = acqmodeScanScreen filterMode = filterAverage #print DWF version version = create_string_buffer(16) dwf.FDwfGetVersion(version) print("DWF Version: "+version.value.decode("utf-8")) #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.decode("utf-8")) print("failed to open device") quit() print("Preparing to read sample...") print("Generating sine wave...") dwf.FDwfAnalogOutNodeEnableSet(hdwf, c_int(0), AnalogOutNodeCarrier, c_bool(True)) dwf.FDwfAnalogOutNodeFunctionSet(hdwf, c_int(0), AnalogOutNodeCarrier, funcSine) dwf.FDwfAnalogOutNodeFrequencySet(hdwf, c_int(0), AnalogOutNodeCarrier, hzGen) dwf.FDwfAnalogOutNodeAmplitudeSet(hdwf, c_int(0), AnalogOutNodeCarrier, c_double(2)) dwf.FDwfAnalogOutConfigure(hdwf, c_int(0), c_bool(True)) #set up acquisition dwf.FDwfAnalogInChannelEnableSet(hdwf, c_int(0), c_bool(True)) dwf.FDwfAnalogInChannelRangeSet(hdwf, c_int(0), c_double(5)) dwf.FDwfAnalogInAcquisitionModeSet(hdwf, acqMode) dwf.FDwfAnalogInFrequencySet(hdwf, hzAcq) dwf.FDwfAnalogInChannelFilterSet(hdwf, c_int(0), filterMode) bufferLength = 8192 dwf.FDwfAnalogInBufferSizeSet(hdwf, c_int(bufferLength)) sts = c_int() dwf.FDwfAnalogInBufferSizeGet(hdwf, byref(sts)) print("Buffer length ", sts.value) bufferLength = sts.value #wait at least 2 seconds for the offset to stabilize time.sleep(2) #begin acquisition dwf.FDwfAnalogInConfigure(hdwf, c_int(0), c_int(1)) print(" waiting to finish") #time.sleep(0.1) cSamples = 0 sts = c_ubyte() cSamplesValid = c_int() idx = 1 pidxWrite = c_int() iterations = 1; while cSamples < nSamples: # Count iterations iterations += 1 dwf.FDwfAnalogInStatus(hdwf, c_int(1), byref(sts)) # print(sts.value) if cSamples == 0 and (sts == DwfStateConfig or sts == DwfStatePrefill or sts == DwfStateArmed) : # Acquisition not yet started. continue # Read index dwf.FDwfAnalogInStatusIndexWrite(hdwf, byref(pidxWrite)) # Calculate how many new samples are in the buffer availableSamples = (pidxWrite.value - idx)%(bufferLength) if cSamples + availableSamples > nSamples : availableSamples = nSamples-cSamples if idx + availableSamples <= bufferLength: dwf.FDwfAnalogInStatusData2(hdwf, c_int(0), byref(rgdSamples, sizeof(c_double)*cSamples), c_int(idx), c_int(availableSamples)) cSamples += availableSamples #print(iterations, "idx: ", idx, ", pidxWrite: ", pidxWrite.value, ", Valid samples: ", availableSamples, ", cSamples: ", cSamples) idx = pidxWrite.value else: #print("wrapping") #print(iterations, "idx: ", idx, ", pidxWrite: ", pidxWrite.value, ", Valid samples: ", availableSamples) availableSamples1 = bufferLength-idx dwf.FDwfAnalogInStatusData2(hdwf, c_int(0), byref(rgdSamples, sizeof(c_double)*cSamples), c_int(idx), c_int(availableSamples1)) cSamples += availableSamples1 #print(iterations, "idx: ", idx, ", pidxWrite: ", pidxWrite.value, ", Valid samples: ", availableSamples1, ", cSamples: ", cSamples) idx = 0 availableSamples2 = availableSamples-availableSamples1+1 dwf.FDwfAnalogInStatusData2(hdwf, c_int(0), byref(rgdSamples, sizeof(c_double)*cSamples), c_int(idx), c_int(availableSamples2)) cSamples += availableSamples2 #print(iterations, "idx: ", idx, ", pidxWrite: ", pidxWrite.value, ", Valid samples: ", availableSamples2, ", cSamples: ", cSamples) idx = pidxWrite.value #print(iterations, "idx: ", idx, ", pidxWrite: ", pidxWrite.value, ", Valid samples: ", availableSamples, ", cSamples: ", cSamples) print("Recording finished") # Close device dwf.FDwfDeviceCloseAll() # rgpy=[0.0]*len(rgdSamples) for i in range(0,len(rgpy)): rgpy[i]=rgdSamples[i] # Plot plt.figure(1) plt.clf() plt.plot(rgpy, '.') plt.show() # Plot fft a = np.array(rgpy) A = fft(a)/len(a) plt.figure(2) plt.clf() plt.semilogy(abs(A)) The problem however is not the speed, but the jitter which can be seen by the fft plot or by the drift of the lines in the standard plot when hzGen is a small sub-multiple of hzAcq (see figure). There is a 50 mV drift in 1 s. Is this depending on python code and on the host pc (ubuntu 16.04) or is implicit in the device? I would not expect such a large jitter from this kind of hardware. Is there a way to improve? Thank you in advance for the kind help. Best, Alberto
  15. I was thinking, whether it would be possible to extend the Analog Discovery 2's functionality as a JTAG or AVR programmer/debugger. Currently it is my preferred tool for almost all my needs on my electronics workbench. However, being able to use the AD2 for programming/debugging microcontrollers, would greatly improve its value.
  16. My project end goal is to log 9-bits data from an FPGA. The Analog discovery 2 can log data but I was wondering if it could for digital data as well. Thank you in advance
  17. gasstationwithoutpumps

    Auto-calibrate for Analog Discovery 2?

    How much would an "autocalibrate" board cost for the Analog Discovery 2 ? I think that one could be designed using the new chip of the new DMM board, as the calibration procedure given in the documentation only requires an accurate DC multimeter. Waveforms 3 already has an understanding of SPI and the necessary connections could be made with latching relays as on the impedance board (or with FETs). In looking at student results in lab for the 25 AD2s we bought, it seems that they ship with offsets as much as a couple of millivolts. Going through and hand-calibrating them would take too long and be very tedious (even if I had a trusted multimeter to use as a calibration source), but with an auto-calibrate board, we could get them all properly calibrated in an afternoon.
  18. gasstationwithoutpumps

    Bug: AD2 Impedance Meter export

    There is a bug in the export of data from the impedance analyzer from Waveforms (specifically from Waveforms 3.8.2 using the Analog Discovery 2, but I have seen it with earlier releases of Waveforms 3 also). The problem is that the frequencies are reported as if they were from a linear sweep, even though a logarithmic frequency sweep was done: #Date Time: 2018-07-01 16:50:47.258 #Trace: Trace #Start: 100 Hz #Stop: 1e+06 Hz #Steps: 101 #Resistor: 10000 Ω #Average: 10 #ProbeCapacitance: 1.04e+06 Ω #ProbeResistance: 4.3e-11 F #Compensation: Open Short #Wavegen: Wavegen1 #Amplification: 1 X #Settle: 20 ms #MinPeriods: 32 #Channel: Channel 1 #Range: 5.49577 V #Offset: -0.000318847 V #Attenuation: 1 X #Channel: Channel 2 #Range: 5.51181 V #Offset: -0.000280998 V #Attenuation: 1 X Frequency (Hz) Trace θ (°) Trace |Z| (Ω) Trace Ls (H) Trace Cs (F) 100 0.00067832392258167652 9971.9407134030535 0.00018789460945304077 -0.013481119008321029 10099 0.0018260127183053441 9972.4554790954317 0.00046132118972998595 -0.0045670615004842902 20098 0.0026165423173400044 9972.2098918719494 0.00060286028271848858 -0.0029068564833067186 Many of my students had problems with this bug last quarter, and we had to create a work-around in our gnuplot plotting scripts: #if the frequencies in your data file don't follow log increments use the code below # Written by Ali Fallahi #example: use plot 'data' u (correct($1)):3 instead of plot 'data' u 1:3 freq_u=1e6 #last frequency freq_l=10 #first frequency NoOfSamples=101 #number of samples indexno(f)=(NoOfSamples-1)*(f-freq_l)/(freq_u-freq_l) correct(f)=10**(log10(freq_l)+indexno(f)/(NoOfSamples-1)*log10(freq_u/freq_l)) ## plot 'measuring-10kohm-buggy-freq.txt' u (correct($1)):3 title '10k{/Symbol W}±0.1%' It would be nice not to need to correct the data files.
  19. Hello, I use the internal circuit board of Analog Discovery 2 on my test fixture board but the external case is not used. Would you please provide a 3D model of the internal circuit board assembly (PCBA)? Thanks, Choon Shin
  20. There do not seem to be any specifications for CPU platforms and Linux OSes that work best with the Analog Discovery 2 (i.e. that run the software and can keep up with the sample rate of the device). I see from past questions that it doesn't work properly with any model of Raspberry Pi (seems to be a Pi hardware problem, not Digilent's fault) and there are problems installing certain libraries on various Linux versions. From my experience with the HackRF One, you need a powerful enough CPU that can keep up with the sample rate being generated by the device without overruns or totally consuming the CPU capacity. Plus the operating system and library versions need to be compatible with what the software was compiled on (preferably identical). Since Digilent doesn't publish such detailed information on their website, I thought I'd ask forum members - what Linux systems are people using successfully with the Analog Discovery 2 and are happy with? Exact OS and platform would be helpful (i.e. Dell XPS 13 laptop running Ubuntu version 9999.1). Thank you.
  21. Features page states that Logic Analyzer Discovery 2 is 1.8V /3.3V/5V tolerant. I can't find a setting in Waveforms to change it to 1.8V. Does anyone know how to do i?
  22. I have a brand new AD2 that I'm having trouble getting to work on macOS 10.13.x. WaveForms 2015 reports "No device detected", and the "Find Devices" button also fails to show my AD2. The Mac is a MacBookPro13,1 [MacBook Pro (13-inch, 2016, Two Thunderbolt 3 ports)], the new type with the USB-C ports, but without the Touch Bar. The AD2 is connected directly to the Mac using the USB cable that came with the AD2, using a pretty generic USB-A-to-USB-C adapter. The device appears on the USB in System Information, and browsing the I/O registry, an instance of the com_digilent_driver_DigilentFtdiDriver class has been instantiated at the corresponding node in the tree. Attaching the device results in the following log messages from the driver: default 06:34:22.398724 -0800 kernel Digilent probe8: initial probe score = 100000 default 06:34:22.398748 -0800 kernel Digilent probe: Manufacturer Name = Digilent default 06:34:22.398919 -0800 kernel Digilent probe8: final probe score = 100001 default 06:34:22.398937 -0800 kernel Digilent Starting interface 0 Detaching the device: default 06:39:37.691288 -0800 kernel Digilent Stopping interface 0 There are no /dev/tty.usb* device nodes. I don't see any errors in the system log. I'm using WaveForms 2015 v. 3.6.8, and installed the 1.1.0 driver.
  23. Mattflorida

    AD2 device name in c#

    I’m writing a custom application in c# for the Analog Discovery 2. Things are working fine except I cannot get the device name and device serial number. dwf.FDwfEnumSN and dwf.FDwfEnumDeviceName execute but do not return a string. How should I declare the variables? I’ve tried all I can think of. Thanks
  24. I am having a similar issue when running as a normal user under Ubuntu 16.04.4 LTS and have installed the following packages per the standard instructions for running the Analog Discovery 2 device. ii digilent.adept.runtime 2.17.1 amd64 Digilent Adept Runtime ii digilent.waveforms 3.7.5 amd64 Digilent WaveForms Currently I am only able to run waveforms under "sudo" and not as a standard user. As a standard user executing env LD_LIBRARY_PATH=/usr/lib/digilent/waveforms/qtlibs gdb /usr/lib/digilent/waveforms/waveforms Thread 10 "waveforms" received signal SIGSEGV, Segmentation fault 0x00007fffecce2fc6 in libusb_close () from /lib/x86_64-linux-gnu/libusb-1.0.so.0 The Full Backtrace is as follows #0 0x00007fffecce2fc6 in libusb_close () from /lib/x86_64-linux-gnu/libusb-1.0.so.0 #1 0x00007fff375e492d in CloseDevice () from /usr/lib64/digilent/adept/libftd2xx.so #2 0x00007fff375e5c91 in OpenDevice () from /usr/lib64/digilent/adept/libftd2xx.so #3 0x00007fff375e61ed in FTCommonOpen () from /usr/lib64/digilent/adept/libftd2xx.so #4 0x00007fff375e633e in FT_OpenEx () from /usr/lib64/digilent/adept/libftd2xx.so #5 0x00007fffefd55cae in ?? () from /usr/lib64/digilent/adept/libdpcomm.so.2 #6 0x00007fffefd501b3 in ?? () from /usr/lib64/digilent/adept/libdpcomm.so.2 #7 0x00007fffefd4c6f8 in ?? () from /usr/lib64/digilent/adept/libdpcomm.so.2 #8 0x00007fffefd4a3d6 in ?? () from /usr/lib64/digilent/adept/libdpcomm.so.2 #9 0x00007fffefd498dc in ?? () from /usr/lib64/digilent/adept/libdpcomm.so.2 #10 0x00007ffff395a6ba in start_thread (arg=0x7fffc4907700) at pthread_create.c:333 #11 0x00007ffff48b941d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109 Running strace this line appears 3 times: open("/dev/bus/usb/002/004", O_RDWR) = -1 EACCES (Permission denied) At a glance this appears to be a permission issue for accessing the USB port/driver for this device; is there a recommended adjustment or fix for this at this time?
  25. I had a working Debian 8 production system using python2.7 to talk to an Analog Discovery 2. I decided to update the .deb packages to be current and now I get "Segmentation fault" "stack smashing detected" when I try to start my python program. I was using the amd64.deb files: digilent.adept.runtime 2.16.6 digilent.waveforms 3.5.4 (for the libdwf.so file) Upgraded to digilent.adept.runtime 2.17.1 digilent.waveforms 3.7.5 Also on the system is digilent.adept.utilities 2.2.1. I tested just upgrading the runtime package and my program works. Upgrading the waveforms package (and thus libdwf.so) causes the segfault. Any thoughts on how I might track down where the problem is?