Search the Community

Showing results for tags 'waveforms sdk'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News
    • New Users Introduction
    • Announcements
  • Digilent Technical Forums
    • FPGA
    • Test and Measurement
    • Measurement Computing (MCC)
    • Add-on Boards
    • Digilent Microcontroller Boards
    • Non-Digilent Microcontrollers
    • LabVIEW
    • FRC
    • Other
  • General Discussion
    • Project Vault
    • Learn
    • Suggestions & Feedback
    • Buy, Sell, Trade
    • Sales Questions
    • Off Topic
    • Educators
    • Technical Based Off-Topic Discussions
    • Archived

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

  1. Hi, I'm using Analog Discovery 2 to perform data acquisition through the two channels of the Oscilloscope, using the AnalogIn_Record.py code available in the SDK as a base. I want to configure Oscilloscope channels with 2x16k buffers. And this way I want to get the Scope (2 x 16k) and Wavegen (2 x 1k) configuration, presented in the second line of the Waveforms Device Manager. By default the configuration is the one shown in the first line, Scope (2 x 8k) and Wavegen (2 x 4k). Studying the Waveforms SDK Reference Manual: the function FDwfAnalogOutDataInfo ( HDWF hdwf, int idxChannel, int *pnSamplesMin, double *pnSamplesMax) gives me the maximum buffer size information at 4096 samples for the output channels. The function FDwfAnalogInBufferSizeInfo (HDWF hdwf, int *pnSizeMin, int *pnSizeMax) tells me the maximum buffer size at 8192 samples for the Oscilloscope's input channels. The function FDwfAnalogInBufferSizeSet (HDWF hdwf, int nSize) should set the buffer size of the device's analog inputs. However, the function is ineffective, as any buffer value passed through this function is ignored and the device's default buffer size is used as the maximum buffer size. The function FDwfAnalogOutDataSet (HDWF hdwf, int idxChannel, double *rgdData, int cdData) should set the device's prefill buffer. However, the function is ineffective, as any buffer value passed through this function is ignored and the device's default size is used. How to properly configure device buffer sizes using the Python API? I want to configure Oscilloscope channels with 2x16k buffers. And this way I want to get the Scope (2 x 16k) and Wavegen (2 x 1k) configuration? Thanks in advance for your help.
  2. Dear Attila Please find enclosed the following . This took more than 4 hours to prepare all the documentation please treat as such. I am using the latest version of Digilent Waveforms and the latest Waveforms SDK. - Master Javascript driver for Digilent Analogue Discover AD2 which can be used inside Waveforms - SPI Setup , read & write & Initialise (1) . Status NOT Working . Needs Digilent Help to fix (%%) - I2C Setup , read & write & Initialise (2) . Status NOT Working . Needs Digilent Help to fix - UART Setup , read & write & Initialise(3) . ** - GPIO Setup, Set individual GPIO Pin Output States (4) Working - PSU Control, Set PSU voltage , turn on and off (5) Working - Python driver directly to control ON-SEMI CAT9532 using Digilent Analogue Discover AD2 & Digilent Waveforms ## Enclosed are all the attached scripts . ** Mostly likely works as driver details taken from working examples . See driver for while for web links reference. (%%) See previous efforts here to get it working    https://forum.digilentinc.com/topic/21997-waveforms-with-accelerometer-digilent-analog-discovery-2-with-pmod-acl2-java-script-spi/#comment-63633 https://forum.digilentinc.com/topic/19237-waveforms-with-accelerometer/page/2/#comment-52495 I am trying to get the I2C driver function of the AD2 to work to drive a ON-SEMI CAT9532 LED driver. Set up , I have two Digilent Analogue Discover AD2 - Device 1 : Digilent AD2 (Device A) I2C driver source . A) Device is programed using Digilent Waveforms Javascript B) Direct control though Digilent Waveforms I2C Master interface C) Direct control though Digilent Waveforms I2C Master script interface D) Direct control Waveforms SDK & Python - Device 2 : Dilenet AD2 (Device B) as I2C spy device - Device 3 : TotalPhase Advark I2C/SPI professional I2C development tool Direct control & Programming by XML program script. https://www.totalphase.com/products/aardvark-i2cspi/ I own (2) two Analogue Discovery devices. What worked Device 2 : It could work perfectly as a I2C spy mode device Device 3: Worked perfectly straight out of the box using the GUI interface. Took 20 mins to have working solution. This is professional I2C product that has been in the market for 10 years plus. What failed Device 1: Did not output the correct I2C packet no mater how it was programmed. Device 1 : Had 10K pull up resistor attached to the VCC 3V3 rail on the I2C: SDA & I2C:SCL & I2C:/RESET. Conclusion There seems to be general issue with the AD2 and getting it to work as driver for I2C and SPI . Which is a long term issue. I have spent a long time searching for all the small details to build up the driver set so that should work with Digilent Analogue Discover AD2 & Digilent Waveforms but if the hardware of the AD2 is not co-operative or the staff in Digilent not being supportive there is only so much I can do . Requested Help 1. Fix the Waveforms AD2 Javascript and Python Waveforms SDK so it works for SPI & I2C . There is something missing here, where it would be good to fix to improved your AD2 products for the whole community of AD2 users 2. Have a Digilent published AD2 drivers that work for SPI & I2C & UART & GPIO & PSU control for waveforms and waveforms SDK. So Attila the case is in your lap now .. Please put some effort in to fix it or show me how to fix it . I have the feeling your quite a skilled person. The result should be posted here as a product example : https://projects.digilentinc.com/products/waveforms?sort=updated Background I am a electronic engineer with 20+ years development experience , I have have successfully used Digilent AD2 to design 3 products end to end and have been using it for quite a few years. I can program in Python , Microsoft VB.net and Javascript. I have personally purchased two pieces of AD2 out of my own money as feel they are such a good tool. I am committed to using the AD2 as I can see and experience that it is a super swiss army knife for use in a development of embedded electronics. I have also purchased a full profesional copy of National instruments Labview for use with AD2 but , have suspended learning to use labview until this I2C & SPI issue is resolved with the AD2 Digilent_AD2_Script_I2C_control_of_on-semi_CAT9532.py Digilent_AD2_Script_I2C_control_of_on-semi_CAT9532.js Digilent_AD2_Script_I2C_control_of_on-semi_CAT9532.dwf3work Digilent_AD2_Script_master.js
  3. Hello, I can successfully communicate with my Analog Discovery 2 device. I can send and receive data. I want to build a custom LCR Meter using Analog Discovery 2 and Impedance Analyzer Adapter with C#. I need CC/CV measurements too. Waveforms have built-in support for these measurements. But, I inspect the Waveforms SDK Reference Manual and all scripts in the Examples folder. I can not find a clue to how to achieve my goal. I want to learn how can we set "mode" with code. There is only the FDwfAnalogImpedanceAmplitudeSet function. There is also a "Custom" mode. There are five scripts that are 1. Constant Voltage Adapter 2. Constant Current Adapter 3. Constant Voltage 4. Constant Current 5. Offset Sweep I am using IA Adapter. So, I investigate Constant Voltage Adapter and Constant Current Adapter scripts. I think I need to use these scripts as a reference. But, these scripts use some variables such as VRMS, IRMS. I see the function to retrieve Voltage and Current. But, I need VRMS and IRMS values. How can I read these values from the device? They are built-in in scripts. Thanks In Advance, Regards Resul
  4. Hi! I'm exploring the AnalogIn_Record.py example provided in waveforms (DWF version 3.14.2) and noticed the following behavior: If I reduce the nSamples to less than 8194 on line 29, the program gets stuck in the acquisition loop. If I increase the frequency to 10MHz (line 28) , and take for example 1000 samples (line 29), I get unexpected sample values in the plot: Is this behavior expected? Kind regards
  5. If I configure the SPI with mode 0 (polarity=0 and phase=0) and LSB in WaveForms SDK in the Digital Discovery or Analog Discovery 2, and I send the byte 163=0xA3=b10100011; I would see the following: Is it guaranteed that when there is a falling edge of SCLK, the MOSI takes the value just before the transition (the SCLK edge)? What I mean is; is the following image accurate:
  6. I have a device that has a single 16-bits SPI shift register (for both transmissions and receptions). It responds to falling edges of SCLK. The input of the shift register is connected to MOSI and the output to MISO, as the following figure. As the MOSI signal is input to the first flip-flop of the shift register, it should remain stable (not change) during a falling edge of SCLK, while MISO changes its value during a falling edge of SCLK. This way, MISO and MOSI signals are not synchronized. I want to communicate with this device using WaveForms SDK. Is there a way to configure the SPI communication correctly? With this I mean: is there a way of generating the SCLK and MOSI signals as shown in the figure above, and sample the MISO data in each rising edge of the SCLK? I suspect functions FDwfDigitalSpiRead16 and FDwfDigitalSpiWrite16 assume MISO and MOSI signals are synchronized; so no SPI polarity and phase configuration would work correctly.
  7. Hi, I am using Labview to create a pattern generator and logic analyzer on the Analog Discovery Kit using the waveforms sdk dll. At the minute the pattern generator is functioning and I am using it to send data to a second discovery kit to test the logic analyzer. I am having issues acquiring the acquisition data when using the FDwfDigitalInStatusData node, when transmitting 0xFF, I read back 0x6 or 0x9 depending on the trigger position setting. I am only interested in the data after the trigger, I have scourged the internet trying to find a solution with no luck, I have a feeling I am miss using the FDwfDigitalInTriggerPositionSet node, any feedback on what the correct trigger position and reason for incorrect data would be great Data is arriving at 1MHz, the frequency of the analyzer is setup at 2MHz to prevent aliasing Using a 32bit sample format and triggering on a rising edge Single Acquisition Mode with the buffer set anywhere between 100-300 Unsure on placement of trigger position to receive data Thanks Guys, Chris
  8. Are there any differences between Python and C++ version of WaveForms SDK API functions with respect to execution time of the functions?
  9. Is there any way to program an interrupt when a digital input pin goes high in WaveForms SDK with Analog Discovery 2 or Digital Discovery? I want to write a code (using WaveForms SDK), with which I wait for a digital input pin to go high. After the pin goes high, I want to continue with the program. Something like the following code: # Some code while (not digitalInputPinIsHigh()): continue # Continue with the program The problem is that the pin's output is a pulse that is only high for 30 μs, so if I continuously check the digital input pin until it goes high, I think I can miss the pulse. Is there a way to program an interrupt (some code/function that is executed when the pin goes high)? Something like the following code: def ISR(): digitalInputPulseArrived = True # Some code digitalInputPulseArrived = False while (not digitalInputPulseArrived): continue # Continue with the program
  10. I am programming a Digital Discovery with WaveForms SDK (in Python) to communicate via SPI with an FPGA. The SPI comunication has 16 bit words. First, I have to send the address to read or write (the first bit of the 16 bit word indicates whether it is a read 0 or a write 1). Then, in the second 16 bit word, I read the data if it was a read operation, or I send the data if it was a write operation. I have the following code: # Imports from ctypes import * from dwfconstants import * import sys import time # Load dwf library if sys.platform.startswith("win"): dwf = cdll.LoadLibrary("dwf.dll") elif sys.platform.startswith("darwin"): dwf = cdll.LoadLibrary("/Library/Frameworks/dwf.framework/dwf") else: dwf = cdll.LoadLibrary("libdwf.so") # Open the Digital Discovery device hdwfDD = c_int() dwf.FDwfDeviceOpen(c_int(-1), byref(hdwfDD)) # Configure digital voltage to 1.8 V and system frequency to 100 MHz dwf.FDwfAnalogIOChannelNodeSet(hdwfDD, c_int(0), c_int(0), c_double(1.8)) dwf.FDwfAnalogIOChannelNodeSet(hdwfDD, c_int(0), c_int(6), c_double(100e6)) dwf.FDwfAnalogIOEnableSet(hdwfDD, c_int(True)) # Configure SPI dwf.FDwfDigitalSpiFrequencySet(hdwfDD, c_double(1e6)) # 1 MHz dwf.FDwfDigitalSpiClockSet(hdwfDD, c_int(4)) dwf.FDwfDigitalSpiDataSet(hdwfDD, c_int(0), c_int(6)) # MOSI dwf.FDwfDigitalSpiDataSet(hdwfDD, c_int(1), c_int(15)) # MISO dwf.FDwfDigitalSpiModeSet(hdwfDD, c_int(0 | (0 << 1))) # Polarity 0; Phase 0 dwf.FDwfDigitalSpiOrderSet(hdwfDD, c_int(0)) # LSB # Configure the address 1 to value 5000 time.sleep(200e-6) dwf.FDwfDigitalSpiWriteOne(hdwfDD, c_int(1), c_int(16), c_int(0x8000 | 1)) time.sleep(200e-6) dwf.FDwfDigitalSpiWriteOne(hdwfDD, c_int(1), c_int(16), c_int(5000)) # Read the value in address 1 to check if data has been set correctly time.sleep(200e-6) dwf.FDwfDigitalSpiWriteOne(hdwfDD, c_int(1), c_int(16), c_int(1)) time.sleep(200e-6) rxData = c_int() dwf.FDwfDigitalSpiReadOne(hdwfDD, c_int(1), c_int(16), byref(rxData)) All the dwf functions return 1 (including dwf.FDwfDigitalSpiWriteOne). I have also checked that the SPI writes are working with an oscilloscope. The problem is with the function dwf.FDwfDigitalSpiReadOne, that returns 0. What does this mean? Besides, when this function is executed, the Digital Discovery turns on a blue LED. What is the meaning of this blue LED? I have run the following code after the unsuccessful DigitalSpiReadOne trying to obtain an error message: szerr = create_string_buffer(512) dwf.FDwfGetLastErrorMsg(szerr) print(str(szerr.value)) # Prints: b'' But nothing is printed. I want to add that the same SPI configuration works perfectly in an Analog Discovery 2. The problem is I want the SPI to work at 1.8 V, and as far as I know, the Analog Discovery 2 only works at 3.3 V.
  11. 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
  12. Hello, I have a problem concerning the Digital Discovery using the Waveforms SDK. I thought it is possible to use the full 256MBytes on-board recording memory for 8-bit sampling, but I am only able to read 64M samples, no matter if I use 32 bit, 16 bit or 8 bit sampling (which I configure with the function FDwfDigitalInSampleFormatSet). The maximum size I can set via FDwfDigitalInBufferSizeSet() is 64M (i.e. 67108864), no matter what sample size I set via FDwfDigitalInSampleFormatSet(). That is, if I try to set a higher value for the buffer size, FDwfDigitalInBufferSizeGet() will still return 67108864, regardless which sample size is set (8, 16, 32). So I thought this buffer size value is the value for 32-bit sampling, and therefore 4 times as big when using 8 bit sampling. But unfortunately, when I try to read the data via FDwfDigitalInStatusData(), with a countOfDataBytes value that is higher than 67108864, all bytes after the 67108864 byte are zero. I am using single aquisition mode, and start an aquisition with FDwfDigitalInConfigure(handle, true, true) and then wait until the device state becomes DONE. I would be very thankful if someone could explain what I am doing wrong here. The Waveform GUI seems to be possible to do that (64M samples for 32 bit sampling, 256M samples for 8 bit sampling), so I thought it is possible with the SDK, too. Thanks.