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

  1. 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
  2. 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
  3. 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
  4. 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
  5. 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.
  6. 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!
  7. 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
  8. 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
  9. 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++
  10. 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.
  11. 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.
  12. 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 ?
  13. 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
  14. 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
  15. 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.
  16. 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!
  17. 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.
  18. 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
  19. 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
  20. '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.
  21. 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
  22. 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.
  23. 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
  24. 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.
  25. 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.