LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Squarewave in Libraries

I've just started using LabWindows/CVI. In the Square Wave - Advanced Analysis Library, can I place a variable into the amplitude ? What are the Phase and the Square Wave in this panel ? Thank you very much.
0 Kudos
Message 1 of 4
(3,339 Views)

@Civilwar wrote:
I've just started using LabWindows/CVI. In the Square Wave - Advanced Analysis Library, can I place a variable into the amplitude ?
Yes, of course. It must be a double variable.



@Civilwar wrote:
What are the Phase and the Square Wave in this panel?
SquareWave is the generated array of doubles that contains the squadre wave signal of given frequency, amplitude and duty cycle. It must be have least NumberOfElements elements large.
Phase value (another double passed by reference) it the phase of the last element in the generated array: this is useful in case you need to generate a new wave to be concatenated with the previous one without discontinuity or distortion in the signal: passing this value to SquareWave functions generates a new signal that starts from the right moment in the period.


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 4
(3,322 Views)
Oh thanks. Can I ask you one more question ? For ex, I want to use the squarewave to generate 2 analog ouputs.

ang1= 2.5 - degree/36;
ang2= 2.5 + degree/36;

Can I use : SquareWave(128, amp,7.8125e-3, &phase, 50.0, &square); then

ang= 2.5 + amp*degree/36;

I'm still not sure about Phase & Squarewave arguments. I've tried to set the values of phase & square like :

double phase=180.0;
double square=128.0;

When I run, I receive the notice Argument is tool small for &square.

Thanks
0 Kudos
Message 3 of 4
(3,310 Views)
I can do already. Thx
0 Kudos
Message 4 of 4
(3,305 Views)