10-05-2009 10:14 PM
Solved! Go to Solution.
10-05-2009 10:52 PM
10-05-2009 11:08 PM
I don't think LabVIEW programmers ever use 10.1 Hz. I know I would never choose a 10.1 Hz frequency.
But I think he is talking about how the Simulate Signal defaults to a 10.1 Hz sine wave.
If I had to guess, that slight change in frequency gives the appearance of a moving sine wave when you send it to a waveform graph. If the # of samples was an integral multiple of the frequency, then the sine wave would look static as you send it to a graphy.
10-05-2009 11:18 PM
10-06-2009 04:26 AM
Many Labview functions do have default values, but this value is not important. I suspect NI use default values so if you forget to wire data to some input. You will get something out rather than nothing and an error. It is you as a programmer who shall choose the input values. You may or may not use default values in your programming. Take a look at some of the filter VIs. The default values used here is not very useful.
10-06-2009 06:55 AM
Pilot63 wrote:
[...] I just wanted to know what is causing this as I am new to using Labview. [...]
This has nothing to do with LabVIEW at all.
If you sample a continuous, periodic signal with a continuous acquisition, you will get a "moving signal" if the number of samples multiplied with the sampling frequency does not match an integer number of periods of the signal sampled. The default value in the "Simulate Signal" ExpressVI shows exactly this phenomena, showing that the simulation matches the real world.
hope this helps,
Norbert
10-08-2009 02:47 PM
10-08-2009 03:08 PM
I think what Norbert meant by it not having anything to do with LV was that the value chosen has no significance to LV itself. He was distinguishing between the value set into the control and the internal functioning of the software.
If you did the same thing with a signal generator and an oscilloscope or programmed it in assembly language, you would see the same effect.
Why does the signal appear to move in the 10.1 case and remain stationary in the 10.0 case? If you display the data generated for the first 1.0000 seconds in the 10.0 Hz case you get exactly 10 cycles. One second later (t = 2.0000) you display the data for the time between t = 1 and t = 2 and you get exactly 10 cycles again, so they line up in phase and the waveform does not appear to move. Change the frequency to 10.1. At t = 1.0000 you will display 10.1 cycles of the waveform. At t = 2.0000 you will also display 10.1 cycles, BUT they will start at a different phase, specifically 1/10 of a cycle (36 degrees) later. Thus the waveform will appear to move across the display. This is true of any display and any data generating mechanism. If the length of the display is not an integral number of cycles,the waveform will move across the display.
Lynn
10-08-2009 03:33 PM
I call it the wagon wheel effect.
In old westerns, whenever a wagon with a big spoked wheel would ride by the camera, sometimes the wheel would look like it is slowly rolling forward, sometimes slowly rolling backwards, sometimes it would look like it was at a standstill.
It is a function of the frame rate of the camera vs. the cycle period of the spokes of the wheel. If one spoke (or more) moved exactly the right distance between one frame of the movie and the next, it would look like the wheel hadn't moved at all. If it moved a little further than the rotation distance of one spoke, it would look like it is slowly rolling forward. If the wagon is a bit slower, then it would move less than the distance of one spoke and it would look like the wheel is rolling backwards.
Same thing with having a periodic waveform (each hump of the sine wave is a spoke of the wheel), and a # of samples and data acquistion rate equal to an integer number of that period (basically the frame rate of the camera.) The wagon wheel is always rolling forward. The sine wave is always oscillating. But depending on the acquisition rate vs. the sine wave frequency gives different appearance to how that sine wave looks on the graph.
Experiment and give it a 9.9 Hz sine wave, you'll see it appears to move backwards.
So my guess (and it is only a guess) is that whoever designed the express VI gave it a default of 10.1 Hz to help visually simulate on the graph the motion of the sinewave.
It really doesn't matter what they picked as the default as it is up to you as the LabVIEW programmer to change that default setting (either in the express VI or wiring in a value) to something that makes sense for your application.
10-08-2009 03:49 PM