02-03-2006 05:34 AM
Dear all
I have a PCI 6251 card with LabView 7.1.1; I need to generate an analog signal with frequencies of interest between 50 to 200Hz. Lets say for the first experiment I want to generate a 100Hz sine wave, so in the graph of amplitude verses time for this sine wave the time axis is crossed 200 times in a second, after generating the sine wave I need a 4 seconds delay before anything is done, after that the delay doesn’t need to be repeated since the system under test is stabilised for the frequency of interest. I need a TTL output every time the time axis is crossed (lets call this A). I also need a another TTL output, synchronised to the first, but this time only 1 TTL should be written to the port (lets call this B), the position of this TTL is not important in the space of one second that we are talking about. I also need to take analog input measurements, which again should be synchronised to the TTL that we called B. I want the analog measurement to start before the TTL(B), and when the analog measurement in half way through it should be the time that the TTL(B) is generated and then the analog measurement will continue after TTL(B). The amount of analog samples taken before TTL(B) is equal to the amount taken afterwards (I think its called pre-sampling). To round it off I need all these things to happen very accurately in the time domain, so I prefer if the TTL’s are off by microseconds rather than milliseconds, but I am prepared to go on with the milliseconds if there is no other way. Then for second experiment I need to go through the same procedure but this time the analog generation has a frequency of say 200Hz, so TTL(A) should have 400 TTL pulses in a second but TTL(B) should remain at 1 TTL pulse in 1 second.
Could you please help me with this?
Regards
02-07-2006 07:59 AM
02-07-2006 09:07 AM
Hello
The width of the TTL are not important since the rising edges are used, however it would be beneficial to have a control over the width, but for now its not that important. Same is applicable to the second TTL. The second TTL which happens once a second (when the sine crosses zero) does not trigger the analog measurement. But like the first TTL it triggers an external device, however I also want to acquire analog data with sampling frequency of 2048 and 512 points using the second TTL with pretriggering. So I think in a way the second TTL is used for pretriggering.
Thanks for your help
02-10-2006 05:04 AM
Hi again,
I have been trying to set up a system like this. I think it may be possible but it will be fairly involved. How tight do you need the syncronisation between the sine wave crossing the zero point and the TTL pulses? Does it need to be micro second, nano second etc?
Jon B
Applications Engineer
NIUK
02-11-2006 07:27 AM
Hello
The delay should be maximum of 1 micro seconds.
I have been trying to do program as well, and it is complicated, if it will make it any easier we can ignore TTL (A), but we still need analog output (with a given amplitude and frequency), one TTL output per second when the sine wave crosses the zero in that second (that is TTL (B)), analog input for 2 or more channels with pre triggering on the basis of the TTL (B). Also we still need the TTL (B) to start 5 second after the analog output started so that the system is stabilised.
The analog output drives a speaker, I have tried to use analog output point by point generation, and then at the same time compare the elements of the waveform to zero and if a value was equal to zero, then feed a true statement to a digital output vi, the problem was that the analog output point by point did not work on the speaker and the TTL jumped around (they were all in a loop so I think that was the problem). So it was no where close to the delay that I wanted.
Regards
02-13-2006 05:43 AM
02-13-2006 08:18 AM
Hello
Thanks for the solution, but there is a small problem. Just tried the new vi, I can see the sine wave on the oscilloscope but the TTL is not there, any ideas?
I did change all the Dev7 into Dev1 and set the digital output to Dev1\port0\line2
Regards
02-13-2006 11:36 AM
Hi again
I have modified the program that you sent me, this one gives me the TTL’s on the oscilloscope as well, the problem is that it gives too many of them in one second and also since it compares the element of the matrix to an upper limit and lower limit values, it is only restricted to certain frequencies.
Regards
02-14-2006 03:08 AM
02-14-2006 07:16 AM
Hi again
Thanks for the program, there are still some problems, the TTL’s are used to trigger an external PIV camera system, but it seems they are too fast for it, I know I said the rising edges are important (and that’s what I was told). Are there any industry standard for TTL properties (i.e. slope of the rising edge and so on?)
Regards