10-04-2012 12:03 PM
Dear all,
I am trying to synchronize Analog output and digital output to a TTL input signal. I have searched the forums and adapted a vi that I found there. It almost works, but there is a problem with the synchronization. I attached the VI and I have a PCI-6229.
What I do in the VI is the following. A counter is generated which is triggered by the external TTL signal (which I connect to PFI0). The counter then is used to trigger the digital output and several analog outputs. Both the digital waveform and analog waveforms have the same lengths and same sample rates. Since the pulse has to be repeated N times, I run a for loop with start and stop task. When I run the vi, the first pulse is perfectly synchronized, but all the others are not. This seems to be independent of the time between the input pulses.
If someone could help me or give some hints as how to continue, that would be very helpful! Thanks a lot.
10-09-2012 04:20 AM
Hi Kamu,
Can you explain in more detail or post a screenshot to see which signals are not in sync?
As I understand you the digital and analog waveform which should be synced between each other are not synced to the TTL pulse after the first pulse.
Is that right?
Best Regards
Lam
10-09-2012 12:16 PM
I'm on LV 2010 and can't open your code. As very general advice, I'd be trying to configure hardware signals to do the job you're currently doing with a loop that keeps stopping and restarting a task. At the very least, the time between the stop and restart can make you miss an external TTL on PFI0.
Again, can't see your code and don't know the full intent, but you may be able to configure the counter as a retriggerable single pulse generator. Some searching for terms of that sort will lead you to more description and examples.
-Kevin P