Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017 Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
<== Date ==> <== Thread ==>

Subject: RE: Knowing if a server application is running
From: Mark Rivers <rivers@cars.uchicago.edu>
To: "'Bo Jakobsen'" <lister@f77.dk>, "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Tue, 17 Jan 2017 16:29:35 +0000
Hi Bo,

One way to do this is the following:

- Matlab writes to a longout record incrementing a counter once per second.  When the counter reaches some maximum it resets it to 0.
- A calc record in the IOC processes more slowly, say every 5 seconds.
- The calc record compares the current counter value with the previous value.
- If the values are different then Matlab is running and it sets the VAL field to 1.
- If the values are the same then Matlab is not running and it sets the VAL field to 0.
- The calc record sets the alarm fields so there is a major alarm if the value is 0.
- The user GUI has a widget that displays an alarm based on the alarm value of the calc record.

Mark


-----Original Message-----
From: tech-talk-bounces@aps.anl.gov [mailto:tech-talk-bounces@aps.anl.gov] On Behalf Of Bo Jakobsen
Sent: Tuesday, January 17, 2017 9:35 AM
To: tech-talk@aps.anl.gov
Subject: Knowing if a server application is running

Hi all,

I am building an system based on EPICS and Matlab.
The idea of the system is that a "server" is running in Matlab. This 
server which monitors and manipulates EPICS records according to some 
logics.
This works very nicely and stable (even as I known that I should 
properly write it all as seq code, but that is out of the scope of my 
current project).

My problem is now that I would like to indicate to the user if the 
Matlab server is running or not through an EPICS record.

My thought was to periodically (e.g. at least ones per second) update a 
soft record from the Matlab server. But how can I from EPICS test if 
this has happened. It could e.g. be a time stamp, or a "running number".

Any input will be mostly appreciated

Bo



References:
Knowing if a server application is running Bo Jakobsen

Navigate by Date:
Prev: Re: Knowing if a server application is running Matt Newville
Next: Re: Set env var for target when building Hugo Slepicka
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
Navigate by Thread:
Prev: Re: Knowing if a server application is running Matt Newville
Next: Re: Knowing if a server application is running Ralph Lange
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
ANJ, 14 Feb 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·