Hi Christian,
> It was a stupid mistake I made, the solution was easy:
> In the record definition of the scalcout record i was missing the
> DTYP "Soft Module"
> field.
> Adding this got it working...
I am confused, adding that DTYP field should not be necessary, I believe it should be the default.
This is an example of a working scalcout record in one of my databases. Note that it does not specify DTYP.
record(scalcout,"$(P)DP41:$(S):sp_HIHI3") {
field(CALC,"(A>=4096)&&(A<25536)?1:0")
field(INPA,"$(P)DP41:$(S):times102.VAL NPP NMS")
field(INAA,"$(P)DP41:$(S):spHIHI.SVAL NPP NMS")
field(OUT,"$(P)DP41:$(S):sendHIHI_RAM.VAL PP MS")
field(OOPT,"When Non-zero")
field(DOPT,"Use OCAL")
field(OCAL,"AA+$P('%X',A)")
}
Can you tell me what version of EPICS base and calc you are using?
Perhaps Tim has some ideas?
Mark
________________________________
From: Christian Pauly <pauly at physik.uni-wuppertal.de>
Sent: Friday, August 14, 2020 6:45 AM
To: Mark Rivers
Subject: Re: Calling external program and read return value into record
Hi Marc
Thanks for the answer.
It was a stupid mistake I made, the solution was easy:
In the record definition of the scalcout record i was missing the
DTYP "Soft Module"
field.
Adding this got it working...
Thanks again
Christian
On 8/14/20 1:43 PM, Mark Rivers wrote:
>> "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
>
--
Dr. Christian Pauly
Bergische Universität Wuppertal
Fakultät für Mathematik und Naturwissenschaften -
Physik
Gaußstraße 20, D-42119 Wuppertal
Tel: +49 (0)202 439-2625,
Fax: +49 (0)202 439-2662
- Replies:
- Re: Calling external program and read return value into record Mooney, Tim M. via Tech-talk
- References:
- Calling external program and read return value into record Christian Pauly via Tech-talk
- Re: Calling external program and read return value into record Mark Rivers via Tech-talk
- Navigate by Date:
- Prev:
Re: [EXTERNAL] Questions concerning Phoebus Kasemir, Kay via Tech-talk
- Next:
Re: Calling external program and read return value into record Johnson, Andrew N. 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>
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Calling external program and read return value into record Mark Rivers via Tech-talk
- Next:
Re: Calling external program and read return value into record Mooney, Tim M. 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>
2021
2022
2023
2024
|