09-17-2015 02:05 PM
Hello
I am trying to acquire a signal from a sensor, this signal will be checked all the time untill it pass a certain threshold level, if that happen, i will generate a Single pulse signal after a certain delay that i should specify. This prgram should works contiously and acquire as fast as possible and check on real time if it pass the threshold, each time that happen, it should generate a SINGLE pulse signal after a certain delay.
I have programmed that but i need that to be run in very fast mode. Also, i am wondering if i have a long delay it will delay the acquiring signal and it will not catch all corrected triggered point that i need to count them to generate the SINGLE pulse signal after a certain time.
I have attached my code, please let me know my mistakes and how this program could be run correctlly
09-18-2015 01:48 PM
You can look into using a producer consumer loop. The producer loop will queue up the data and the consumer loop can generate the pulse you need.
09-18-2015 02:39 PM
Thanks a lot for your reply.
do you know how fast this program is? i have checked the Simple queue example, and connect the (i) to indicator, and it shows very low speed
09-18-2015 03:21 PM
I'm not sure how fast it is running, but the only thing that is limiting the speed is the wait you have in the sequence structure. Everything else is running as fast as it can.