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
- Replies:
- Re: Calling external program and read return value into record Mark Rivers via Tech-talk
- Re: Calling external program and read return value into record Johnson, Andrew N. via Tech-talk
- Navigate by Date:
- Prev:
Questions concerning Phoebus Florian Feldbauer 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
<2020>
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: [EXTERNAL] Questions concerning Phoebus Kasemir, Kay 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
<2020>
2021
2022
2023
2024
|