From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sine pattern VI & sine wave VI

Hi, I need to know the difference between sine wave  VI and sine pattern VI in depth.. Help please?

Best Regards,
Dhans 😉
Kudos are welcome 😉
Aspirant Labview Programmer (Labview 14) 😉
0 Kudos
Message 1 of 3
(3,541 Views)

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?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(3,512 Views)

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.

 

Sine Wave and Pattern.jpg

 

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.

Message 3 of 3
(3,509 Views)