I am working with a USB 6002 , it is limited in pulse generation,the thing is that I would like to generate a digital pulse each time that a threshold from continuos sine wave is reached , I know that maybe response frecuency of the digital output is not as fast as I need in order to follow the analog signal (max 1Khz) , unfortunaly, USB-6002 does not support Counter output, and when I try to run the program attached I have the 200077 error related with the sample clock and I really don't have idea what is happen (error photo attached).
Even I do not know if there could be a way to generate digital pulse train with the USB-6002 that could follow to 1khz signal as maximum.
Thanks in advance.
I responded to your earlier Cross-post (last week). Instead of starting a new thread, you should have continued the old one, but never mind.
It seems to me that you may be trying to "solve the wrong problem" (or, maybe, you just didn't explain the problem clearly enough). I understand that you want to produce a digital pulse when an analog signal crosses a threshold. Where does this analog signal come from? I assume you are sampling it at some rate. How big is your sample? I assume you realize that if your sample size is >1 (let's say it is size 10, i.e. you acquire, say, 10 samples at 1kHz), you can easily figure out if any of the 10 samples crosses your threshold and "do something" (output a TTL pulse), but what is the relationship between the pulse and the analog signal? It could have crossed threshold any time in that 10-sample period, so your digital pulse will be delayed from 1 to 10 samples from the "true" threshold, with no way to make it better.
The only way that comes to mind is to analyze every sample. But if you do that, creating your digital pulse becomes simple -- if the signal crosses threshold, output a single Boolean T, else output a Boolean F.