07-08-2008 04:10 PM
07-09-2008 01:34 PM
07-09-2008 06:40 PM
07-10-2008 12:16 PM
07-10-2008 01:48 PM
07-11-2008 02:47 PM - edited 07-11-2008 02:48 PM
07-24-2008 01:03 AM
07-25-2008 01:12 PM
Hi zientist,
The reason why your waveform keeps on going is because although you have a start trigger for both the generation and acquisition, you are not generating any reference trigger for your data. Therefore since you are doing a continuous acquisition, you are simply reading a set number of samples in your buffer from where your last read left off. If every chunk of data that you read from this buffer does not align with an integer multiple of your input signal period, then every read operation will return a slightly shifted set of results. So unless you are taking the right number of samples, this will give you the impression that your data is shifting in phase on your graph. One way around this would be to calculate prior to your data acquisition the exact number of samples that will correspond to an integer multiple of your input signal period and acquire that many samples for your read. However, if you change the period of your input signal, you may have to recalculate this number. If this is an issue, you should be able to programmatically set the right number of samples to acquire by using a Counter task to measure the period of your input signal and use this value to set the appropriate value.
The other option would be to use an Analog reference trigger so that the data that is acquired always starts at the same point in your signal. However, this feature only works when doing a finite acquisition, thus once the data is acquired, you will have to restart the program to acquire more points.
To answer your second question, if you also want to plot the signal you are generating, you can wire your output to another channel and read off of multiple input channels to plot them on the same graph.
I hope this helps,