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  <20202021  2022  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  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Calling external program and read return value into record
From: Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
To: Christian Pauly <pauly at physik.uni-wuppertal.de>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Fri, 14 Aug 2020 11:43:20 +0000
> "2020/08/14 10:03:51.229277 _main_ CBM:Lauda:AirFlow: Wrong I/O link type CONSTANT"


What versions of EPICS base and the calc module are you using?  I can't find that error string in base 3.14.12.6, 3.15.5, or 7.0.4 of base, nor in the master branch of the calc module.


Are you sure your application was built with support for the scalcout module, and that there are not other errors before that in the IOC startup output?


Mark



________________________________
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Christian Pauly via Tech-talk <tech-talk at aps.anl.gov>
Sent: Friday, August 14, 2020 3:16 AM
To: tech-talk at aps.anl.gov
Subject: Calling external program and read return value into record

Hej Folks

Again i am facing the problem to call an external program (to read out a
sensor), but this time i would like to get the stdout output from this
program (the sensor value) into a record.


I am trying to use the ExecuteDevice module for this, and basically it
works. Here is what i do:

record(bo,      "$(P)$(R)AirFlowRun")
{
   field(SCAN,   "1 second")
   field(DTYP,   "execute")
   field(OUT,    "@ReadFlow run")
   field(FLNK,   "$(P)$(R)AirFlowStr")
}


record(stringin, "$(P)$(R)AirFlowStr")
{
   field(DESC,   "Measured Air Flow as String")
   field(DTYP,   "execute")
   field(INP,    "@ReadFlow stdout")
   field(FLNK,   "$(P)$(R)AirFlow")
}

record(scalcout, "$(P)$(R)AirFlow")
{
   field(INAA,   "$(P)$(R)AirFlowStr.VAL")
   field(CALC,   "AA")
}

The first record executes the external program, and once done it
forwards to the second record to readout the stdout output. So far it works.
Problem: The second record has to be a stringin record, so i have the
output only as string not as number. record type ai is not supported by
the EcecuteDevice module.

In order to convert the string into a usable number i am trying to use
the third "scalcout" record. It should retrieve the string via input
link, and simply convert it to a float number.
However: Specifying the input link "INAA" does not work, i get an error

"2020/08/14 10:03:51.229277 _main_ CBM:Lauda:AirFlow: Wrong I/O link
type CONSTANT"

Acording to the scalcout documentation, it should be possible to use a
link as input, so i dont get why this is not working...

Or is there an even simpler way to achieve the goal ?


As always: Any help or suggestionis very welcome !!

Best regards,
Christian

References:
Calling external program and read return value into record Christian Pauly via Tech-talk

Navigate by Date:
Prev: Calling external program and read return value into record Christian Pauly via Tech-talk
Next: Re: [EXTERNAL] Questions concerning Phoebus Kasemir, Kay 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  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Calling external program and read return value into record Christian Pauly via Tech-talk
Next: Re: Calling external program and read return value into record Mark Rivers 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  <20202021  2022  2023  2024 
ANJ, 14 Aug 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·