I prefer to use the multi-thread method beacause it's easier for me
and my colaborators to have the entire acquisition process at the same
place. Until then I use a simple one but I hope to use a more complex
one in few weeks ( put different voltages on different devices then
measure many voltages or current). If I use the "domino" technique
(call the next operation by the end of the previous) it can be complex
to read and to edit. Thank you very much anyway!

How can I write a multi-thread process? I've just tried to add
qApp.processEvents() at the end of my while loop but it doesn't change
anything...

Thanks again,

Fabien

2011/12/13 David Hoese <dho...@gmail.com>:
> Yeah I didn't think about suggesting that, but I think it might get
> complicated.  I think he would have to start a one shot timer to call a
> function to set the voltage.  Then that function would also start another
> one shot timer to call another function that would read from the sample.
>  That function then would start a one shot timer to call the first function
> again.  This way he can be sure that things are called in order and that
> timing is consistent, just in case the GUI gets complicated or something
> makes the event loop slow down.
>
> He could also use multiple threads.  Whatever works for Fabien I guess.
>
> -Dave
>
> On 12/13/11 1:00 PM, matplotlib-users-requ...@lists.sourceforge.net wrote:
>>
>> From: "Drain, Theodore R (343P)"<theodore.r.dr...@jpl.nasa.gov>
>>
>> Subject: Re: [Matplotlib-users] [ploting data] Live data
>>
>> Perhaps I'm missing something, but why not use QTimer?  You can't really
>> every call sleep in a single threaded gui (for reasons you've encountered).
>>  If you need to poll something, create a QTimer for 2 seconds and have it
>> call a measurement function to update the data.  You shouldn't need any
>> processEvents calls or sleep.
>
>

------------------------------------------------------------------------------
Cloud Computing - Latest Buzzword or a Glimpse of the Future?
This paper surveys cloud computing today: What are the benefits? 
Why are businesses embracing it? What are its payoffs and pitfalls?
http://www.accelacomm.com/jaw/sdnl/114/51425149/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to