LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

can not get correct sinewave via labview RT

now i am working on a little program about anlog wave input and anlog wave output.here is my diagram block

program block.jpg

you know, i just load this VI into the RT system and run it, on th other hand, i choose a anlog in channel, and genarate(by the TEK machine) a sinewave(100hz,4v) into the DAQ card. The output of another DAQ card connected to the scope(another TEK machine). i wish to get the right wave, but ......

tek0000.png

tek0001.png

i do not know what is wrong with the output, maybe have something to do with the system clock, but i run it in the RT.so,if you have ever noticed this problem or you know why,please tell me!

 

0 Kudos
Message 1 of 4
(2,514 Views)

Hi,

 

Can you upload your VI so that I can edit and resend you? I think you need to change sampling parameters,buffer size and loop rate.

 

Prashant

CLAD

KUDOS ARE WELCOMED

PBP
Labview 6.1 - 2019
0 Kudos
Message 2 of 4
(2,354 Views)

Hi David,

 

Check your acquisition loop. Some bugs has to to be fix.

1. Inside the loop if you check your sample to read input as -1, its indicate that whenever samples come on your ram your are going to read that all samples. This is the wrong method give your number of samples to read as 1000. Based on your number of samples to read configure your loop rate. Means if you want to update your output in 1 sec give 1000 input to number of samples to read. If you want to read 100 samples then give 100 so now your acquisition loop rate is 10. Your loop will run 10 time to acquire complete 1000 samples so now your AO updates rate is 100ms.

 

2. Remove samples per channel input from your DAQmx timing VI. No need to give this input.

 

Thanks and Regards
Himanshu Goyal | LabVIEW Engineer- Power System Automation
Values that steer us ahead: Passion | Innovation | Ambition | Diligence | Teamwork
It Only gets BETTER!!!
0 Kudos
Message 3 of 4
(2,351 Views)

The problem is your sampling rate.  You said you are generating a 100 Hz sinewave, but you are acquiring only at 1000 Hz.  That means you are only getting 10 samples per sinewave period.  And that is exactly what you are seeing on your Tek display.

0 Kudos
Message 4 of 4
(2,333 Views)