I am trying to implement three consecutive outputs using cbDOutScan() using the Windows UL (in C) where each output consists of 20 patterns (DataArray is size 20 elements). While the pulses being generated have the correct rate and count, there is always a large delay between each output. The first 20 patterns can be seen, the second 20 patterns can be seen after a big delay, and the third 20 patterns can be seen after another big delay using an oscilloscope. It seems like there a 100 ms constant from when one output starts to to the time when the next one starts and not sure why this is the case...
I have used the BACKGROUND option but it does not help. Even when stopping the background operation using cbStopBackground() function does not seem to do anything. It is always 100 ms between the start times of each outputs scan.
I have coded this for a simple command window program, and also a WinAPI 32 bit program with the same results.
Strange thing is when using cbDOut() without the Scan part, the three sets of 20 patterns each come out immediately one after another. Of course I cannot adjust the rate using this function so my only option is to use cbDOutScan() function.
Question
PARESH
I am trying to implement three consecutive outputs using cbDOutScan() using the Windows UL (in C) where each output consists of 20 patterns (DataArray is size 20 elements). While the pulses being generated have the correct rate and count, there is always a large delay between each output. The first 20 patterns can be seen, the second 20 patterns can be seen after a big delay, and the third 20 patterns can be seen after another big delay using an oscilloscope. It seems like there a 100 ms constant from when one output starts to to the time when the next one starts and not sure why this is the case...
I have used the BACKGROUND option but it does not help. Even when stopping the background operation using cbStopBackground() function does not seem to do anything. It is always 100 ms between the start times of each outputs scan.
I have coded this for a simple command window program, and also a WinAPI 32 bit program with the same results.
Strange thing is when using cbDOut() without the Scan part, the three sets of 20 patterns each come out immediately one after another. Of course I cannot adjust the rate using this function so my only option is to use cbDOutScan() function.
Any help or recommendations are appreciated.
TestIO.c
Edited by PARESHLink to comment
Share on other sites
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now