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  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: how to issue a shell command from EPICS record ?
From: Christian Pauly <[email protected]>
To: EPICS Tech Talk <[email protected]>
Date: Tue, 08 Oct 2013 01:00:55 +0200
Dear all
thanks for all the nice suggestions how to solve my shell command problem.
Of all presented solutions i like the "subroutine record" or the "StreamDevice" solution most. In both cases i have to implement a new iocsh function in C to do the system() call, as shown in the example from Emmanuel.

My iocsh does not support the system command (solution from Dirk), always says "command not found" if i try to type it in directly in the iocsh. I found something that i have to add "registrar(iocshSystemCommand)" to my database definition file (.dbd) to get the system command in iocsh, but somehow that does not work.

However, if i understand correctly: If i add a new command to the iocsh which then calls the C-function system(), then i anyway dont depend on the system command in iocsh right ?

My problem now:
There was a nice example code posted by Emanuel, but i am quite a newby to EPICS and somehow dont figure out where to put this. My starting point is the example ioc application from the "EPICS Application Developers Guide" generated with the makeBaseApp.pl script.
I can start the ioc (st.cmd), and can access the PVs using caget.

Where do i have to put the C-code with the definition of the new iocsh command now ?
Do i have to change Makefiles somewhere to compile it ?
And how do i define the corresponding "subroutine record" in my database .db file ?

Could you provide a bit more (basic) information ?
I am using EPICS R3.14.12.3


Thanks a lot,
Christian

--
Dr. Christian Pauly
Bergische Universität Wuppertal
Fachbereich C - Physik
Gaußstraße 20, D-42119 Wuppertal
Tel: +49 (0)202 439-2632,
Fax: +49 (0)202 439-2662



Replies:
Re: how to issue a shell command from EPICS record ? Eric Norum
References:
Re: how to issue a shell command from EPICS record ? Konrad, Martin
Re: how to issue a shell command from EPICS record ? Pavel Maslov

Navigate by Date:
Prev: Re: EPICS Collaboration Meeting in San Francisco Noboru Yamamoto
Next: Re: how to issue a shell command from EPICS record ? Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: how to issue a shell command from EPICS record ? Pavel Maslov
Next: Re: how to issue a shell command from EPICS record ? Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·