12-26-2017 10:38 AM - edited 12-26-2017 10:44 AM
I am very new in Labview FPGA programming. Could you please explain me how to generate a triangular waveform with a given frequency, amplitude and sampling rate. I found this very simple in MATLAB. Could you please suggest some simple solutions or provide me a VI for it.
For example a triangular waveform of 25kHz, 1 Volts, sampling rate=1e-6 seconds per sample
12-26-2017 12:25 PM
Hi adi,
For example a triangular waveform of 25kHz, 1 Volts, sampling rate=1e-6 seconds per sample
- One waveform will take 40 samples (1MHz/25kHz).
- create a lookup table to implement your waveform with needed resolution (like 1 sample per degree phase)
- have that lookup table set up for 1V
Now all you need on your FPGA getting just 2 inputs: step width in degree phase and scaling factor for amplitude. In the loop you get the current value from LUT, scale it by the factor and output it on your AO. For next iteration you just add the phase step.
For your example values: you will output a value for each 9° phase: step width will be 9. Scaling factor is 1 (as 1V/1V). Your loop will output each 9th value from the LUT and start over at 0° when reaching 360°)…
01-14-2018 05:18 AM
Thanks a lot