Visual C++ 6.0; Windows 2000; DC-12 parallel hookup
Is it possible to abort adc10_get_times_and_values(...) programmatically for a non-streming device (adc-12 hooked-up to the parallel port).
After I use adc10_set_interval(lMilliSecs, ...), the call adc10_get_times_and_values(...) would block for lMilliSecs. My application is multithreaded so I want to call all ADC-12 functions from one thread
and be able to force premature return of adc10_get_times_and_values while still be able to record collected data. The request to stop data collection would come from a different thread. If it is not possible for a parallel (non-straming connection), can it be done for a USB (streaming connection).
It is not possible to interupt the data collection during the adc10_get_times_and _values, whether it is running in block mode or if it is in streaming mode.
The function will not return until all the specified number of values have been collected when in block mode, and in streaming mode (BM_STREAM) it will return with the values that are available. Therefore, streaming will return from the function the quickest.
It is not possible to interupt the data collection during the adc10_get_times_and _values, whether it is running in block mode or if it is in streaming mode.
The function will not return until all the specified number of values have been collected when in block mode, and in streaming mode (BM_STREAM) it will return with the values that are available. Therefore, streaming will return from the function the quickest.
I got confused with your reply. All I need to do is to stop data collection at random time because I do not know when the collection has to stop. I know it approximately (+-10 seconds). So even if I call Interrupting adc10_get_times_and_values() with parameters to hold the largest possible data sample in my particular app, I would not be able to stop it at random? Judging by your answer I have to know the exact time interval over which to collect data OR the exact number of samples I wish to collect.
Also please answer me TODAY or give me the phone number you can be reached at because I need the answer rather urgently.
The get_times_and_values function will then collect a block of data as specified by the no_of_values parameter. The length of time that it will take to get the data is determined by the time_interval between each reading.
You need to use the run function to start the data collection off.
Keep looping to see if the data has been all collected using ready()
and then collect the data after it has exited the loop. You can use a time out or a keyboard hit to exit the loop early, however by doing this you will probably get invalid data.