EPICS Controls 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  2018  2019  2020  <20212022  2023  2024  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  2018  2019  2020  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Periodically calling shell functions in an IOC
From: "Hu, Yong via Tech-talk" <tech-talk at aps.anl.gov>
To: Ralph Lange <ralph.lange at gmx.de>, EPICS Tech Talk <tech-talk at aps.anl.gov>
Date: Fri, 15 Oct 2021 13:41:34 +0000

Hi Andrew W.:

 

If you do not want to hack “streamReload”, you may try this: https://github.com/NSLS-II/elauncher

 

It is an EPICS device support for easy script launcher: one can run a Python (or shell, or anything you can use in a Linux terminal) script inside an IOC through a bo record. Michael Davidsaver developed it at NSLS-II a few years ago, specifically for use cases like yours.

 

You can change how fast you want to execute your script by simply changing the field of SCAN either from a command caput or from a CS-Studio button:

 

caput elauncherTestShell.SCAN 3

caput elauncherTestShell.SCAN Passive

 

caget -d GR_ENUM elauncherTestShell.SCAN

elauncherTestShell.SCAN

    Native data type: DBF_ENUM

    Request type:     DBR_GR_ENUM

    Element count:    1

    Value:            1 second

    Status:           NO_ALARM

    Severity:         NO_ALARM

    Enums:            (10)

                      [ 0] Passive

                      [ 1] Event

                      [ 2] I/O Intr

                      [ 3] 10 second

                      [ 4] 5 second

                      [ 5] 2 second

                      [ 6] 1 second

                      [ 7] .5 second

                      [ 8] .2 second

                      [ 9] .1 second

 

 

Cheers,

Yong

 

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Reply-To: Ralph Lange <ralph.lange at gmx.de>
Date: Thursday, October 14, 2021 at 4:56 AM
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Subject: Re: Periodically calling shell functions in an IOC

 

On Wed, 13 Oct 2021 at 22:45, Wang, Andrew via Tech-talk <tech-talk at aps.anl.gov> wrote:

I have a question regarding the use of shell functions with in the IOC shell. There is a shell function from StreamDevice called streamReload that I am interested in using periodically like every 30 seconds. What is the preferred method, if there are any, for doing so? Also, is there a potential way for calling that shell function within the SNL sequencer?

 

This is unusual as operating mode. The reload function is intended for development / rapid prototyping (testing a protocol change without rebooting the IOC).

So - please be careful with respect to possible side effects: What happens if the protocol file gets corrupted, a typo is being introduced, the disk (or nfs) is down etc. How do you detect such a situation? How do you fix it?

Needs testing.

 

Cheers,
~Ralph

 


References:
Periodically calling shell functions in an IOC Wang, Andrew via Tech-talk
Re: Periodically calling shell functions in an IOC Ralph Lange via Tech-talk

Navigate by Date:
Prev: Does EPICS support MVME3100 under Linux? Dmitry Yu. Bolkhovityanov via Tech-talk
Next: Re: Channel Archiver data into Archiver Appliance? Hu, Yong via Tech-talk
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  2018  2019  2020  <20212022  2023  2024 
Navigate by Thread:
Prev: Re: Periodically calling shell functions in an IOC Ralph Lange via Tech-talk
Next: "rpcgen: Command not found" When asyn 网易邮件中心 via Tech-talk
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  2018  2019  2020  <20212022  2023  2024 
ANJ, 15 Oct 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·