|
Re: collecting data files [message #44761 is a reply to message #44760] |
Thu, 14 July 2005 11:41  |
Benjamin Hornberger
Messages: 258 Registered: March 2004
|
Senior Member |
|
|
clive_cook59@hotmail.com wrote:
> Ok, so how do i write a timer event?
>
Choose some widget in your GUI to generate the timer event. With
widget_control, id, timer=x
you will generate a timer event in that widget in x seconds. Note that
this happens only once, so for a continuous timer you have to include
this line of code again in the event handler itself.
To distinguish the timer event from other events: The most simple thing
is to choose a widget which otherwise doesn't generate events, like a
label widget. Otherwise, you have to check the event structure name in
the event handler for 'WIDGET_TIMER'.
Check the IDL reference for the TIMER keyword to WIDGET_CONTROL for more
information, or go to Programming in IDL -> Creating Graphical User
Interfaces -> Widget Application Techniques.
Benjamin
|
|
|
|
Re: collecting data files [message #44788 is a reply to message #44762] |
Wed, 13 July 2005 07:59  |
Benjamin Hornberger
Messages: 258 Registered: March 2004
|
Senior Member |
|
|
clive_cook59@hotmail.com wrote:
> Hi,
>
> I am trying to design a program which collects data and then adds this
> data to an updating contour plot. Thanks to some recent help on this
> forum i know how to produce the updating contour plot, however my
> problem is now collecting the data. Basically what happens is that a
> new data file arrives every 3 seconds and i want to collect that and
> append it to my plot.
>
> I have done this before by using the while statement, however now i
> need to do something similar except i have a GUI interface. I would
> like to be able to interupt the data collection and resume it. I tried
> using the while statment however i get stuck in the loop.
I a GUI, I think you would use a timer event to check for new data at
regular intervals. Ask again if you need more information.
Benjamin
|
|
|