LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

user defined signal?

I want to create a function to simulate a sinusoid waveform, modulated by another signal. and then I want to use LabView's FFT to analyse it to see the frequence spectral. How to implement this use labVIEW.
If the signal is pure sinusoid waveform, that's easy. just use VI provided signal simulator. In my case I want to use a C code to generate the signal. Please give me some clue.

Thank you guys
0 Kudos
Message 1 of 8
(3,604 Views)
If you are trying to use C to write your "waveform" generator you will probably need to create a dll that meets the LabVIEW interfae requirements (described in a number of places on this site). Then data returned from calls to this dll will be added to whatever LabVIEW generated signal (sine, etc.) that you want. All of these will be basically arrays of whatever precision numbers you are wanting. What is it you are trying to create "waveform wise" that requires C code? LabVIEW, with the proper selection of built in signal generation vi's, and possibly using the formula node, can create pretty complex waveforms. Throw in a little random number generated noise and you can create some fairly realistic waveforms.

P.M.
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



Message 2 of 8
(3,590 Views)
Thank you for your reply. I am interested in your statement as following:

LabVIEW, with the proper selection of built in signal generation vi's, and possibly using the formula node, can create pretty complex waveforms. Throw in a little random number generated noise and you can create some fairly realistic waveforms.

My question is how to select proper signal generation, I tried arbitrary signal, it seems not for me. can you give me a example?

Thanks alot
0 Kudos
Message 3 of 8
(3,570 Views)
Here is a simple example showing how to modulate a sine wave with a triangle wave in LV 7.1.

Lynn
0 Kudos
Message 4 of 8
(3,559 Views)
thank you for your example. one more question. how do I change the modulator signal to real one? I mean the contents of signal changes in stead of repeat 0101010.....?
Thank u
0 Kudos
Message 5 of 8
(3,554 Views)
Hello,

I think you are asking how to build an arbitrary waveform; you can do this using the Build Waveform function in the Waveform palette. More specifically, you can expand it to define the Y array, t0, and dt inputs, which correspond to array of "Y values", the start time, and time between adjacent elements in the Y array respectively.

Repost if you have any further questions, or if I have misinterpreted your question!

Thank you,

JLS
Best,
JLS
Sixclear
0 Kudos
Message 6 of 8
(3,549 Views)
the example which johnsold attached is good. the only thing i want is to change the modulate signal to something not like triangle, maybe arbitrary waveform. how to generate arbitrary waveform? I am newbi here.

thank you
0 Kudos
Message 7 of 8
(3,536 Views)
Great!

That is exactly what my previous post described!

Here is an example to make it clearer; it uses the build waveform function, and then wires the resultant waveform to a graph. Relative to the last post, the "Y values" are are an array of random values created by the for loop, which has the (0, 1) random number generator. Note that I have plotted it to two separate waveform graphs (a "Top" and "Bottom" Waveform Graph), where the second one I have right clicked on the x-axis, selected "Formatting...", and chose "Absolute Time" instead of the default "Floating Point." I then right clicked on the second waveform (on the block diagram) and chose Create -> Property Node, selecting the x-axis offset property, which takes time stamp value (converted to double representation) and sets the offset appropriately.

Hopefully this helps, and gives you a couple other things to play with as well!

Thank you,

Best Regards,

JLS
Best,
JLS
Sixclear
0 Kudos
Message 8 of 8
(3,523 Views)