02-10-2017 05:10 AM
Hi, I need to know the difference between sine wave VI and sine pattern VI in depth.. Help please?
02-10-2017 05:43 AM - edited 02-10-2017 05:45 AM
Hi dhans,
one outputs a waveform, the other an array of DBLs…
One uses sampling info as input, the other takes number of samples…
One takes frequency as input, the other number of periods…
Did you read the help for both functions?
02-10-2017 05:47 AM
Hi dhans,
The accuracy is the same for both VIs, if you for example subtract the two arrays using the default parameters you get exactly zero.
The Sine Pattern VI is the basic one that computes your sine signal with no history, while the more advanced Sine Wave has a reset phase input parameter. If you reset the VI the first time you call it it will gives you the same waveform as the Sine Pattern but for consecutive calls it will keep phase continuity for your sine signal. Here is for example the waveforms you get if you concatenate the results of three consecutive calls of the two VIs configured to return 1.23 periods and a start phase of -22 degrees.
Note that the two VIs are configured differently (probably for historical reasons). The Sine Pattern expects you to enter the number of cycles for your record (default 1.0), while the Sine Wave expects the frequency as being defined in cycles per sample. the default is here 7.81E-3 = 1 / 128, which is also 1 cycle for the default signal length of 128 samples.