Hi softwareguy,
Thank you for contacting National Instruments. I'm a little bit fuzzy on what exactly your application is. Are you trying to pause the analog or digital input data aquisition when a digital trigger is high (the encoder it spinning)? What signal is the encoder outputting? My experience with encoders is that they output a digital waveform which changes depending on angular velocity. If this is your case, how are you gating so that you recieve data constantly while it is running? Are you using the encoder signal as the sample clock?
What you may be describing is a pause trigger. This is when an input is suspended while a digital signal is in the pause state (e.g. high or low). If this is the case, the "
DAQmxSetDigLvlPauseTrigWhen" function may configure the behaivior you are looking for. To get to this function in the NI-DAQmx C Reference Help, I searched for "pause" and it was the first result.
The fact that the data appears to be still acquiring for so long is odd. If it was emptying the FIFO buffer, I would expect this time to be much shorter. If you post which DAQ device you are using and your Sampling Rate/Samples to Read information, that would help with further troubleshooting.
Neal M.
NIC AE
www.ni.com/support
Neal M.
Applications Engineering National Instruments www.ni.com/support