On 3/22/19 4:21 PM, Neil Hamilton Jr via Tech-talk wrote:
> All,
> I've created a custom calibration subroutine (non-linear). I would like to receive raw ADC values into the subroutine record and calibrate via the custom function. However, my users will want to see the original raw value along with the calibrated value. Is it possible to pass both the raw and calibrated values to an ai record for users to subscribe to? Basically want one PV with all the raw info and have my custom calibration run when the PV comes in. Or do i just need to have two records? An ai record with raw that forward links to the subroutine record for the calibration.
It is simplest to put the two different values in two different records as you describe.
The only additional point I'll mention is the use of the TSEL field to copy timestamps.
This would ensure that both updates of raw and cooked values have exactly matching
timestamps, which makes the pairs easier to recognise.
record(ai, "RAW") {
field(FLNK, "OVEN")
}
record(sub, "OVEN") {
field(INPA, "RAW")
# ...
field(FLNK, "COOKED")
}
record(ai, "COOKED") {
field(INP , "OVEN")
field(TSEL, "RAW.TIME")
}
- References:
- custom calibration Neil Hamilton Jr via Tech-talk
- Navigate by Date:
- Prev:
custom calibration Neil Hamilton Jr via Tech-talk
- Next:
pvget is timing out Ivashkevych, Oksana 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:
custom calibration Neil Hamilton Jr via Tech-talk
- Next:
pvget is timing out Ivashkevych, Oksana 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
|