I think that you need two helper records.
(this is a copy of our motor-business "as is", you need to adjust the macros and such)
One record that is "filled" by the hardware (driver), like below, which is an input record:
record(ai, "$(PREFIX)$(MOTOR_NAME)-CfgVELO-RB")
{
field(DTYP, "asynFloat64")
field(PREC, "$(PREC)")
field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))CfgVELO-RB")
field(SCAN, "I/O Intr")
}
#########
The next helper record is an output record, that "pushes" it's value into the field
of the "wanted record", specified in the OUT field:
record(ao, "$(PREFIX)$(MOTOR_NAME)-CfgVELO-RB_")
{
field(PREC, "$(PREC)")
field(DOL, "$(PREFIX)$(MOTOR_NAME)-CfgVELO-RB CP")
field(OUT, "$(PREFIX)$(MOTOR_NAME).VELO")
field(OMSL, "closed_loop")
}
HTH
/Torsten
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of "Marco A. Barra Montevechi Filho via Tech-talk" <tech-talk at aps.anl.gov>
Reply-To: "Marco A. Barra Montevechi Filho" <marco.filho at lnls.br>
Date: Tuesday, 12 April 2022 at 18:12
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Subject: Dynamically changing HIHI PV field
Hello all.
I have an equipment which has the HIGH field configurable in the hardware. We already have a PV that reads it, but it is currently an entire PV, and not a field of another existing PV.
Im trying to get that PV result and put it in the HIGH field of another PV. Something like:
record(ai, "MY:PV") {
field(HIGH, "ANOTHER:PV:HIGH:LIMIT PP")
}
but each try of mine gets either syntax error or 'Can't set "MY:PV.HIGH" to "ANOTHER:PV:HIGH:LIMIT"'. Am i doing something wrong? Is this approach even possible?
Thanks in advance for any help.
Aviso Legal: Esta mensagem e seus anexos podem conter informações confidenciais e/ou de uso restrito. Observe atentamente seu conteúdo e considere eventual consulta ao remetente antes
de copiá-la, divulgá-la ou distribuí-la. Se você recebeu esta mensagem por engano, por favor avise o remetente e apague-a imediatamente.
Disclaimer: This email and its attachments may contain confidential and/or privileged information. Observe its content carefully and consider possible querying to the sender before
copying, disclosing or distributing it. If you have received this email by mistake, please notify the sender and delete it immediately.