Search the Community

Showing results for tags 'wavegen'.



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

Calendars

  • Community Calendar

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

  1. Hi Guys, I'm new to the AD2 & Waveforms, and in the need of some help. I'm trying to import a csv file into a custom wavegen and then output it. Here is my code: if(!('Wavegen1' in this)||!('Scope1' in this))throw"Please open a Scope and a Wavegen instrument"; var filename = "/Users/PaulBritten/Documents/AFWorkMain/AFWork/Waveform/single_qrst_improved_twave_1khz.csv"; var file = File(filename); print("exists? " + file.exists()); var arr = file.readArray(); print(arr); Wavegen1.Channel1.Mode.text = "Custom"; Wavegen1.Channel1.Custom.Type.set("MyWave", arr); Wavegen1.Channel1.Custom.Type.add(arr); Wavegen1.Channel1.Custom.Offset.value = 0; Wavegen1.Channel1.Custom.Frequency.value = 1; Wavegen1.Channel1.Custom.Amplitude.value = 1; Scope1.Trigger.Trigger.text = "Repeated"; Wavegen1.run(); Scope1.run(); Can anyone explain to me why I'm getting this error: Thanks for any help in advance. Best wishes Paul
  2. Hello, There is a pulse width jitter caused by some kind of aliasing between various unsynchronized events. My screen capture grabs only one frame of video, but you can see it in the red persistence trace, and I can see it on my Tek scope. I discovered this while running one of the script examples, and then confirmed that it exists in all the pulse modes of the Wavegen except as follows: It is here with these "simple" settings: It is here with these "basic" settings: For my buffer setting and 1% at 5KHz the pulse width here varies from 1.870 us to 1.98 us. It should be 2 us of course. The actual frequency is similarly unstable by a few Hz around 5KHz. Synchronization with a "Run" argument of 200 us or less cures the problem. It appears that when this is =< the set period, it dominates as the period of the waveform. : Placing Wavegen into "autosynchronized" mode does the same thing, but enforces a 200 us "run" argument: As expected, the "run" argument automatically takes on the period of the set frequency. However, note that at 2KHz a glitch appears in the pulse. (It is real): None of these setting produces a waveform that matches the settings exactly. The glitch is particularly troubling. Am I doing something wrong here? - Paul Vo
  3. Hi, I was using the wavegen to generate 2 sine waves and noted one weird behavior. - when I changed the amplitude of one channel the other channel also is affected (amplitude and phase) Before change (2V on each channel) After change (3V on each channel) The same behavior occurred on the last stable version and beta version (3.11.4). Thanks
  4. Hi, I'm working on a WaveForms script which would be able to generate chart with the frequency profile of a liquid. For this, I need to use a Wavegen and a Scope: first I need to set the generator to a certain frequency and then I'd like to check the power of that signal on the scope. Between the probes of the generator and the scope there will be the liquid I would like to test. I created a basic script to step from 1 Hz to 150 Hz, check that signal with the scope, repeat this loop 5 times, and calculate the min, max and average values at each frequency. Although the script works, I have a few questions: * I couldn't find any documentation about the Scope.Channelx.fftmagnitude and fftfrequency arrays. Where should I look for them? Are there any other properties related to the FFT configuration? * Is there a way to set the number of BINs and samples of the scope's FFT? * Can I somehow use the Goertzel algorithm instead of FFT? (The Görtzel algorithm is designed to tell us the power of a signal at one predefined frequency. https://en.wikipedia.org/wiki/Goertzel_algorithm) I would need this to get the power for the exact Hz value I define, and not the closest one I have from the FFT like I do it now. * Is there a way to change the color/style of the charts? Here is the script itself, but bear in mind that it is just the very first version const hzmax = 150; // the maximum frequency to measure const csamples = 5; // the number of samples to measure for each frequency const cdatapoints = 150; // chart X-axis resolution (currently: 1 datapoint / 1 Hz) var datapoints = new Array(4); // datapoint array datapoints[0] = new Array(cdatapoints); // max datapoints[1] = new Array(cdatapoints); // avg datapoints[2] = new Array(cdatapoints); // min datapoints[3] = new Array(cdatapoints * csamples); // raw data // clear the raw data array for(var j = 0; j < cdatapoints * csamples; j++) { datapoints[3][j] = 0; } // generate the freqeuncies to measure var frequencies = new Array(cdatapoints); for(var j = 0; j < cdatapoints; j++) { frequencies[j] = j+1; } { // configure plot plot1.X.Units.text = "Hz"; plot1.X.Offset.value = -hzmax/2 plot1.X.Range.value = hzmax; plot1.Y1.AutoScale.checked = false; plot1.Y2.AutoScale.checked = false; plot1.Y3.AutoScale.checked = false; plot1.Y4.AutoScale.checked = false; const vmax = 1.00; const vmin = 0.98; var offset = -(vmin + (vmax - vmin)/2); var range = (vmax - vmin); plot1.Y1.Offset.value = offset; plot1.Y2.Offset.value = offset; plot1.Y3.Offset.value = offset; plot1.Y4.Offset.value = offset; plot1.Y1.Range.value = range; plot1.Y2.Range.value = range; plot1.Y3.Range.value = range; plot1.Y4.Range.value = range; } { // configure wavegen Wavegen1.Channel1.Mode.text = "Simple"; Wavegen1.Channel1.Simple.Type.text = "Sine"; } { // configure scope Scope1.BufferSize.value = 1; Scope1.Buffer.value = 1; Scope1.Time.Mode.text = "Shift"; Scope1.Channel1.checked = true; Scope1.Channel2.checked = false; } Wavegen1.run(); for (var n=0; n<csamples; n++) { Scope1.Time.Samples.value = 1024; for (var i=0; i<hzmax; i++) { // change the frequency to the next one var frequency = frequencies[i]; Wavegen1.Channel1.Simple.Frequency.text = frequency; Scope1.Time.Rate.value = frequency * 256; print("Frequency: ",frequency," Hz | Running @ ",Scope1.Time.Rate.value," Hz | ", Scope1.Time.Samples.value," samples"); // take a single sample Scope1.single(); Scope1.wait(); // check out the FFT values var rgmag = Scope1.Channel1.fftmagnitude; var rghz = Scope1.Channel1.fftfrequency; var c = rgmag.length; var minHzDistance = frequency; // check all the FFT values, and get the one closest to our inspected frequency for(var j = 0; j < c; j++) { var hz = rghz[j] var hzDistance = frequency - hz; if (hzDistance < 0) { hzDistance = -hzDistance; } if (hzDistance <= minHzDistance) { minHzDistance = hzDistance; datapoints[3][i*csamples + n] = rgmag[j]; } } // calculate the min, max, avg values var rgmin = 1000.0; var rgavg = 0.0; var rgmax = 0.0; var validsamples = 0; for(var j = 0; j < csamples; j++) { currentsample = datapoints[3][i*csamples + j]; if (currentsample != 0) { if (currentsample < rgmin) { rgmin = currentsample; } if (currentsample > rgmax) { rgmax = currentsample; } rgavg += currentsample; validsamples++; } } rgavg /= validsamples; print("Min:",rgmin," V | Avg:",rgavg," V | Max:",rgmax," V | error: +/-",minHzDistance," Hz"); print(); // save the calculated data into their arrays datapoints[0][i] = rgmax; datapoints[1][i] = rgavg; datapoints[2][i] = rgmin; // check if the error if too high if (minHzDistance > 0.5) { Scope1.Time.Samples.value *= 2; i--; } // plot the most recent values on the chart plot1.Y1.data = datapoints[0]; // max plot1.Y2.data = datapoints[1]; // avg plot1.Y3.data = datapoints[2]; // min } }
  5. Hello again! I'm trying to use the AD2 to act as both a signal source (wavegen1) and a measurement (scope1) device for the purpose of tracking conduction delay of the signal. Currently, I simply have the wavegen1 connected directly to scope1 with 3 cycles of a sine wave being put out. I am aware of the measure command to find the maximum on my scope1 but I was wondering if there was a way to find N (3 in my case) maximums AND find the corresponding times with respect to the timing of wavegen1? I plan to assume the timing of the wavegen1 is relatively accurate to my input frequency and can find the theoretical maximum thus having the initial time from which to subtract from my scope1 maximum times. Code thus far function doPing(){ print("Amplitude and Time Delay Recorded"); // User Inputs var Freq = 5e3; var Amp = 1.0; var N = 3; // WaveGen Settinngs Wavegen1.Synchronization.text = "Synchronized"; Wavegen1.States.Trigger.text = "None"; Wavegen1.States.Wait.value = 0; Wavegen1.States.Run.value = N/Freq; Wavegen1.States.Repeat.value = 1; Wavegen1.Channel1.Mode.text = "Simple"; Wavegen1.Channel1.Simple.Offset.value = 0.0; Wavegen1.Channel1.Simple.Amplitude.value = Amp; Wavegen1.Channel1.Simple.Frequency.value = Freq; // Scope Settings Scope1.Trigger.Trigger.text = "Repeated"; Scope1.Trigger.Type.text = "Auto"; Scope1.Trigger.Source.text = "Wavegen 1"; Scope1.Trigger.Condition.Text = "Rising"; Scope1.Trigger.Level.value = Amp/2; // Start instruments Scope1.run(); wait(0.1); Wavegen1.run(); // Measure var maximum = Scope1.Channel1.measure("Maximum"); print(N+" Max: "+maximum+" V"); //Want to do for 1:N and get time and amplitude with relation to time zero being the zero of the wavegen //Close out instruments Scope1.stop(); Wavegen1.stop(); } if(!('Wavegen1' in this) || !('Scope1' in this)) { throw("Please open a Scope and a Wavegen instrument"); } doPing();
  6. I am using the Analog Discovery 2, and the latest version of WaveForms, 3.7.5, on Mac OS 10.13.3. I find that triggering the Scope on Channel 1 or Channel 2 works fine, but trying to trigger on either Wavegen channel does not give me any triggers. The same is true when trying to trigger off a pattern. The interface seems quite intuitive, but I must be missing something because I cannot get the wave form generator and the scope to synchronize, unless I trigger normally on one of the scope channels. Is there some documentation on how to do this? Thanks!
  7. Are there any example .txt and .csv files describing how to import waveforms to the wave generator ? Is it possible to import two waveforms , W1+W2 in one single comma separated csv ? Is it possible to set time-scale, sample rate etc.. in the very same csv ? I have saved from the scope and studied the resulting csv, but it doesn't work for 2 channels in the other direction. Are there corresponding example files and file definitions for the pattern generator ?
  8. For the waveform generator to be useful as a load step FET controller, I will need to control both the rise time and fall time of the same pulse. Any suggestions for most easily achieving this?
  9. Firmware: 1.37.0 Software: Waveforms Live Working waveforms: Sine, DC Waveforms that generate no output: Square, Triangle, SawtoothI have Osc1 (Orange) connected to AWG1 (Yellow). Since I get a valid DC and Sine signal I believe this wiring is validated. I've tried both auto and manual trigger. A Fluke 179 gives me equivalent readings of the Wavegen. This is not usable for my application without working Square Wave and Triangle Wave.
  10. Hello, I'm using an Analog Discovery 2 board for automated testing and I've noticed a very strange behaviour. Basically, I'm using two Wavegen DC channels for generating DC signals and recently I discovered that for some reason after a couple of days of running automated tests the output DC voltage drifts significantly (~ -25mV @ 400mV signal). After a bit of investigation I've noticed that if I run WaveForms 2015 on my development PC the output voltage is correct, but after disconnecting the USB cable and reconnecting it to my test server PC the output signal is incorrect. Both my PCs are Windows 10 64-bit, I'm using exactly the same configuration in WaveForms 2015 Wavegen tabs, the board was calibrated using WaveForms on my dev. PC and all the calibration values are the same on both PCs (which is not surprising as these values are stored in board's EEPROM). So it can be reproduced by literally just unplugging and re-plugging the USB cable from one PC to another. Re-calibrating the board on the test PC and rebooting the PC didn't help. Could you please let me know why two items of the same software behave differently and how can I make sure the board generates expected outputs on all my PCs? Thank you. Regards, Maks.
  11. How can I make burst in Wavegen? I want to generate say 10 cycles of a 1kHz sine with off period of 1 sec.