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
- Replies:
- Re: Re: Question Regarding HLS/LLS Settings and DIR Values Zhibang Shen via Tech-talk
- References:
- Question Regarding HLS/LLS Settings and DIR Values Zhibang Shen via Tech-talk
- Navigate by Date:
- Prev:
Question Regarding HLS/LLS Settings and DIR Values Zhibang Shen via Tech-talk
- Next:
Re: Re: Question Regarding HLS/LLS Settings and DIR Values Zhibang Shen 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:
Question Regarding HLS/LLS Settings and DIR Values Zhibang Shen via Tech-talk
- Next:
Re: Re: Question Regarding HLS/LLS Settings and DIR Values Zhibang Shen 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>
|