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 133 results

  1. Hello, What is the difference between the "custom" and "sensor" tabs on the Protocol Analyzer in Waveforms? Are they used together? Where the custom tab gives the user the ability to write their own custom SPI Protocol and use it in the Sensor tab? And can I use them to develop a script that would control an SPI compatible 12-bit DAC. The goal is to read the 12 bit digital data from a file, with data ranging from 0x0000 to 0xFFFF (16 bits technically since the 2 MSB determine the DAC Power Modes and the 2 LSB are don't cares) and outputting that data from the Analog Discovery 2 to the 12-bit DAC
  2. Greetings! i'm working on a project involving the use of the Logic Analyzer function of the Analog Discovery 2. I have observed that its Record Mode can be used to capture huge samples of data. The only problem that I'm having is it takes too long for the Record Mode to fill its memory before returning results even when the sample size used is 20k. I would like to know if it is possible to make the Record Mode of the Logic Analyzer intelligent in a way by making it stop filling its memory when the data to be transmitted has already been received. Because the application that I'm using Record Mode for should do so in order to return results faster. Any advice would help a lot. Best regards, Lesiastas
  3. Hi, I would like to measure control loop gain of DC-DC converter using AD2 network analyzer. Is it possible to add a digital filter to input channels of AD2 and measure gain and phase shift after digital filtering?
  4. Hello Community I am using the Analog discovery 2 controlled by a C# Software. At a certain point of the software, I need to check the length of a detected pulse. Before this, I prepare the digital in component of the device. private const uint BUFFER_SIZE = 4000; private const uint DIGITAL_IN_DIVIDER = 1000; private const uint CLOCK_FREQUENCY = 100000000; public void prepareForPulseDetection( int digitalIoIndex ) { checkDigitalIoIndex( digitalIoIndex ); // sampling frequency = 100 MHz / 1000 = 100 kHz (-> 10 us) dwf.FDwfDigitalInDividerSet( device, DIGITAL_IN_DIVIDER ); // just sample DIO pins 0...7 dwf.FDwfDigitalInSampleFormatSet( device, 8 ); dwf.FDwfDigitalInBufferSizeSet( device, (int)BUFFER_SIZE ); dwf.FDwfDigitalInSampleModeSet( device, dwf.DwfDigitalInSampleModeSimple ); // just one acquisition after trigger dwf.FDwfDigitalInAcquisitionModeSet( device, dwf.acqmodeSingle ); // setting triggersource to digital in detector dwf.FDwfDigitalInTriggerSourceSet( device, dwf.trigsrcDetectorDigitalIn ); // take 50 samples before trigger dwf.FDwfDigitalInTriggerPositionSet( device, (uint)BUFFER_SIZE - 50 ); // disable timeout dwf.FDwfDigitalInTriggerAutoTimeoutSet( device, 0 ); // set trigger to rising edge on DIO pin 0 uint triggeredPin = (uint)0x0001 << digitalIoIndex; // high low rising falling dwf.FDwfDigitalInTriggerSet( device, 0x0000, 0x0000, triggeredPin, 0x0000 ); // enable digital in without reconfiguring dwf.FDwfDigitalInConfigure( device, 0, 1 ); } private void checkDigitalIoIndex( int digitalIoIndex ) { if ( ( digitalIoIndex < 0 ) || ( 7 < digitalIoIndex ) ) throw new ArgumentException( "Digital IO index must be in array [0...7]" ); } /// <returns> pulse time in us </returns> public uint getDetectedPulseLength( int digitalIoIndex ) { checkDigitalIoIndex( digitalIoIndex ); var data = new byte[BUFFER_SIZE]; dwf.FDwfDigitalInStatusData( device, data, (int)BUFFER_SIZE ); var numberOfHighSamples = getNumberOfHighSamples( data, digitalIoIndex ); // 1e6 because of us return var usDuration = (uint)( DIGITAL_IN_DIVIDER * 1e6 / CLOCK_FREQUENCY ); usDuration = (uint)( usDuration * numberOfHighSamples ); // reset device, else it is not possible to // recognize if pulse occured dwf.FDwfDigitalInReset( device ); return usDuration; } private int getNumberOfHighSamples( byte[] data, int digitalIoIndex ) { if ( allZero( data ) ) return 1; // means pulse was shorter than samplerate else { int startingIndex = getStartingIndexOfPulse( data, digitalIoIndex ); int endingIndex = getEndingIndexOfPulse( data, digitalIoIndex ); int difference = ( endingIndex - startingIndex + 1 ); return difference + 3; // plus 3 because analog discovery return is inaccurate } } private bool allZero( byte[] data ) { for ( int i = 0 ; i < data.Length ; ++i ) if ( data[i] != 0 ) return false; return true; } private int getStartingIndexOfPulse( byte[] data, int digitalIoIndex ) { int index = 0; for ( ; index < data.Length ; ++index ) if ( checkBit( data[index], (byte)digitalIoIndex ) ) break; return index; } private int getEndingIndexOfPulse( byte[] data, int digitalIoIndex ) { int index = getStartingIndexOfPulse( data, digitalIoIndex ) + 1; for ( ; index < data.Length ; ++index ) if ( !checkBit( data[index], (byte)digitalIoIndex ) ) break; return --index; } private bool checkBit( byte value, byte checkedBit ) { byte shiftedValue = (byte)( (int)value >> (int)checkedBit ); return ( ( shiftedValue & 0x01 ) == 0x01 ); } The pulses are reliably measured. But the number of high samples is always smaller than expected. Most of the time, I expect the measured pulse three microseconds longer than it is. Is this a known issue? Or is there a mistake in my code? I am very sure, that the pulses I am sending to the analog discovery are as long as they should be. I checked it with the analog discovery with the waveforms software and with another osciloscope.
  5. Hi, I am trying to synchronize two sine waves referring to the sample file "analogout_sync.cpp" using the master and slave technique, but I feel like there is too much of a delay before the second wave is generated still. When I use an external oscilloscope, it shows that the sine waves are not in sync and the phases change for the waves every time the program is rerun, so I can't hardcode a phase to fix it. Is there any way to make sure I can sync the two waves using C++ code? Thanks
  6. Hi all, I use Analog Discovery 2 to generate a ramp up waveform and observe synchronously the response in the scope. The wavegen output W1 is wired to the scope input Ch.1. I want the scope to be triggered by the generated waveform, so that subsequent acquisitions yield signal that starts exactly in the same moment. I attach the VI that I have made to achieve this (testscope3.vi). I use Configure Digital Edge Trigger.vi to set up triggering. What I expect is that on each loop repetition the acquired signal would start in the same moment, but this is not the case. Each acquisition starts at an arbitrary moment and the signal moves visibly along the time axis. I am perfectly able to achieve the above using the WaveForms 2015 application (I attach the corresponding WaveForms 2015 workspace file), so I know that the hardware is capable of doing this. However, the experiment I need this for is controlled from LabVIEW and I would like to get the same result using the LabVIEW Driver for Analog Discovery 2. Thank you for any suggestions on how to achieve this from LabVIEW. testscope3.vi sweep.dwf3work
  7. Hi there, Until here, I've done quite a few things, with the magnificient help of attila. I've done a lot a threads that can use the AD2 to record the analog inputs, or the digital inputs, that can configure the analog outputs or the digital outputs. When I run all of those threads together, it works perfectly fine (except for the tick of my PC, that doesn't allow me to be really fast with the digital outputs, but it's not a big problem for the moment). And then, the UART appeared. I have to say, it works great. The problem is with the UART and the digital outputs. When both are asked (for example logic '1' to DIO 0 and send "This is just a simple test to know if everything works fine" on the Tx at the <<same>> time, the DIO will wait for the end of the UART Transmit). I've tested with with another configuration for the digital output (pulse at 1kHz), and the AD2 stops the pulse when the UART appears. Is it normal or do I do something wrong? Thanks for your help Marc
  8. Greetings, I would like to replicate the result being captured by the Logic Analyzer GUI here: Is it possible to combine the Digital_UART and DigitalIn Functions to create a VB6 wrapper that will display results like in the GUI? I'm not sure if my hunch is correct or possible, but since the UART is a setting in the Logic Analyzer GUI: I suspect that we can implement the Digital_UART function into one of the DigitalIn APIs available in order to create a VB6 program to receive data that is composed of both: 1. Captured Bit Sequence of character sent (Like in the Data Line of the WaveForms GUI) , and 2. Its equivalent ASCII format (Like in the UART Line of the WaveForms GUI). Any advice? Regards, Lesiastas
  9. Hello, I'm confused about some of the function descriptions in the WaveForms SDK Reference Manual. I want to set the analog output to dynamically, from the documentation for the function FDwfDeviceAutoConfigureSet it says to set fAutoConfigure to 3. However fAutoConfigure is defined as a Boolean value. There is a similar case for FDwfAnalogOutConfigure Is the documentation incorrect? Or am I misunderstanding how to set this value? Thanks in advance, Richard
  10. Hello Digilent Forums, I am a new user of the Analog Discovery 2 + Impedance Analyzer instruments. I am using WaveForms 3.10.9. I am trying to understand the metrics for Input and Phase. In the docs, `impedance.html`, it lists: Input as showing the "DUT/reference resistor". The Y axis plot is "M Input Gain" with units in dB. Phase as showing the phase angle and Ref RLC input phase. I am assuming θ ("Phase") is the phase difference seen by the Analog Discovery 2's two scopes between V and I. Can you please explain more what the terms mean? M ("M Input Gain") ∠ ("Input Phase") For your reference, I have attached a plot generated using a 100 kΩ resistor and then a 0.1 μF capacitor in series. Thank you in advance for your help!
  11. Hello, I just would like to ask how to generate White Noise from Analog Discovery 2 with 5V pk-pk Thank you in advance. Yani
  12. I want to record data on one channel using the scope tool from WaveForms using the Analog Discovery 2. Additionally, I need to record digital signals on 4 channels at the same time in order to delimit windows for post-processing. Even at a (very) low sampling rate, WaveForms displays "Samples were lost! Reduce sample rate." when I attach some digital channels to the scope tool. Even when the sampling rate is reduced to 1Hz, this error still happens. Is this a WaveForms bug? I put my workspace in attachment to reproduce the issue. scope-digital.dwf3work
  13. 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++
  14. 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.
  15. 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.
  16. 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 ?
  17. 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
  18. 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
  19. 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.
  20. 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!
  21. 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.
  22. 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
  23. 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
  24. '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.
  25. 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