Hi,
Thank you for your help.
I am now using SPEC 6.11.05.
I also would like to propose an example to explain the problem in detail.
Assuming that I am using the EPICS motor as EPICS_M2 in SPEC, whose sign of user times dial should use the EPICS motor's record DIR.
If I set the EPICS motor's DIR positive, and drive the motor to its highest dial position, the HLS of the EPICS motor will become 1, and SPEC will give a notification saying the motor is hitting the clockwise hard limit.
Then, I set the EPICS motor DIR negative. It is sure that if I drive the motor to decrease the user value, the dial value will still increase, in this case. Meanwhile, since the motor is already at the largest number of dial position, I cannot move the motor to a larger dial value, and also the clockwise hard limit hitting signal is expected read to SPEC.
However, the logic of EPICS motor is that since the DIR is set negative, HLS will not be activated any more. Instead, LLS is set to 1. I guess this might be the reason that SPEC does not report the notification.
Best regards,
Zhibang
> -----原始邮件-----
> 发件人: "Mark Rivers" <rivers at cars.uchicago.edu>
> 发送时间:2025-01-21 01:13:17 (星期二)
> 收件人: "shenzb at ihep.ac.cn" <shenzb at ihep.ac.cn>, "Torsten Bögershausen" <tboegi at edom.se>
> 抄送: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
> 主题: RE: Re: Question Regarding HLS/LLS Settings and DIR Values
>
> > But I still have one question, could you please tell me whether should I set the RHLS and RLLS by myself in the code or all these have been done automatically by EPICS motor?
>
> The motor record will set those based on the limit status that your driver is passing back. You don't need to do it yourself in your code.
>
> The problem with SPEC seems strange, because I would have expected this to have been reported by other users. Many beamlines use SPEC with EPICS motors, and I am sure that many of those motors have DIR=negative.
>
> I will ask the SPEC experts on our beamlines and see if we can test it.
>
> Mark
>
>
> -----Original Message-----
> From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Zhibang Shen via Tech-talk
> Sent: Monday, January 20, 2025 9:43 AM
> To: Torsten Bögershausen <tboegi at edom.se>
> Cc: tech-talk at aps.anl.gov
> Subject: Re: Re: Question Regarding HLS/LLS Settings and DIR Values
>
> Hi,
>
> Thank you for your information.
>
> The reason I raise this question is that I would like to use this motor in SPEC.
>
> If I set the DIR positive, SPEC will throw out a notification that the motor hits the limit switch. But if the DIR is set negative, no warning will be given.
>
> I asked the developer of SPEC, about which kind of limit switch is used for showing the hard limit notification. He mentioned that the limits are related to the dial position. However, according to the available PVs of standard EPICS motor, shown at
>
> https://urldefense.us/v3/__https://certif.com/spec_help/epics.html__;!!G_uCfscf7eWS!eO1OIlekREazv9thMyWvKAYqxPOELmJSbhzvO7JWRlBzBdKyOBaLLoUOwe7aOx1_NDqWoEsaL3KTrYGpnSudWg$
>
> , and also your information about the limits. It seems that the raw limit RHLS and RLLS should be used to determine which limit switch has been hit.
>
>
> Maybe I should ask more about the details from SPEC developer. But I still have one question, could you please tell me whether should I set the RHLS and RLLS by myself in the code or all these have been done automatically by EPICS motor?
>
>
> Best regards,
> Zhibang
>
>
> > -----原始邮件-----
> > 发件人: "Torsten Bögershausen" <tboegi at edom.se>
> > 发送时间:2025-01-20 21:40:50 (星期一)
> > 收件人: shenzb at ihep.ac.cn, "tech-talk at aps.anl.gov"
> > <tech-talk at aps.anl.gov>
> > 主题: [SPAM] Re: Question Regarding HLS/LLS Settings and DIR Values
> >
> > Hej Zhibang Shen,
> >
> > everything is working as it should, I think.
> > There is HLS and LLs, which are in the "User" coordinate system.
> >
> > See motorRecord.dbd:
> > field(HLS,DBF_SHORT) {
> > prompt("User High Limit Switch")
> > special(SPC_NOMOD)
> > }
> > field(LLS,DBF_SHORT) {
> > prompt("User Low Limit Switch")
> > special(SPC_NOMOD)
> > }
> > field(RHLS,DBF_SHORT) {
> > prompt("Raw High Limit Switch")
> > special(SPC_NOMOD)
> > }
> > field(RLLS,DBF_SHORT) {
> > prompt("Raw Low Limit Switch")
> > special(SPC_NOMOD)
> > }
> >
> >
> > The ones that are not swapped by DIR are RLLS and RHLS Please let us
> > know, if there are more questions.
> > /Torsten
> >
> >
> >
> >
> > On 2025-01-20 14:09, Zhibang Shen via Tech-talk wrote:
> > > Hi,
> > >
> > >
> > > I am using motor-R7-1.
> > >
> > >
> > > In the motor submodule developed by myself, I check the status of
> > > the hard limit switch and directly set motorStatusHighLimit_ and
> > > motorStatusLowLimit_.
> > >
> > >
> > >
> > > // Read the limit status
> > >
> > >
> > > //
> > >
> > >
> > > status = pC_->readReg16(axisNo_+1, LIMIT, &read_val,
> > > DEFAULT_CONTROLLER_TIMEOUT);
> > >
> > >
> > > //low limit
> > >
> > >
> > > limit = (read_val & 0x2);
> > >
> > >
> > > setIntegerParam(pC_->motorStatusLowLimit_, limit);
> > >
> > >
> > > //high limit
> > >
> > >
> > > limit = (read_val & 0x1);
> > >
> > > setIntegerParam(pC_->motorStatusHighLimit_, limit);
> > >
> > >
> > >
> > >
> > > And I find something interesting that when the motor hits the high
> > > limit switch, and the DIR is set to Positive, the HLS will be
> > > illuminated. And if I switch the DIR to Neg, without moving the
> > > motor, the LLS will become 1 and the HLS will be 0.
> > >
> > >
> > > Is the logic intentionally designed this way, or is it because my
> > > code is not good enough?
> > >
> > >
> > >
> > >
> > >
> > >
> > > --------------------------------------------------------------------
> > > ----
> > >
> > > Zhibang Shen
> > >
> > > Institute of High Energy Physics, Chinese Academy of Sciences
> > >
> > > 19B Yuquan Road, Shijingshan District, Beijing, China
> > >
> > > 100049
> > >
- References:
- Question Regarding HLS/LLS Settings and DIR Values Zhibang Shen via Tech-talk
- Re: Question Regarding HLS/LLS Settings and DIR Values Torsten Bögershausen via Tech-talk
- Re: Re: Question Regarding HLS/LLS Settings and DIR Values Zhibang Shen via Tech-talk
- RE: Re: Question Regarding HLS/LLS Settings and DIR Values Mark Rivers via Tech-talk
- Navigate by Date:
- Prev:
RE: Re: Question Regarding HLS/LLS Settings and DIR Values Mark Rivers via Tech-talk
- Next:
RE: concat multiple waveform records [SEC=OFFICIAL] STARRITT, Andrew 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
<2025>
- Navigate by Thread:
- Prev:
RE: Re: Question Regarding HLS/LLS Settings and DIR Values Mark Rivers via Tech-talk
- Next:
Does P4P Support Channel Access (CA) with a Provider Flag? Kim, Kuktae 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
<2025>
|