Search the Community

Showing results for tags 'waveformssdk'.



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

  1. Hello Digilent Forums, I am trying to write a Python script for the impedance analyzer. I am reading the WaveForms SDK and following examples. I noticed all methods in the examples that use the dwf (Ex: `dwf.FDwfDeviceOpen`) use positional arguments. In the SDK, it lists the parameter names/types for the method (Ex: `FDwfDeviceOpen(int idxDevice, HDWF *phdwf)`). I have tried and failed to figure out how to specify them using keyword arguments instead. Is it possible? Thank you in advance for your help!
  2. Hi, I combined a few python scripts from the SDK (AnalogIn_Acquisition, AnalogOut_Play and AnalogOut_Sine) to write a script which is intended to run during the night and save the scope's data into a WAV file. All looks somewhat okay, but there are a few things that don't look perfect. For this test, I connected CH1 and W1 and started both the Scope and Signal generator in the script. I'm intending to generate a 80 Hz sine wave and record it with the scope running at 8 kHz. I attach the whole script, and here are the important parts: # set up signal generation channel = c_int(0) # use W1 dwf.FDwfAnalogOutNodeEnableSet(hdwf, channel, AnalogOutNodeCarrier, c_bool(True)) dwf.FDwfAnalogOutNodeFunctionSet(hdwf, channel, AnalogOutNodeCarrier, funcSine) # ! this looks like a square wave dwf.FDwfAnalogOutNodeFrequencySet(hdwf, channel, AnalogOutNodeCarrier, c_double(signalgenhz)) dwf.FDwfAnalogOutNodeAmplitudeSet(hdwf, channel, AnalogOutNodeCarrier, c_double(1.41)) # ! this doesn't really do anything dwf.FDwfAnalogOutNodeOffsetSet(hdwf, channel, AnalogOutNodeCarrier, c_double(1.41)) I played around with the parameters and after some investigation with Audacity it seems like the funcSine parameter generates a square wave and the amplitude is always 1.0 no matter what I set. The other problem I have is with the FDwfAnalogInStatusData function, it looks like it doesn't just get the raw data from the scope, is contains something else. So in order to get the scope's CH1 data, I need to have a 2-channel WAV file, and discard its first channel. The second is the data I'm looking for. waveWrite = wave.open(startfilename, "wb"); waveWrite.setnchannels(2); # 2 channels for the testing (1 channel would be enough if FDwfAnalogInStatusData returned only 1 channel's data waveWrite.setsampwidth(4); # 32 bit / sample waveWrite.setframerate(samplerate); waveWrite.setcomptype("NONE","No compression"); dwf.FDwfAnalogInStatusData(hdwf, 0, rgdSamples, buffersize) # get channel 1 data CH1 - ! it looks like 2 channels get read here and only the second is the data of CH1 waveWrite.writeframes(rgdSamples); I would expect that if I only need the CH1 of the Scope, I could save it into a mono WAV file. AnalogIn_AcquisitionSaveToWAV.py
  3. I need to spy on an SPI connection for a long period of time which will require timestamps on the data to find approximate times of transmission. As this is not possible in Waveforms (which is a real shame) has anyone written any software that uses the SDK to do something similar to this? It would save me a bit a work if there was already an existing solution. - Callum
  4. Hi. I'm working with the SDK and finally got to the point that I can control the Vcc power supply to be either 3.3 V or 5.0 V. It seems the channel numbers are 0 = Vcc, 1 = VP+, 2 = VP-, 3 = Vref1 and 4 = Vref2. Something like this dwf.FDwfAnalogIOChannelNodeSet(hdwf, c_int(1), c_int(0), c_double(True)) dwf.FDwfAnalogIOChannelNodeSet(hdwf, 1,1,c_double(1.86)) will work fine and give me 1.86 V or close to it, but if I try to go past about 2 V, it seems like it can't get there and fluctuates a lot. I'm not sure of the difference between AnalogIOChannelNodeStatusInfo and AnalogIOChannelNodeSetInfo, but it seems that these can go to 0 to 10 V in 1000 steps or so. The Waveforms software has no problem driving them to +10 or -10 or anything in between. Any idea what I could be doing wrong?
  5. I've worn Google out trying to find the answer to what I bet is a simple question. Part of my problem may be weak Python skills and almost nonexistent C skills. I'm using the Python examples in the SDK to turn on the 5 V power supply and then record data from both channels. I used AnalogIn_Record.py and made what I thought were reasonable changes, but no joy. I can record one channel or the other, but not both. I feel like this is not a hard problem and it must have come up before, but I can't find it so far. Any help would be appreciated.
  6. Hi, I am capturing traces and storing the data using the analog discovery 2. The FDwfAnalogInStatusData() stores the data as double. I want to store the data as binary or integer retaining the precision. Is there a workaround? The source code for the function isn't available so I cannot change that. Following is the snippet of the code ################################################## while True: dwf.FDwfAnalogInStatus(hdwf, c_int(1), byref(sts)) if sts.value == DwfStateDone.value : dwf.FDwfAnalogInStatusData(hdwf, 1, sample_list, 8192) break ################################################# I want the sample list to be a list of integers, not convert it after acquisition but fetch them as integers, retaining the precision. Thanks