LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

i am using the function generator example

i am using the function generator example to send sine, triangular, sawtooth waves to oscilloscope.
I would like to send not only the symmetric but also unsymmetric amplitude of each wave.for example the upper peak of the amplitude, i could adjust as 2 volts and the lower peak as 3 volts or vice versa.how it works in function genartor example.Please note the i am using data acquisition card AT- MIO-16XE-50 for this purpose.please tell me with some example.
0 Kudos
Message 1 of 12
(3,563 Views)
You can set the DC Offset to something other than zero and you will have an unsymmetrical output. For example, if you set the amplitude to 5 volts, and the DC offset to -1 volt, you output will swing from -1V to 4V. To go from 2V to 3V, set the amplitude to 1V and the DC offset to 2V. The lower peak will be at 2V and the upper peak will be at 3V.
- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 12
(3,563 Views)
Thanks for your tips. i would also like to display the sin and all other waves in a graph. how can i add a graph to a function generator? i mean i want to display in graph and ossilocope simultaneosly.
thanks
0 Kudos
Message 3 of 12
(3,563 Views)
Look at the example called Function Waveform Generator. It shows the Function Generator's Signal output wired to a Waveform Graph.
- tbob

Inventor of the WORM Global
0 Kudos
Message 4 of 12
(3,563 Views)
In function waveform generator, i have one signal. but in function generator example, i have a signal which is based on 2_ D array. i mean the out put wave form coming out of compute waveform function. moreover this compute wave form function is used twice there.once in true case and second time is false case. to which case i must add the graph so that it simultaneously display the signal. thanks for this assistance. have a nice weekend and regards
0 Kudos
Message 5 of 12
(3,563 Views)
Which function generator example are you using? I have LV 7.1 installed and the examples I see are called "Function Generator with FM", "Function Waveform Generator", "Benchtop Function Generator", and "Function Generator". The first two uses software to produce the signal, and is easily displayed on a waveform graph. The last two uses an AO board to produce the signal. To graph the last one, you could modify the Compute Waveform sub-vi. This sub-vi has a waveform graph on the front panel. Modify the connector pane to include the waveform graph as an output. Then wire this new output to a waveform graph in the main vi. I hope this is what you are looking for.
- tbob

Inventor of the WORM Global
0 Kudos
Message 6 of 12
(3,563 Views)
Thanks for the reply. yes i want to graph the last example'Function generator'. but please tell me how can i modify the connector pane of Compute waveform sub-vi so that i get a graph on main front panel. moreover this compute waveform sub-vi graph i already checked. this graph is static.it is not continuosly updating the graph values like time, amplitude etc. i think this graph just capture first value and not updated with respect to time? please can you also elaborate this issue.
regards
0 Kudos
Message 7 of 12
(3,563 Views)
To add a terminal to the connector pane, right click on vi icon and select show connector. Notice that the mouse pointer turns to a wiring tool when over the connector. Click on a small box inside the pane and then click on a front panel control or indicator to connect that box to the control/indicator. Then repeat for the next control/indicator. Do this until all the inputs (controls) and outputs (indicators) you need are defined. Normally, all inputs are on the left half and all outputs are on the right half, and Error In is connected to the bottom left box, and Error Out is connected to the bottom right box. You can change the terminal pattern by right clicking on the connector pane and pointing to pa
ttern and then selecting a pattern. To make the graph as an output, click on the top right box then click on the waveform graph.
As for continuous update, put the graph inside a loop where you generate your waveform and wire the output to the graph. As long as the loop is running, you will get a continuous update. The Y axis can be configured for amplitude and the X axis for time. Right click on the graph and select properties. Play with this to become familiar with all aspects.
- tbob

Inventor of the WORM Global
0 Kudos
Message 8 of 12
(3,563 Views)
thanks for this detailed reply. now i have graph. well
but there is no continuous update. i think just the first capture is displaying in this graph. i am sending you my modified VI. can you please tell me how can i correct it.
regards
0 Kudos
Message 9 of 12
(3,563 Views)
In your outermost True/False Case structure, you have the condition terminal wired to i=0. Your waveform graph is located only in the True condition. This means the waveform will graph only during the first iteration of the while loop, when i=0. You need to move the waveform graph icon outside the Case structure so that it executes every loop iteration regardless if i=0 or not, or make a local variable and wire it inside the False condition where you obtain data readings so that it executes in both the True and False conditons.
- tbob

Inventor of the WORM Global
0 Kudos
Message 10 of 12
(3,563 Views)