FPGA square wave generator diverts loop calendar

Description of the problem:

I have a simple while loop with a structure of matter inside. In one case, I have the
Generator FPGA Sinewave sending the data of output to AO0, otherwise, I have
the square wave FPGA sending output to AO0 generator. The sine and square
waves are set to run at 10 kHz

I also have a shift register that changes the State of DIO0 each loop through.
In this way, I can look DIO0 on my scope and say how fast the loop runs.

When I choose the sine wave generator, the output on AO0 is what I expect. That
is I have a sinusoidal signal at 10 kHz and the loop speed is approximately 1 US. Everything is good.

Then I move to the square wave. I get a signal square 10 kHz, which is good. But
My loop speed was slowed down to 50 US (it follows the square wave
exactly) is: once the loop defines the FS square wave and the
the next time through the loop, it defines the square wave to-FS.

My problem is that when I generate a square wave, I expect the speed of loop
to stay fast he does it for the sine wave. You can see what my loop speed
slows to 50 (a square wave of 10 kHz) and then all my calculations that must
go in parallel with the square wave will also be slowed.

Please help me with my understanding of the use of the square wave FPGA sub - VI

Thank you
Rich

Software of NEITHER: LabVIEW FPGA Module version 2013 SP1
OR hardware: USB-7855R R Series device

If you dig into the express VI, it will loop an SSTL until there is a change in value.  The sine wave has no need to do so because the value changes constantly.

If you can, I recommend doing your loop a SSTL and configure the express screw accordingly.  This will work as long as the rest of your code in the loop can be run in a single clock cycle.

Tags: NI Software

Similar Questions

  • minimum frequency of the square wave generator?

    I am trying to generate waves with a frequency lower than one, but it doesn't seem to be possible for some reason any. If I put it to 0.5 (for example), I just get a flat line. Tried to turn around the details of sampling (frequency 1 and Fs to 500) but still no go. Is it possible to generate frequencies below 1? Thanks in advance

    Assuming you are using the square wave function, simply set the number of samples to twice the sampling frequency of a.5 Hz signal. The default value of 1000 samples/s and 1000 samples gives you of course, 1 second of a data value. Pour.5 Hz, you must display 2 seconds to see the whole pulses (1/.5).

  • PtByPt square signal generator for output FPGA

    I'm currently building a host vi in which I can choose to send a square wave or a constant value in the analog output of FPGA.  I know this might solve using the square wave generator express vi in FPGA.vi, how ever, in order to save using the FPGA card, I want to use the generator function from signal square on the host vi.

    The first problem I encountered was square wave generator outputs feature a table instead of a ladder, so can not connect to the output function FPGA I/O node.  Then I tried square wave PtByPt. However, the functino description is a bit vague for me.  What I get now is a constant value defined by amplitude instead of a square wave.  If I set the amplitude to 4, then the wave is a continuous line with a value of 4, and if it's 4 or - 4 depends on the frequency I put.  I don't know if it is caused by the definition of wong of the time parameter of the function.

    Can someone help me understand how a square on host vi of output wave? Thank you.

    Here's the same VI to 8.5. I hope that helps!

    Gregory C.

  • How can I get a continuous square wave to the duty cycle of 50% on one of the analog lines?

    Hello, I had recently just buy an analog card to our system, and I'm still very new to labview.  I have the PXI-6723, and I need to produce a wave square of 0 to 5 volts continuously.  I used the square wave generator and used a writing funtion to one of the ports.  This produces a momentary wave and that's it.  I tried to put some time a loop around the square and watched as wave function.  It produces constantly plots, but the write function always has the same thing.  If I am the writing inside the loop function I get errors.   Any help would be greatly appreciated.  Thank you, Fred

    Another function to generate the square wave, to change the generation of waveform buffer (the Subvi used) and to connect a control at the entrance to offset from the base generator functions. or simply use the add function on the output waveform.

  • square pulse generated with the NI PCI-6723

    Hello

    I generated a pulse biphasic square in Labview using a standard square wave generator and by stopping the vi to run after generating a full periodic square wave period. The only problem I have is that as soon as I stop my code, so once the square impulse had emerged, the analog output of the Council NOR remains at the same voltage as the last sample of the generated square pulse. Instead, I'd like the voltage is back to zero.

    This is the same phenomenon that you see when you use the Measurement & Automation when you build an analog output and then you stop manually, if you take a look with an oscilloscope to output voltage, that it remains at the level you stopped analog signal.

    I have attached a picture of a pulse square with 1V amplitude and 1250 Hz frequency showing that voltage level will not return to zero. If I try to add a sample more to the curve above, the tension instantly bumps up to 1, leaving me with the same problem.

    Any thoughts?

    Thank you

    Alessandro

    It should work.

  • Best way to generate signals of activation (square wave) with my 9401 on my 9022?

    Hi, I tried seriously over the past two days to find the best way to do it. I am trying to generate a very precise square wave, controlling the duty cycle and frequency, with the OID on the 9401 in testbed cRIO 9022.

    I have a VI that is theoretically able to do this, but whenever I try to go above 5 Hz or more, duty cycle and frequency becomes inaccurate (I have watch on an oscilloscope), various a lot too for my needs. I have a feeling that this is caused by my addiction on the calendar software controlled, with errors at the time (of the ms order) accumulate as they get processed and the signal is sent. I have attached a piece of code that illustrates the basic idea of what my VI have in them.

    I have avoided the square wave generators integrated because I could never work to satisfaction, but I can work with them so that will solve my problems. Selection structures and cases prevent the user to exaggerate their inputs. Unwaited so the loop was just to test.

    I'm running the 9022 as target in real time, but also tried to run in the FPGA and I was able to produce much more accurate signals using FPGA VI square wave, displaying a Boolean variable, but I couldn't see the best way to get double precision variables to work with everything (and I want more precision than variables FXP enabled clock 40 MHz).

    I feel there is just a mistake in my approach here. I've seen other discussions where people throw around using meters to edge of the test bench to produce a square wave, and I see the example screws as Gen dig pulse - continuous Train, I'm not sure if initially these screws DAQmx for my situation (eg. How to identify my counters, because they are clearly not Dev1/ctr0 by default in these examples)

    Thank you

    Dealing with the representation of Point fixed and all is a reality for LabVIEW FPGA<= 2011="" programmers.=""  you="" might="" build="" a="" small="" sub="" vi,="" such="" as="" the="" one="" attached,="" to="" encapsulate="" the="" frequency="" calculation,="" thereby="" abstracting="" the="" conversion="" formula="" and="" fixed="" point="" data="" type.=""  you="" can="" adjust="" the="" properties="" of="" the="" floating="" point="" input="" control="" to="" accept="" only="" valid="">

    This implies the series VI void on the host of the RT, and not on the FPGA target.  So, you also need nodes in the Palette of the FPGA Interface to send PWM fixed Point RT frequency to the FPGA.  The complete solution of frequency may resemble the following.  It is common for FPGA programmers to build a collection of thesesub screw, that make up the API for hardware.

    Note that 40 MHz is hard-coded.  For increased flexibility, consider making the FPGA clock rate an entry to the Subvi with a default value of 40 MHz.

    -Steve

  • Generate a continuous output of square wave with E Series DAQ cards

    Hello

    I use a card DAQ-AT-MIO-16XE-50 and labview 6.1 to generate the frequency divider. The first thing I want to do is to enter a continuous digital signal into the program so I can divide it. The attachment is the program I use. It's pretty simple, just read the output signal and put them all in a while loop to get a continuous pulse. But when I want to observe the waveform on the oscilloscope, I got some square waves unregular.

    I'm a freshmen in labview. It will be appreciated for all her help!

    Hello

    If you are just getting started with digital i/o with traditional DAQ, I'd take a peek at some examples to see how to structure your code for both input and output.  There is one here (http://zone.ni.com/devzone/cda/epd/p/id/1113) which should give some features similar to what you are looking for, but if you want more examples, you can navigate to the examples as a result of the article here (http://digital.ni.com/public.nsf/allkb/46D0C7360A10D25F862571B5007B4411), as long as you have installed them with traditional DAQ.

  • FPGA (PXI-7852R) Square Wave DIO

    I need to improve the noise to the DIO square pulse pulse width. With my current code (attached .png) I see 25 ~ ns jitter on the front coming down from the impulse (I have the trigger on the rising) with my oscilliscope. This Jig is present even with only a single output square wave (i.e., I delete the other square wave generators).

    Any ideas how to improve the fidelity of pulse width?

    Thanks in advance!

    25 ns is the period of your clock to 40 MHz, the jitter is unavoidable at this clock frequency. The DDS square wave algorithm produces a very precise frequency over time, but cannot control the speed at which it is called to update.

    If you set the clock of the loop to a greater frequency of derived clock, you shoot the Jig by the same factor. Right-click on a 40 MHz clock embedded in the project with the FPGA target and choose new clock derived from FPGA. You may need to experiment a bit to see how high you can set the clock frequency without introducing sync in compiling violations; new targets will allow higher clock rates generally. Set up your single cycle timed loop to use the derived clock and don't forget to update your average square configuration with the new clock frequency.

  • Question of Gibbs phenomenon in square wave of labview builtin function generator

    I have a server and a client, I send commands on my client's server to generate different signals. but the display of my square wave and a waveform sawtooth in the client a Spades and lots of harmonics to it. When compared with the display of the same waveform in my server, the square wave and sawtooth wave appears. Photo will show a comparison of the two.

    Please help, I did some research and I think it could be the gibbs phenomenon happening and I'm not sure how to resolve this.


  • Square wave generation phase offset problems using PXI6602

    Hello

    I'm generating 2 signals using an incremental encoder AB using a PXI6602 to simunlating.

    Signals must be offset square wave, 34,133 Khz, by 90 degrees, which I'll put dividing (1/frequency) into 4 and put the result in the knot of late initial .vi DAQmx create channel (frequency impulse Co generation).

    Resulting signals phase difference however does not consistantly measures 90 degrees. 1 in 5 rounds of the vi has at least a matter of resulting in a test phase angle has failed.

    Can someone suggest a stable solution for this.

    Thank you

    David

    John_P1,

    After posting the previous comment, I went back to play some more with him, and he now runs and returns a positive result every time.

    The change that has had the desired effect was for the type of trigger that I had selected (Advance Digital Edge). Change this to start digital dashboard whose value fall of dash, the error disappeared.

    Feel free to always criticize the vi and suggest / modify to improve stability / efficiency.

    All feedback is voluntarily accepted

    Thank you

    David.

  • Square signal generator

    Hello

    I want to do a continuous waveform. There are samples and files online to do it, but I would like to be able to change the frequency of signals continuously, I mean something like a function generator. I try to use the channel of PFI in NI 6221, but it provides just the waveform with a constant frequency. I wonder if it's a good idea to use the channel of the IFP? I want to give 100 kHz square wave.

    Thank you

    Hi Saridar

    Thisexample may be what you are looking for!

    Concerning

  • market factor two AO signals with a square wave

    Hello

    I use two devices with sending two signals (sine wave) AO out simultaneously in my code. I need to have to cycle my signals. in other words, I want to start or OFF the devices at all times. To do this, I use a generator with duty cycle of 50% square wave. The devices must be running when the square wave has positive values and should be OFF when it is negative.

    The code almost made it, but it doesn't seem to be as fast it's supposed to, based on the frequency of the square wave. I was wondering if someone can help me with this problem. In addition, I'm not sure if this is the best method to do this, please leave me know if there is a better way. I've also attached the VI.

    Thank you

    Pooya

    I thought about it. Instead of the command at the AO signals with square wave and the structure of the case, I just made a square wave from 0 to 1 and multiplied the wave sqaure to the AO (sine wave) signals. In this way, when the amplitude of the square wave is 1, it sends the sine waves and when it is 0 it sends 0.

    Please note that all signals (sine and square) should have the same info of sampling.

  • Frequency measurement and phase of a square wave using to extract the information of your unique vi

    Hi all

    I'm trying to measure the frequency and phase of a square wave from a data acquisition card using vi retrieves your unique information. So far, the frequency can be measured precisely, but there are a few problems with the measurement of phase.

    I have attached a sample program here. I generate the wave square using Square Wave PtByPt vi. The default sample size is 1000. When I put the frequency = 7.43, phase = 80, the frequency can be measured precisely, but the phase is completely. Is there something wrong with my program?

    Thank you very much for your help.

    Best regards

    A square wave is not a single signal ;-)

    If you have a square wave use the edges to make measurements.

  • How can I design square wave which has a positive and negative values equal to the other and separated from each other by controlled time or distance

    How can I design square wave which has a positive and negative values equal to the other and separated from each other by controlled time or distance, as indicated in the figure below. and enter this signal in a data acquisition.

    At the time wherever you go for the beautiful diadram, you could have done the vi

    Your DAQ would like a waveform (table of values and dt ak 1/sampling rate)

    If you set the sampling rate you know the length of the array, create a matrix of zeros and set the values of the two amplitudes...

    Because I don't want to connect other duties here are some photos

    And it does have a few drawbacks leaves to be desired in my solution, just think... rounding errors and what might happen if the tables are becoming more...

  • How to read the digital square wave pulses

    Hello

    I recently bought a blue-white meter. I have successfully read the digital square wave from the sensor. However, I face a problem to calculate the flow rate and the total volume of liquid. Can someone help me with this?

    Technical data of the flowmeter can be access to the http://www.blue-white.com/Products/ElectronicFlow/MicroFlo/80000-406_microflo.pdf. And the calculation can be found on page 9. I use NI9401.

    Thank you


Maybe you are looking for

  • How can I get totals show for saving e-mails from files.

    My computer crashed, but I saved my TB profile. When I copied all my e-mail in the new profile files, they are all showed in the older profile a total has shown next to each folder. In the new profile I do not see how many emails are in each folder u

  • Need new display driver for Sat P20

    Hello...Is there a new display for the Satellite P20 S203 driver. ??

  • HP Z640: the installer HP Z640 Raid 1

    Hi all I've known a time setting diffcult group Raid 1 storage on my purchase newly Z640 HP. I use the SSD PCIe drive configured for (Win10 64-bit) operating system and the addition of 2 WD drives 6 to red; compatible Raid on Bios. The default OROM h

  • Download updates for my computer 64-bit for my 32-bit computer.

    Having just bought a 64-bit computer, I recently discoverred I downloaded updates for my 32-bit netbook. Is it possible to transfer these updates on my netbook to my office?

  • someone help me with this you problem

    I downloaded this game called darkages and when I try to run it gives me this error message (if you were in the middle of something, the information you have been workinng on mites get lost darkages.exe has encountered a problem and needs to close) n