LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

More than one channel : analog output

Hi
 
Well I want to generate two different signals say channel 0 and 1 : one is sine and the other is a ramp signal. I want to continuosly generate them both. I have the Vi attached where i have both the sine and ramp given seperately to the analog output. But i am not able to see the sine wave being generated (when i connect the output to an oscilloscope). Can any one tell me how we connect multiple analog outputs.
 
Thanks
Best Regards
Krithika
0 Kudos
Message 1 of 10
(3,964 Views)

HELLO ..........

 

I did some changes and have attached the vi.

 

The problem with this is that i am able to see both sine wave and ramp signal when i am just looking at channel 0 output.  I should just see sine wave.

The actual results that i want to accomplish is to ramp up/down  the generated sine wave. In other words give the generated a gradually increasing offset. Can any one pls sugggest/help me here.

 

Thanks

Best Regards

Krithika

0 Kudos
Message 2 of 10
(3,945 Views)

Hi Krithika,

use the 'function generator VI' to generate the sine wave

keep varying the offset ( think of a logic to do it programatically) to get the kind of waveform you are looking for 

any doubts, do get back

Regards

Dev

 

0 Kudos
Message 3 of 10
(3,936 Views)

Here is the VI in labVIEW 7.0

did u mention you are working on that version in your previous posts??

i vaguely remember so

 

0 Kudos
Message 4 of 10
(3,934 Views)

Hi Dev

 

Thank so much for being so helpful. I am not an expert in Labview and learn to program my application from the examples online or in the labview package.

 

Well i see from the function generator example i can give an offset to the sine wave. To program it......... well all i want is for the offset of the sine wave to come down from start to the end in say 30 seconds. How to do it ......... i am not sure. Do  i need to use a counter? Pls help me out.

 

Yes  i do have labview version 7.0 and pci 7030/6040 E series DAQ

Thank you

Krithika

0 Kudos
Message 5 of 10
(3,922 Views)
Hi Dev
 
Well i tried changing the offset on the function generator example ( have attached the same) that you suggested, I was able to offset the sine wave. So the output from the DAQ board is exactly what i want. But when i feed it to my amplifier it just filters the offset out. So i need to stick with generating two signals- one sine and the other a ramp on two different channels so that i can feed it seperately to the amplifier to seperate channels.
 
The attached VI has the ramp and the sine signals being fed to the analog
output channels (0 and 1). But the ramp generation vi has no inputs where
i can change the frequency, so that it ramps up gradually from say 0 to 2 volts (incrementing by 0.01v).

On the function waveform generation.vi from the labview examples finder,
if i change the settings on it to sawtooth, Fs = 100 , #s =10 Frequency =
1.00m , Offset = -1, i can see the an offset signal. But how do i
incorporate that into the my VI. The output is a waveform data so when i
wire it to the build array to the transpose array i see get bad wire
conection.

I know it must be a simple way of doing this but i am not very good at
LABVIEW programming. It will be great if you can help me out!


Best Regards
Krithika

0 Kudos
Message 6 of 10
(3,912 Views)
How can i get this signal generation by duration vi??? Do you think it will work for my application as it has an input for increasing ramp.
 
If so can you pls send it to me in 7.0 version.
 
 
Thanks
Krithika
 
0 Kudos
Message 7 of 10
(3,909 Views)

Sorry i had the wrong ramp1updated vi attached on my previous post.

I have re attached the same.

 

Thanks

Krithika

 

0 Kudos
Message 8 of 10
(3,907 Views)

Hi Dev

Thanks for sending me the file in 7.0 Version. Well i was able to find the singal generation with duration Vi and was able to generate the increasing ramp ( attached). I have two question:

1. In the VI i check for a condition for the ramp amplitude to be less than 1 V else go to zero but instead i want to introduce a timer for say 10 seconds and then for it to start ramping further from 1v to 5v. I am not sure how to do that. I found couple example VI that was posted which does this. One i was not able to open as it was not in 7.0 version http://forums.ni.com/ni/board/message?board.id=170&message.id=117429&requireLogin=False. But the one i opened is : http://forums.ni.com/ni/board/message?board.id=170&message.id=12889&requireLogin=False. Well this one its bit too complicated for me to follow. I really don't understand how the timer(s) is(are) functioning. Can you pls hint me something of how i can do it,

2. This is looking at the bigger picture. You know that i want to generate two analog outputs- sine and ramp on two analog channels. So .... i have a main while loop where i have AIAO function being done , so is it ok for having another while loop doing this ramp generation? Can we have two while loops running. What will be the impact of the same.

Thank you for you consistent help and being so patient with me.

Regards

Krithika

0 Kudos
Message 9 of 10
(3,897 Views)
Hi Krithika,
 
For query 2, Well, you can use a single AO config and AO write function to generate sine on channel 0 and ramp on channel 1
 
look at attached VI ( For this however,  the number of samples in for sine waveform and the number of samples representing the ramp must be equal because they form the column 0 and colum1 of the 2 D array)
 
The simplest method i can think of for achieving the condition in ur query 1, would be to use your while loop count as timer.
 
You see, that while loop will execute every one second ( since ur scan rate=Number of samples to read=100)
so i suggest use conditional checks involving the the loop iteration count ( i>=9 will indicate  10seconds have elapsed)
 
But if you want to vary the ramp during run, this 'Ramp1updated. VI' you have, will not work. you have to use function generator VI to generate a varying Ramp signal.
 
Hope these pointers will help you
 
Any doubts, do get back
 
Regards
 
Dev
0 Kudos
Message 10 of 10
(3,888 Views)