MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Monitoring using Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg104695] Re: [mg104668] Monitoring using Mathematica
  • From: John Fultz <jfultz at wolfram.com>
  • Date: Sat, 7 Nov 2009 06:47:23 -0500 (EST)
  • Reply-to: jfultz at wolfram.com

Dynamic simply does not work this way and probably never will.  Dynamic is 
inherently about a computation updating part of the screen, not a computation 
which updates periodically.

There is a function which might help, though.  The documentation discusses a
function in the JLink` context called AddPeriodical, and related functions for 
dealing with Periodical tasks.  All of these functions also live in the 
Internal` context (with, I believe, the same syntax, but don't quote me on 
that), so you wouldn't necessarily have to load JLink`.

You could still use a Dynamic to show the updated results of a periodical 
evaluation, of course.  In this case, the Dynamic wouldn't do the real work, but 
just show results as they are updated.

Sincerely,
 
John Fultz
jfultz at wolfram.com
User Interface Group
Wolfram Research, Inc.


On Fri, 6 Nov 2009 05:17:29 -0500 (EST), Harrie Kraai wrote:
> Hi there,
>
> I would like to write monitoring applications in Mathematica using
> Dynamic(Module) and Refresh, etc. An example is monitoring an RSS feed.
> I would like the interface to stay responsive, hence a simple Module
> with an infinite loop or something would not work.
>
> The "problem" with Dynamic constructs is that they are too "smart". They
> stop updating when they are not visible anymore. Of course in
> many/most cases that is a great feature. But not for monitoring. I would
> like the monitoring application to attract my attention while I am
> working on something else.
>
> The following graphic can be used for one hour to check whether the
> updating continues or not:
>
> panel = Table[Blue, {60}, {60}];
> Dynamic[Refresh[dl = DateList[];
> panel[[dl[[-2]] + 1, (dl[[-1]] // Floor) + 1]] = Red;
> ArrayPlot@panel, UpdateInterval -> 0.5, TrackedSymbols -> {}]]
>
> Scrolling the panel out of sight for a couple of seconds yields gaps in
> the Red trail.
>
> It would be very useful if I could force the Dynamic to keep on updating.
> Anyone an idea how to do this? (An option in Dynamic would be very
> helpful of course).
>
> HK





  • Prev by Date: Re: Passing function arguments as lists of replacement
  • Next by Date: Re: Finding Clusters
  • Previous by thread: Re: Monitoring using Mathematica
  • Next by thread: Thikness of edges in a 3D graph