Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I perform continuous acquisition of a repetitive waveform?

I want to synchronously acquire a repetitive waveform where there is little or no dead time between cycles. I plan to use an external trigger and scan clock. I need to store each cycle of the waveform as a separate record so I need to know the start and stop sample for each cycle.

I considered putting an N sample acquisition inside a Do While loop, but I can't afford to drop cycles.

I'm considering doing a continuous acquisition and calculating the correct number samples to read from the buffer for each waveform cycle. My concern with this method is that I need to acquire waveforms for a long time (many hours) and I'm concerned about losing synchronization. I've thought that maybe I could acqu
ire say a 1000 cycles and then restart the process, which would minimize dropping cycles and maintain synchronization.

Any suggestions? Am I making this harder than it really is? I probably should say that I'm using a 6052E DAQ sampling at 100ksps.
0 Kudos
Message 1 of 3
(2,716 Views)
Barry,

I absolutely agree that you should perform a continuous acquisition. Repeatedly performing a finite acquisition definitely could lead to the missing of cycles. I am assuming that the external trigger pulses at the beginning of a new cycle. You may want to consider using one of your NI 6052E's counters to perform a buffered period measurement with the external scan clock as the source and the external trigger as the gate. This measurement will fill a buffer with the number of data points that comprise each cycle. With this information, you could be assured of the number of data points you will need to read from the analog input buffer for each cycle.

Good luck with your application.

Spencer S.
0 Kudos
Message 2 of 3
(2,716 Views)
Hi

I am trying to solve a similar problem at the moment (I have a discussion going in the 'Dynamic Signal Acquisition and Analysis' section) but have not found a completely satisfactory solution so far.

I am acquiring an analogue signal from a rotating machine from which I also have a TTL signal which gives me a once per revolution (OPR) marker. I want to continuously acquire the analogue signal and use the OPR pulsing signal to 'chop up' my continuous analogue signal into a set of data for each rev.

I have used a method similar to the one you have described - I use continuous double-buffered acquisition to acquire the analogue signal and the counter values, with the OPR pulse signal as the counter gate. However, I have been unable to synchronise the s
tart of the signal and counter acquisitions together. I can start the signal acquisition using the OPR signal as a trigger but not the counter. I tried using GPCTR_Change_Parameter() to set the start trigger to external (ND_ENABLED) but this is not permitted with my E Series device (PCI-6111E with DAQ-STC).

Do you know a way round this? And even if I could start my counter acquisition using the OPR signal, how do I ensure that I haven't missed any revs between starting the signal and counter acquisitions (in tests where I use immediate software triggers for the signal then the counter in successive lines of C++ code, my counter is already 2 cycles behind at just 100Hz OPR).
0 Kudos
Message 3 of 3
(2,716 Views)