Hi Rolf,
Thanks. I just checked, and it looks like the motor.db Enable/Disable does set .DISP as you describe, along with .SDIS. When disabled, both medm and probe throw out a warning when changing .VAL is attempted, and the requested (changed)
value is ignored. caput behaves similarly.
Kurt
From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of
Rolf Keitel via Tech-talk
Sent: Tuesday, October 3, 2023 8:53 PM
To: tech-talk at aps.anl.gov
Subject: Re: preventing changing an EPICS motor's commanded position
The statement below is not correct. If a record is disabled, both CA clients and other database records can write to a record's .VAL field. If the record is later re-enabled and processes, this may lead to unexpected consequences or discontinuities.
If you just want to prevent CA clients to modify a record's .VAL field you should set the .DISP field to 1.
HTH - rolf -
On 2023-10-03 11:19 a.m., Goetze, Kurt via Tech-talk wrote:
Hi Ray,
“motor.db” loads a bo record, “$(P)$(M)_able”, that the motor record’s SDIS field points to.
We use this to enable/disable the motor record. When disabled, writes to the motor record’s .VAL field are not allowed.
Kurt
Perhaps what you're looking for is simply to set the Motor Record low and high limits to the drive value you want to maintain.
You could also set the SPMG field to 0 or 'Stop'. That would allow someone to change the VAL field (which is what you said you wanted to not allow), but it will prevent the Motor from actually
moving until SMPG is changed back to 2 or 'Go'. Both of these use the exposed interface to the Motor Record, so in principle can be changed at any time. But they are also not uncommon things to do for motors that you want to not accidentally move.
Ray,
Can you provide more details about what "disabling the axis" means? The
behavior of the motor record's CNEN field, which is labeled "Torque" on
the motorx_all screen, is controller dependent; for some controllers
CNEN enables/disables drive power, for other controllers CNEN switches
between open and closed loop control, and some drivers do nothing when
CNEN is changed.
Kevin
On 10/2/23 12:32, Gregory, Ray via Tech-talk wrote:
> Hi,
>
> How can I prevent changing an EPICS motor record’s commanded position
> (.VAL field) without disabling the axis?
>
> Thank you,
>
> Ray
>
> Ray Gregory
>
> Oak Ridge National Laboratory
>
--
--
Rolf Keitel, Ph.D.
Researcher Emeritus
e-mail: rolf at triumf.ca
------ Home ------
4158 West 13th Ave
Vancouver, BC, V6R 2T6
604 228 0594
------ Office: ------
604 222 7453
TRIUMF Canada’s particle accelerator centre
4004 Wesbrook Mall Vancouver, BC, V6T 2A3
www.triumf.ca |
Twitter | Facebook |
Instagram
TRIUMF is located on the traditional, ancestral, and unceded territory of the xʷməθkʷəy̓əm (Musqueam) people,
who for millennia have passed on their culture, history, and traditions from one generation to the next on this site.
|