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
    • FRC
    • 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 122 results

  1. hi . i am using diligent analog discovery 2 impedance analyzer to calculate the ac resistance of the inductor at a certain frequency. the value of the inductor is correct but i am getting the diffeernt value of ac resistance using a different setting. the inductance value is around 1.5 mH and ac resistance will be in milli of ohm.
  2. I am kind of new on electronics. I am trying to set a trigger connection to analog discovery 2(AD2) from matlab. Since matlab has a supporting package of AD2 for data acquisition tool, I tried to set a trigger with the function addTriggerConnection() but i got the message You cannot use "addTriggerConnection" with Digilent hardware. Is there any other suggestions on how to trigger data Recording from matlab data acquisition tool for AD2.
  3. hi i want to generate a square wave of 50 volts to power up one device. can I get recommended products (voltage source) compatible with analog discovery 2 ?
  4. 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
  5. Dear Diligent AD2 team Please can you update your companies notes supporting Microsoft .net drivers which work with C# and VB.net and F# for the Analog Discovery 2 tool. It is a an excellent tool , but be even more excellent if could work and be used in the microsoft .net environment. This is a link to a previous forum post on the subject which used visual basic 6 from a while back. https://forum.digilentinc.com/topic/3049-vbnet-andor-cnet-wrapper-for-dwfdll/ The original visual basic 6 example . From the time before .net happened https://forum.digilentinc.com/applications/core/interface/file/attachment.php?id=1450 >> 160314_dwf_wrapper.zip I have taken this worked example and updated to get it to run with vb.net in visual studio 2017 .See enclosed attachment- It is failing to work properly due a. dll memory project fault in the .dll driver. The C++ source code for the .dll driver is also included in the attachment. My request is can Digilent fix the driver so that is usable in .net assemblies and is Memory safe . This is the reported run time fault when trying to access FDwfDeviceOpen in vb.net line of code : nRet = FDwfDeviceOpen(-1, hdwf) Fault report : System.AccessViolationException HResult=0x80004003 Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Source=<Cannot evaluate the exception source> StackTrace: <Cannot evaluate the exception stack trace> Thank you for considering this request Digilent_AD2_try2_vb.net.zip
  6. Hello, I recently discovered the protocol analyzer feature of the analog discovery 2 (AD 2). I wanted to read some can data from my vehicle. Can I simply connect the AD 2 to the vehicle's CAN lines? or Would I need to interface the AD 2 and the vehicle with a CAN transceiver? I have been reading around and I am uncertain as to how to proceed.
  7. Hi, I'am currently using my AD2 in Matlab 2018b and altough I'm capable of using some functionalities (the ADCs, for ex), I couldn't find a way of setting the power supply. Which, by the way, is doable in Waveforms. Does anyone know how can I set the DC power supply from Matlab? Thank you in advance for your time!
  8. Is there source code available for DWFCMD.EXE? I've found source code examples for many other functions using the C++ and python APIs, so I'm just wondering if source code was available for DWFCMD.EXE. It's a really useful program, by the way, and it's made getting up-and-running with the AD2 much faster. But now we have reached a point where it's too slow to call as stand-alone executable. Thanks.
  9. I have an Analog Discovery 2 and am using Waveforms to test circuits, measure voltage and current, model protocols such as I2C, SPI, and CAN. What would the home edition of Labview do to help me? Thanks
  10. Hi Digilent, I have two questions that i would like to ask about the logic analyzer function on the Analog Discovery 2. 1. With the rating of 100Mhz logic analyzing sampling rate, what is the maximum frequency can I capture? What about the spi frequency of 20Mhz? 2. The waveform limits my number of samples to 4096 (right above the rate settings). This link shows that waveform software allows 16384 samples. or even 10000000 samples https://forum.digilentinc.com/topic/9043-capturing-both-uart-and-spi-data-on-analog-discovery-2/ How do I fix this? Thanks Khoi Ly
  11. 'm an enthusiast looking to mainly work with digital and maybe occassionally on minor Analog Circuits as well. I was considering getting the Analog Discovery 2, but since my primary focus is digital someone recommended me the Salea over the AD2. I was told that the sample buffer in the AD2 is outdated and too small for anything useful. On the other hand even though I didn't get an exact number for this on the Salea, they seem to offer direct streaming to PC memory therefore limited only by the amount of RAM. Can someone please clarify if AD2 suffers from this limitation or if it has direct streaming support as well through Waveforms? Are there any workarounds for the small sample buffer? Thanks for reading.
  12. Hello, Some days ago I installed the new Waveforms software to update from Waveforms 2015. I have found that when running a loopback to check the Network Analyzer, the signals going to both scope inputs, randomly, stop the data adquisition, resulting in a bad representation of the bode plot. It happens in a random fashion, and when it fails, happens at the beggining of the sequence. I tryied to reinstall an older version of Waveforms and it works flawlessly. Checking the latest version in other computers, it fails too. Best regards Albert
  13. 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.
  14. 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
  15. 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.
  16. 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++
  17. 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.
  18. 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
  19. 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
  20. 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
  21. 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.
  22. 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.
  23. 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
  24. 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:
  25. 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