04-21-2015 10:29 PM
Can anyone tell me how to generate a staircase steps in LabVIEW FPGA of clock-cycle 40 MHz.
04-22-2015 12:07 AM
04-22-2015 12:13 AM
As for example we can generate sine wave with sine wave generator on th FPGA target. Is there a way to generate staricase signals on FPGA target. There is no such generators in the FPGA library.
I can generate a staircase signal on the LabVIEW RT side. But I am using a 'build waveform' function to do that. And it is on the RT side.
04-22-2015 12:37 AM
04-22-2015 02:41 AM
I want to generate a discreet stairstep say at the rate of 10 kHz (discreet small steps underlying in a sine wave will be very small) with sizable size of steps. The steps are not related to sampling rate, or time period. Yes, you are right due to sampling rate (time period) a sine wave signal would actually be made up of small steps.
In the following link Altenbach has given a nice way of creating a stairstep in RT -
(or search with -------"How can I generate a staircase waveform in Labview")
I want to do the same thing in a FPGA target.
04-22-2015 03:10 AM - edited 04-22-2015 03:12 AM
Hi Marvin,
So all you need to do is to add your stepsize to a value in a shift register at certain points in time. Shouldn't be so hard to do in a loop…
Some pseudocode:
Add limit checks at your needs…
04-22-2015 06:36 AM
Here is something that should get you started. You will need to add any timing information and the actual output to this look. But the idea is to simply add your step size to your current size. If you go above your max limit, set your level back to 0. Since we are in FPGA, it is best to avoid the Quotient & Remainder (it uses a lot of gates).