Hi,
If you have an asyn motor driver, and don’t want to update the motor record right now, you can also bring the limit switch status up into separate records, like this:
record(bi, "$(P)$(M):HighLimit”) {
field(DESC, "High Limit Switch")
field(DTYP, "asynInt32")
field(INP, "@asyn($(PORT),$(ADDR))MOTOR_STATUS_HIGH_LIMIT")
field(ZNAM, "Off")
field(ONAM, "On")
field(OSV, "MAJOR")
field(SCAN, "I/O Intr")
}
record(bi, "$(P)$(M):LowLimit”) {
field(DESC, "Low Limit Switch")
field(DTYP, "asynInt32")
field(INP, "@asyn($(PORT),$(ADDR))MOTOR_STATUS_LOW_LIMIT")
field(ZNAM, "Off")
field(ONAM, "On")
field(OSV, "MAJOR")
field(SCAN, "I/O Intr")
}
That saves you having to extract the MSTA bits, and provides a lower level interface to the driver parameters.
>
> At the very least, there should be something to indicate a problem if
> the limit switch that does NOT correspond to the TDIR value is triggered
> (if it doesn't already, it could at least set the PROBLEM bit in the
> MSTA field)
That’s actually a common occurrence, if you are sat on a limit switch and want to move off it in the opposite direction. Although I guess it would be possible to detect a off->on transition while an axis is moving, which would usually be an issue (either someone manually pressing a limit, or the motor is moving the wrong direction).
However, I think it should be up to the driver to set the problem bit.
Cheers,
Matt
>
> Mark
>
>
> Mark Davis NSCL/FRIB Control Systems Software Engineer [email protected]
> On 4/9/2019 1:59 PM, Mark Rivers wrote:
>> I agree that this is a bad behavior and I have complained about it for years. I think it's origin was in an old motor controller that could only tell you that it was at a limit, but not which one. So it needed to use the direction to figure that out.
>>
>> I would like to be able to unplug my motor cable with the limit connections and immediately see both limit lights on the OPI screen.
>>
>> Mark
>>
>>
>> -----Original Message-----
>> From: [email protected] <[email protected]> On Behalf Of Davis, Mark via Tech-talk
>> Sent: Tuesday, April 9, 2019 12:57 PM
>> To: [email protected]
>> Subject: limit switch fields in the motor record
>>
>> Is there a reason that the xLS/RxLS limit switch fields in the motor record only work when the TDIR field's value indicates that the motor is or was last moving in the direction that would normally trigger the corresponding limit switch?
>>
>> This means that that only way to know if a limit switch has REALLY been triggered is to monitor the bits in the MSTA field.
>>
>> I am using version 6-9 of the motor record if that makes any difference.
>>
>> Mark Davis, NSCL/FRIB
>> Control Systems Software Engineer
>> [email protected]
>
- Replies:
- Re: limit switch fields in the motor record Davis, Mark via Tech-talk
- References:
- limit switch fields in the motor record Davis, Mark via Tech-talk
- RE: limit switch fields in the motor record Mark Rivers via Tech-talk
- Re: limit switch fields in the motor record Davis, Mark via Tech-talk
- Navigate by Date:
- Prev:
Re: limit switch fields in the motor record Davis, Mark via Tech-talk
- Next:
Data logging VASU PADSUMBIA 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
- Navigate by Thread:
- Prev:
Re: limit switch fields in the motor record Davis, Mark via Tech-talk
- Next:
Re: limit switch fields in the motor record Davis, Mark 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
|