LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

continuous traditional synchronized input output

I am using traditional DAQ with Labview 7.0 to achieve synchronized continuous input and output. The input can be thought of as a frequency in a pulse width modulation program. I am using 1 channel on PCI-6036E at a sampling rate of at least 100 Hz. This frequency value, that is read from the input, is to be used for generating a rectangular pulse signal with a pulse frequency (i.e. the frequency value read from dSpace) varying between 1 and 60 kHz. Finally, the rectangular pulse has to be output from Labview on the 8 output channels of PCI-6713 at an update rate of at least 800 kHz. All this needs to be accomplished by a single Virtual Instrument. Note that PCI-6036E has a maximum sampling rate that of 200 kHz - so input and output must be at different sampling frequencies.

I am attaching my current code. I do not think I am doing it right because I do not understand how to correctly size the different buffers. Also, what should the sample rate for the waveform generator be. I also wanted to know the correct usage of the "reset phase" on the square wave generator in order that the while loop does not hinder continuous pulsing.

Thanks in advance for your help.
0 Kudos
Message 1 of 3
(2,577 Views)

1. Why do you think you need it be a single vi?

2. If you use any type of driver you are technically using more than 1 VI, your program is currently 3 vi's....

3. Unless your hardware supports some sort of trigger then you can't truely synchronize them....

4. In software the closest to synchronized would be along the lines of "simultaneously" calling the AI and AO single (you are using continous) generation drivers

So think a bit more about what you REALLY need in those terms...In the mean time I'll check to see if the 6036E supports triggering (which I think it does) and try to shoot a small example depending on what I find...

________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 Kudos
Message 2 of 3
(2,576 Views)
First of all, thanks for your very prompt reply.

Now I understand the concept of VIs! You are right, I do not need 1 VI. So strike that requirement.

Also, per your recommendation, I do not need synchronization of Input and Output. What I do need is a guaranteed minimum sampling rate and update rate. (I was not getting that using the AO Single Update that I was using earlier.)

My reconsidered requirement is this: The input VI will continuously read data from PCI-6036E at 100 Hz and buffer it. The Square Wave Generator must read this buffer at the same rate of 100 Hz and adjust the pulse frequency accordingly. However, the square pulse that it generates must have an update rate of 800 kHz. (Note that the pulse phase should not be reset at each new frequency value; it should seamlessly carry over from the previous pulse train but with the new frequency.) The output VI will write this pulse sample to PCI-6713 at the same 800 kHz.

I hope i have been able to clarify my issue to both you and to myself!

Thanks again.
0 Kudos
Message 3 of 3
(2,561 Views)