Hey Heinz,
I created a small test setup myself.
If you add
field( DTYP, "Raw Soft Channel" )
to your ai record, it calculates VAL from RVAL.
The default is "Soft channel" which does not do conversion.
Cheers,
Florian
On 8/11/22 17:00, Heinz Junkes via Tech-talk wrote:
I probably didn't take something into account, but unfortunately I don't see what I did wrong.
I have modified the ai- record from dbExample1.db:
record(ai, "$(user):aiExample")
{
field(DESC, "Analog input")
# field(INP, "$(user):calcExample.VAL NPP NMS")
field(ASLO, "2")
field(EGU, "Counts")
field(HOPR, "20")
field(LOPR, "0")
field(HIHI, "16")
field(HIGH, "6")
field(LOW, "4")
field(LOLO, "2")
field(HHSV, "MAJOR")
field(HSV, "MINOR")
field(LSV, "MINOR")
field(LLSV, "MAJOR")
}
and write into this record (RVAL) with a calcout record:
record(calcout, "$(user):dummOut") {
field(INPA, "$(user):calcExample.VAL MS CP")
field(CALC, "A")
field(OUT , "$(user):aiExample.RVAL CP")
}
RVAL is also changed, but VAL remains 0:
(base) hactar:iocmyExample junkes$ camonitor junkes:aiExample.RVAL junkes:aiExample.VAL junkes:aiExample.ASLO
junkes:aiExample.RVAL 2022-08-11 16:52:57.014817 2 LOLO MAJOR
junkes:aiExample.VAL 2022-08-11 16:52:57.014817 0 LOLO MAJOR
junkes:aiExample.ASLO 2022-08-11 16:52:57.014817 2 LOLO MAJOR
junkes:aiExample.RVAL 2022-08-11 16:52:58.016001 3 LOLO MAJOR
junkes:aiExample.RVAL 2022-08-11 16:52:59.017708 4 LOLO MAJOR
junkes:aiExample.RVAL 2022-08-11 16:53:00.015190 5 LOLO MAJOR
junkes:aiExample.RVAL 2022-08-11 16:53:01.017940 6 LOLO MAJOR
junkes:aiExample.RVAL 2022-08-11 16:53:02.015414 7 LOLO MAJOR
junkes:aiExample.RVAL 2022-08-11 16:53:03.018187 8 LOLO MAJOR
junkes:aiExample.RVAL 2022-08-11 16:53:04.018058 9 LOLO MAJOR
In the record reference manual :
If the device support sets the RVAL field, the LINR field controls how this gets converted into engineering units and placed in the VAL field as follows:
1. RVAL is converted to a double and ROFF is added to it.
2. If ASLO is non-zero the value is multiplied by ASLO.
3. AOFF is added.
Danke, for taking a look,
Heinz
--
Ruhr-Universität Bochum
AG der Experimentalphysik I
Dr. Florian Feldbauer
NB 2/131 / Fach 125
Universitätsstr. 150
D-44801 Bochum
Office: NB 2/134
Phone: (+49)234 / 32-23563
Fax: (+49)234 / 32-14170
https://paluma.ruhr-uni-bochum.de
- References:
- ai - record unfortunately does not behave as I expect it to Heinz Junkes via Tech-talk
- Navigate by Date:
- Prev:
Re: ai - record unfortunately does not behave as I expect it to Ralph Lange via Tech-talk
- Next:
Re: ai - record unfortunately does not behave as I expect it to Heinz Junkes 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: ai - record unfortunately does not behave as I expect it to Heinz Junkes via Tech-talk
- Next:
IOC file for motorMicronix MMC200 Jong Woo Kim 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
|