Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019 
<== Date ==> <== Thread ==>

Subject: RE: motor record: continuously update limit switches
From: Mark Rivers <rivers@cars.uchicago.edu>
To: "'Konrad, Martin'" <konrad@frib.msu.edu>, "sluiter@aps.anl.gov" <sluiter@aps.anl.gov>, "mooney@aps.anl.gov" <mooney@aps.anl.gov>, "sullivan@aps.anl.gov" <sullivan@aps.anl.gov>
Cc: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Fri, 26 Jul 2013 20:40:24 +0000
Hi Martin,

> Unfortunately this seems not to be the case with the PC6K device
> support. MSTA seems not to be updated while the motor is stopped. Can
> this be considered a bug?

Yes, I think so.  

I tested the OMS-58 and MSTA does update if the limit is disconnected and STUP is set to 1.  It only shows 1 limit, not both, but I believe that is a limitation of the OMS-58 hardware, it only reports the limit switch in the direction of last travel.

I also tested the ACS MCB-4B.  When no limits were pressed MSTA was 0x2.  When I disconnected the cable and pressed STUP then MSTA changed of 0x2006. So bits 3 and 14 (numbering from 1) were changed from 0 to 1 as expected.  It is thus showing both of the limits.

There are 2 drivers for the ACS MCB-4B, a old Model 1 driver and a new Model 3 driver.  The test I did was on an IOC running the old Model 1 driver.  The PC6K is also a Model 1 driver, so it should be able to update MSTA in response to STUP just like the MCB-4B does.

An important difference I see in the device support for the MCB-4B and PC6K is the following:

devMCB4B.cc
    case GET_INFO:
        /* These commands are not actually done by sending a message, but
           rather they will indirectly cause the driver to read the status
           of all motors */
        break;


devPC6K.cc
        case GET_INFO:
            /* These commands are not actually done by sending a message, but
               rather they will indirectly cause the driver to read the status
               of all motors */
            sendMsg = false;
            break;

So the PC6K is setting sendMsg=false for the GET_INFO command, but the MCB4B is not.  The GET_INFO command is what STUP does.  I would suggest commenting out that line and seeing if then the STUP works.


Mark


-----Original Message-----
From: Konrad, Martin [mailto:konrad@frib.msu.edu] 
Sent: Friday, July 26, 2013 3:07 PM
To: Mark Rivers; sluiter@aps.anl.gov; mooney@aps.anl.gov; sullivan@aps.anl.gov
Cc: tech-talk@aps.anl.gov
Subject: Re: motor record: continuously update limit switches

Hi!

Thanks for you reply, Mark.
> HLS, RHLS, LLS and RLLS only update when you try to move the motor in
> the direction of the offending switch.
>
> However, the MSTA field will update if you write 1 to the STUP
> field.
Unfortunately this seems not to be the case with the PC6K device
support. MSTA seems not to be updated while the motor is stopped. Can
this be considered a bug?
> Is your goal to make the user aware of the limit status by changing
> something in the GUI?
Yes, exactly. Maybe also for a state-machine that implements some sort
of a calibration procedure.
> It would be nice if HLS, RHLS, LLS and RLLS reflected the actual
> limit status.  In fact the motor record documentation is wrong.  For
> HLS and RHLS it says:
>
> " If either of these fields is nonzero, then the motor is at the
> positive-limit switch, where the positive sense is that of the
> user-coordinate system for HLS, and that of the raw (step-number)
> coordinate system for RHLS."
>
> That is not true, it does not reflect the state of the switch.  It
> only reflects the error status if the switch is hit and the user
> tries to move in the direction of that switch.
@Ron/Tim/Joe: Can you fix the documentation with the next release,
please? And while we're at it: The Documentation website says "Last
modified: June 25, 2003" which is most likely wrong as well.

Thank you very much,

Martin


References:
motor record: continuously update limit switches Konrad, Martin
Re: motor record: continuously update limit switches Konrad, Martin

Navigate by Date:
Prev: Re: motor record: continuously update limit switches Konrad, Martin
Next: RE: CA question with two identical servers Emmanuel Mayssat
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019 
Navigate by Thread:
Prev: Re: motor record: continuously update limit switches Konrad, Martin
Next: Re: motor record: continuously update limit switches Konrad, Martin
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·