LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with function Waveform Generation.vi

Hi,
 
At first I thought it is a very easy problem (I still think it is)
The task: Generate a Triangle waveform and put 5 cycles on an AO.
The best example I found is the funktionWaveformGeneration.vi
I attached this example, only added a time counter and another graph to better understand what happens.
My problem now is that if I want a frequenze of e.g. 1 Hz, it is not 1 cycle per second. It is something else, but what?
I think the sollution is a mixture between the sampling rate, the number of samples and the 50 ms wait function.
 
I also attached a VI I built with the trianglewaveform.vi. I try to built my VI with the most basic moduls to get a efficient programm for a quite slow computer. 
Here I got the same problem as before, the Time. Do I have to add also a wait funktion, how do I deal with it? How do I come to 1Hz, one cycle per second.
I also have the problem that if I try to stop the VI after 5 cycles with the function I built. It nearly stops after 5 cycles, but after 4.999 "sec".
Perhaps someone also has an Idea for this problem.
 
I was surprised that I did not find a simmilar question/answer in this forum, I searched a lot. I'm sorry if I missed something.
Thanks in advance.
Best regards
0 Kudos
Message 1 of 13
(4,010 Views)
I'm sorry I just saw that I don't know why, it did not work with the attachement. And until now it doesn't work. I'll try it tomorrow again. Perhaps someone understands my problems without the Vi's and has an explanation for me. That would be great.
Thanx
       Philipp
Download All
0 Kudos
Message 2 of 13
(3,982 Views)

Smiley Happy

Ok. never press Preview post before submitting a post. The attachement will get Lost?!?

I'm new here

0 Kudos
Message 3 of 13
(3,980 Views)
Hi Philipp,

I programmed a VI and attached this, because I think this is what you want to do. Just give me a little feedback about this.

Regards,
TomBaum
0 Kudos
Message 4 of 13
(3,932 Views)
Hi Tom,
 
I'm really sorry that I did not answer yet. Thanks a lot for your fast response.
It's a pitty but until know I can not give you the feetback. I've got trouble at work and the computer made a lot of problems. When I can give a feetback I will post it as fast as possible.
 
Regards
          Philipp



Message Edited by Scherberserker on 11-28-2007 06:26 AM
0 Kudos
Message 5 of 13
(3,897 Views)

Hi Tom,

Today I just had the unexpected time to look at the Programm.

The Problem is I use the student version 8.0, is it possible to convert the 8.2.1 Version you posted into this Version? Or have you got the possibility to convert it?

That would be great. Thanks a lot.

Philipp

0 Kudos
Message 6 of 13
(3,882 Views)
Hi Philipp,

here are the VIs for LabVIEW 8.0 and 8.2.1.

Regards
TomBaum
Download All
0 Kudos
Message 7 of 13
(3,830 Views)
Thanks for the 8.0 Version Tom,
But this programm did not solve my problem. If I type in 1 HZ it is obviously a different frequenze, something like between 5 and 10Hz. It seems to me as if in the end the frequenz depends on the speed of the computer. And why did you choose 100 ms as time delay and not as in most examples 50 ms.
Is it perhaps not possible to simulate a signal in realistic time in the LabVIEW student version I use at the moment?
Or is it not possible to programm this in LabVIEW without an external timing? I can not believe that.
Regards
             Philipp
0 Kudos
Message 8 of 13
(3,806 Views)
You are going to have to explain why you think the frequency is not correct. When you type in 1 hz, the graph displays a 1 hz signal. If you type in 10 hz, the graph displays a 10 hz signal. In your chart, the signal keeps getting appended to the previous one but it a signal at the correct frequency.
0 Kudos
Message 9 of 13
(3,797 Views)
Yes that is true, the frequenze fitts to the graph scale. In the first graph it is not realy possible to judge about the frequenze visually, but in the second, in the continously graph it is easy to see, on my computer, that there is a difference between the claimed frequenze and the actuell frequence. I think the easiest freuquence to judge the time is 0.1 Hz. These are never ever on my computer 10 seconds per period. 
So if I would trie to control e.g. an electrical engine with an analog output and this signal. The programm would tell me the claimed frequence but the engine will do something else.
So in the end I don't want to have a virtuel signal with 1 Hz. I want to have a signal on an analog output.
I hope it is possible to understand my problem now. If not, please ask again and I will try to explain it different again.
Thanks for your efforts
0 Kudos
Message 10 of 13
(3,784 Views)