Test and Measurement Forum

Interrupting adc10_get_times_and_values routine

Post general discussions on using our drivers to write your own software here

Interrupting adc10_get_times_and_values routine

Postby vadimrok » Fri Jul 18, 2003 6:27 pm

Hello!

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).

Your response is greatly appreciated
vadimrok
 

Postby markspencer » Tue Jul 22, 2003 9:17 am

Hi,

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.

Best regards,
Regards,

Mark Spencer
User avatar
markspencer
Site Admin
Site Admin
 
Posts: 598
Joined: Wed May 07, 2003 9:45 am

Postby markspencer » Tue Jul 22, 2003 9:19 am

Hi,

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.

Best regards,
Regards,

Mark Spencer
User avatar
markspencer
Site Admin
Site Admin
 
Posts: 598
Joined: Wed May 07, 2003 9:45 am

Interrupting adc10_get_times_and_values routine

Postby vadimrok » Tue Jul 22, 2003 12:59 pm

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.

Thanks,

Vadim
vadimrok
 

Postby markspencer » Wed Jul 23, 2003 9:13 am

Hi,

You are unable to stop the function randomly.

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.

To contact technical support: 01480 396395.

Best regards,
Regards,

Mark Spencer
User avatar
markspencer
Site Admin
Site Admin
 
Posts: 598
Joined: Wed May 07, 2003 9:45 am


Return to General Software Discussions

Who is online

Users browsing this forum: No registered users and 0 guests