Search the Community

Showing results for tags 'waveforms sdk'.



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

  1. 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
  2. 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.
  3. Hello, I am using the Waveforms SDK in LabVIEW with an ADK2. However, something strange is happening. I am generating an array in kHz from 230 to 225. I want to do a frequency sweep through these. That part works fine, except for the first iteration. I've noticed that when FDwfDeviceOpen is run, it generates an odd waveform. AnalogOutFrequencyGet and AnalogOutAmplitudeGet says 1000 Hz and 1 V, respectively. I did not set it to do this and I can't figure out how to stop it. FDwfDeviceOpen is run once and that's the only time this waveform happens. I have thoroughly tested and found that FDwfDeviceOpen is consistently the source of this problem. Any ideas as to how to fix this? It's critical to my project that this issue is resolved. Thanks
  4. 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
  5. Hello, I'm a bit confused as to how the Waveforms manages its buffer. I'm using the Waveforms SDK (via LabVIEW) to both generate a pulse and act as a scope using the Analog Discovery Kit 2. I am generating a 50 ms, 5V pulse with a frequency of 230 kHz. This is connected to a hardware device. I then want to use the scope function to record the output form this device. I can get the scope to read, but I don't really understand why it works the way that it does. As it stands, the only way that I can consistently get a waveform is as follows (AnalogIn): AutoTimeout: 0.5 Sample Frequency: 160 kHz AcquisitionMode: Record RecordLength: 2 seconds I also have a 2.5 second wait on my analog out. If any of these settings change, my waveform will not show up. If perhaps I want a 200ms pulse, I need to change the sample frequency to 40 kHz. Attached is a screenshot of what the waveform looks like. There are two problems with this. The waveform is pushed far to the right. I want the waveform to take up the entire buffer. Second, if I'm sweeping frequencies, the waveform will show up at slightly different spots between frequencies. My ideal situation is that the ADK2 outputs a pulse, and when the pulse starts it immediately begins to record, filling the buffer after 50 ms. This buffer is emptied into an excel document, and then awaits use again. I've searched and read through the SDK reference manual but I can't seem to get a grasp on how to fix this. I feel like it's a lack of understanding of how the buffer is managed, but any help would be appreciated. Thanks EDIT: Follow-up/related question: How would these settings translate into SDK functions?
  6. Hello, I am creating a program in LabVIEW that is supposed to accomplish 2 goals: Generate a 50ms pulse using the Analog Discovery Kit 2. The pulse being generated is a 0-5 V square wave with frequencies ranging from ~220 kHz - 230kHz. This component works reliably and I have this completed. Then, use the ADK2 oscilloscope to read and save the data to file. The scope will be attached to secondary hardware which is generating an output. However, I am running into an issue with getting data using the AnalogIn components of the Waveforms SDK. Simply put, it's not working. I want to record for the 50ms that the pulse is being generated, perhaps with a bit of buffer before and after, like 2 ms. That's not necessary though. Even after the data is recorded in labview, what would be the best way to output this to Excel? I think you're supposed to read off the AnalogInStatusData function?Any help would be appreciated. Thanks.
  7. Hi All, I am having trouble with the Waveforms SDK (using the VBA DLL wrapper), where in I am trying to load more than 500 samples from the AnalogIn instrument on the Analog Discovery 2. Any samples above the 500 first samples are empty. This is using the single acquisition mode. Is there a way to get more than 500 samples per Acquisition, as the buffer is set to around 8k. If not, what is the buffer size there for? Regards, ELy
  8. Thanks for pointing me to the information detailing how to import the dwf.dll's into Labview and for the example code that was available in the WaveForms 2015 SDK. I've been able to use the SDK digital output function calls in LabView to control the digital outputs of the Digital Discovery. I've been able to produce patterns and control timing just like in the WaveForms 2015 program. What I've failed to accomplish is using the SDK digital input functions to acquire data on the digital input lines and dump the logic analyzer memory to an array in LabView. Are there any examples using these SDK functions in LabView that demonstrates how to implement the functions of the logic analyzer as used in the WaveForms 2015 program? Thanks in Advance.
  9. I am trying to write a Python script for a repeated-mode simultaneous logic analyzer / oscilloscope capture using the Analog Discovery 2 and running into some problems. How do I set active digital channels? For example, if I want to modify the DigitalIn_Record example to record from both channel 0 and 1. Is there an analogous command to the AnalogIn version: dwf.FDwfAnalogInChannelEnableSet(hdwf, c_int(0), c_bool(True)) Sorry if this is a trivial question but I cannot find an example or note in the reference manual.
  10. Hello, I'm trying to integrate my Analog Discovery 2 into a testbench for a microcontroller. I started from the code shown in the digitalin_record.cpp example. I have had success using the Waveforms sdk to record signals when sampling at 5Mhz after I changed from the default configuration to one where there is a 16k sample buffer for each digital channel. However, I trigger on one digital input's rising edge and I want to capture only the following 4650 samples. I have not had success in doing so because I always find that a number of samples precede the trigger sample in my recorded data. I have increased the number of samples in order to capture all of the data following the trigger but I would like to find some way of just obtaining the samples after the trigger rather than trimming off the initial samples after collection. Previously I have used FDwfDigitalInTriggerPositionSet to set my number of samples to 4650 and run into the issue I describe. I also tried using both 16384 and 8192 (the size of the buffer and half the buffer with the configuration selected) in case that made some difference but I still obtain some data before my trigger (I was trying to follow the advice I found on the forum here). Furthermore, calling FDwfDigitalInTriggerPrefillGet returns 0 (I thought that perhaps there was a defined prefill happening that I could account for) and using FDwfDigitalInStatusSamplesLeft after collecting data indicates -1. I am fairly sure that my trigger settings are what I want them to be (rising edge of digital input 12) using FDwfDigitalInTriggerSet(hdwf, 0, 0, 0x1000, 0). Is there something I am missing or is what I am trying to do not possible? I believe I must be overlooking something because using the Waveforms gui with the same settings I obtain just the samples following the trigger (I attached a screen capture). If not, maybe there is some other approach I can take. Thanks in advance. I can post more details as needed.
  11. Hi, I am trying to figure out how to use either ScanShift or ScanScreen acquisition mode for Digital Inputs into the Analog Discovery. And well, I can't get it to work, and haven't really been able to find any information online. My overall goal is to be able to stream out the digital data, so that I can capture and store more (continuous) data than the 16 kB buffer size. This doesn't have to run fast, I need to capture at 10,000 samples per second. The problem seems to be that the Digital In is staying in a "trigger" state. I am using Python, and using the function: dwf.FDwfDigitalInStatus(hdwf, c_int(1), byref(sts))always sets sts to c_int(3), which according to dwfconstants.py file (included in python samples folder with the SDK), this corresponds to stsTrig. Here is one version of the code I have been playing with, it is modified from the DigitalIn_Acquisition.py sample program (note I can switch to C, if that would be easier, I am not actually very familar with Python): """ DWF Python Example 5 Author: Digilent, Inc. Revision: 10/17/2013 Requires: Python 2.7, numpy, matplotlib python-dateutil, pyparsing """ from ctypes import * from dwfconstants import * import math import time #import matplotlib.pyplot as plt import sys #declare ctype variables if sys.platform.startswith("win"): dwf = cdll.dwf else: dwf = cdll.LoadLibrary("libdwf.so") hdwf = c_int() sts = c_byte() #print DWF version version = create_string_buffer(16) dwf.FDwfGetVersion(version) print "DWF Version: "+version.value #open device print "Opening first device" dwf.FDwfDeviceOpen(c_int(-1), byref(hdwf)) if hdwf.value == hdwfNone.value: print "failed to open device" quit() ofile = open("DigInTestData.txt", 'w') #open file in write mode print "File opened to write." ofile.truncate() # delete existing content print "Preparing to read sample..." # generate counter (Connecting these pins back to the inputs to test) for i in range(12, 16): dwf.FDwfDigitalOutEnableSet(hdwf, c_int(i), c_int(1)) #(dRef, chan, Enable(1)orDisable(0)) dwf.FDwfDigitalOutDividerSet(hdwf, c_int(i), c_int(33332*(1<<(i-12)))) #(dRef, chan, clock_divider) dwf.FDwfDigitalOutCounterSet(hdwf, c_int(i), c_int(1), c_int(1)) #(dRef,chan,clkcycs_low,clkcycs_high) dwf.FDwfDigitalOutConfigure(hdwf, c_int(1)) #(dRef, Enable(1)orDisable(0)) #ScanShift Mode dwf.FDwfDigitalInAcquisitionModeSet(hdwf, acqmodeScanShift) #TH:(dRef, acqmode) #sample rate = system frequency / divider, 100MHz/1 dwf.FDwfDigitalInDividerSet(hdwf, c_int(10000)) #TH: 1->10,000 #(dRef, clk_divider) # 16bit per sample format dwf.FDwfDigitalInSampleFormatSet(hdwf, c_int(8)) #(dRef, Format(8,16,or32)) # set number of sample to acquire cSamples = 1 rgwSamples = (c_uint8*cSamples)() #rgwSamples is a ?pointer? to a ctype array acting as a "buffer" dwf.FDwfDigitalInBufferSizeSet(hdwf, c_int(cSamples)) #(dRef,BufSize) duh... rgpy=[] #dwf.FDwfDigitalInTriggerAutoTimeoutSet(hdwf, c_double(0.2097152)) dwf.FDwfDigitalInConfigure(hdwf, c_bool(0), c_bool(1)) #(dRef,reconfig?,StartRec) while True: dwf.FDwfDigitalInStatus(hdwf, c_int(1), byref(sts)) #(dRef,ReadData(TorF), status_variable) print "STS VAL: " + str(sts.value) if (sts.value == stsTrig.value): #only changed to stsTrig so that it will escape this loop break time.sleep(1) print " waiting to finish" time.sleep(1) # begin acquisition for I in range(0,100): # get samples, byte size dwf.FDwfDigitalInStatusData(hdwf, rgwSamples, cSamples) #(dRf,point->databuffer,numOfDataBytes2Copy) rgpy.append(rgwSamples[0]) dwf.FDwfDeviceCloseAll() for num in rgpy: ofile.write(str(num)+'\n') for i in range(0,15): print(str(rgpy)) ## ##print() ##print(str(rgpy[0])) print "...written to." ofile.close() print "and closed." This just results in one value be stored in all 100 spots. An example of a shell output: DWF Version: 2.7.5 Opening first device File opened to write. Preparing to read sample... STS VAL: 3 waiting to finish 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 ...written to. and closed. Any help/advice anyone can give me would be greatly appreciated; I am really new to all of this.
  12. Hi! In Waveforms 3, one can choose Clock as the output type in Digital Pattern Generator. However, Waveforms SDK offers only 3 choices i.e. Pulse, Custom and Random. Is there any way to directly set the clock or one is is required to customize the Pulse or Random to behave as a clock?