LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sine pattern and sine wave VI

i would like to give input arguments to Sine pattern VI and Sine wave VI. Input argument amplitude i would like to give in mm and frequency i would like to give in HZ and periods and i also want to give time as an input. Is it possible? and how? please tell me.
Regards
0 Kudos
Message 1 of 7
(3,312 Views)
I am not clear on exactly what you want, but I will try to explain what I think I understand.

Tha amplitude on both VIs is non-dimensional. So if you interpret it as mm that should not be an issue. The amplitude value is the peak value at the top of the sine.

The Sine Wave.vi has a frequency input specified in cycles/sample. For digitized samples generated in software with no hardware involved, there really is no clear way to associate a time with the waveform. If you are going to send the signal to an Anolog Out device, then the sampling rate of the device can be used to determine a frequency.

Tell us more fo what you are trying to doso we can see if we can help.

Lynn
0 Kudos
Message 2 of 7
(3,312 Views)
The attached vi shows how to input frequency and amplitude arguements to the Sine Pattern vi.
- tbob

Inventor of the WORM Global
Message 3 of 7
(3,312 Views)
Thanks for the reply. i am generating and after addition sending two sine waves to an osilloscope. but now let us talk about only one sine wave. these issues are important.

1) some times i have to send a sine with amplitude of 64.5 mm amplitude (max value of amplitude ) and 64.00(min value of amplitue).this dimension mm plays a role, because i dont want as simple sine. i dont want a sine with same trough and crest. but as i said may be trough is of 64.5 mm and crest could be 64.00mm.

2) ok now if i send 64.5 mm amplitude i want to set it like this that i get 5 volts amplitude on the osilloscope and if i send (125mm amplitude) i have to set that this sine is generating 10 volts on the osilloscope. how can i do this?
that means just when
i am selecting different values of amplitude in mm, i am generating corresponding volts and displaying it on osilloscope.
3) when you say frequency specified in cycles/sample, what do you mean? do you meant this is in Hz. as i said i am sending this frequency to an osilloscope and i am using AT-MIO-16XE-50 board for this purpose.
4) finally i also want to calculate how many total periods generated, when i send a sine wave. for example if send/generated a sine wave of 64.5 mm max and 64.0mm min(around 5.0 volts max and 4.9 volts min), with 1.6 HZ frequency, for a total of 3hours time. how many periods for this wave i get?
i hope you got me.i am also attaching my VI one with function generator and the other with sine pattern.
as i am a first year university student. a beginner in labview and learning. i hope my basic questions will not annoy you. i will appreciate for any help. Thanks
regards
0 Kudos
Message 4 of 7
(3,312 Views)
Thanks for the reply. i am generating and after addition sending two sine waves to an osilloscope. but now let us talk about only one sine wave. these issues are important.

1) some times i have to send a sine with amplitude of 64.5 mm amplitude (max value of amplitude ) and 64.00(min value of amplitue).this dimension mm plays a role, because i dont want as simple sine. i dont want a sine with same trough and crest. but as i said may be trough is of 64.5 mm and crest could be 64.00mm.


2) ok now if i send 64.5 mm amplitude i want to set it like this that i get 5 volts amplitude on the osilloscope and if i send (125mm amplitude) i have to set that this sine is generating 10 volts on the osilloscope. how can i do this?
that means just whe
n i am selecting different values of amplitude in mm, i am generating corresponding volts and displaying it on osilloscope.
3) when you say frequency specified in cycles/sample, what do you mean? do you meant this is in Hz. as i said i am sending this frequency to an osilloscope and i am using AT-MIO-16XE-50 board for this purpose.
4) finally i also want to calculate how many total periods generated, when i send a sine wave. for example if send/generated a sine wave of 64.5 mm max and 64.0mm min(around 5.0 volts max and 4.9 volts min), with 1.6 HZ frequency, for a total of 3hours time. how many periods for this wave i get?
i hope you got me.i am also attaching my VI one with function generator and the other with sine pattern.
as i am a first year university student. a beginner in labview and learning. i hope my basic questions will not annoy you. i will appreciate for any help. Thanks
regards"
0 Kudos
Message 5 of 7
(3,312 Views)
Sorry, I don't know what mm as pertains to amplitude means. I am used to seeing amplitude in volts. But, to get a sine wave where the positive peak and negative peak are of different values, you need to specify a DC Offset. for example, to get a + peak of 8V and a - peak of -2V, you specify an amplitude of 10V (8-(-2)), and a DC Offset of 3V (8-(10/2)). Your sine wave will center around the DC Offset of 3V, and the positive peak will be 8V, the negative peak will be -2V.
Cycles/sample means how many cycles (or periods) will be contained in your sample. If your freq is 1000Hz and the number of cycles is 1000, then the sample will be generated in 1 second.
There are 10,800 seconds in 3 hours (3x60x60). Multiply this by 1.6Hz (1.6 cycles per
second) and you get 17,280 cycles. This is the number of cycles that you need to generate at 1.6Hz to get a signal generation for 3 hours.
- tbob

Inventor of the WORM Global
0 Kudos
Message 6 of 7
(3,312 Views)
thanks for the reply.
1)Actually at the user interface level i am giving amplitude in mm as user input and internally i can
treat the amplitude in volts. this is because i have to control the vertical osillatory movemant of a cylinder. and this movement is in mm.
2)regarding DC offset The example you gave, there DC offset will be center around +3 volts. i dont want Dc offset to be move away from 0 volt. what i am saying is that DC offset is fixed/lie on 0 volt, and Trough could be 4 volts and crest could be 5 volts. is it possible?
i think i have to generate two different sine waves like these eq x1=4sin(x) and x2=5sin(x). what i think that i have to generate two sine waves with half periods each of them and then add them to make one si
ne wave of 4 volt amplitude and the other of 5 volt amplitude keeping Dc offset center around 0.
please tell me if you dont agree.
3)is there any limit of frequency i can give to my sine pattern VIS/function generator VIS or i can give frequency in KHz and so on. if there is some limit then what is the limit. and if i want to give high frequency as input argument, how is it possible?
thanks
Regards
0 Kudos
Message 7 of 7
(3,312 Views)