The plain "Soft Channel" Device Support does not convert - you would have to write into VAL.
To use RVAL you need to...
- use the "Raw Soft Channel" Device Support that converts
- set the LINR field to select the type of conversion you want. (Probably "SLOPE" in your case.)
Also, CP in an OUT link does not make sense - you need PP to trigger the target.
Cheers,
~Ralph
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