EPICS Controls 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  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024  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  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Get/Set Local Variable in motorAxis From sub Record
From: "Pearson, Matthew R. via Tech-talk" <tech-talk at aps.anl.gov>
To: Mark Rivers <rivers at cars.uchicago.edu>, William Cork <wcork at lbl.gov>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Thu, 9 Jul 2020 13:25:03 +0000
Hi,

We also use controller limits for interlocks, and that's a fairly typical method. However, relying on limits is not fool proof, so to be sure (and for an E-Stop it would be required), power has to be removed from the motor amplifier.

In terms of software, we also set the motor record SDIS via an Enable/Disable bo record, and we also set the motor record DISP field. One side effect of this is that the encoder position is not updated anymore, even though the driver is still polling the controller. To get around this we have separate ai records for each motor, connected directly to the driver position parameters, so they can be monitored separately from the motor record.

Cheers,
Matt

-----Original Message-----
From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Mark Rivers via Tech-talk
Sent: Wednesday, July 8, 2020 2:55 PM
To: William Cork <wcork at lbl.gov>
Cc: tech-talk at aps.anl.gov
Subject: [EXTERNAL] Re: Get/Set Local Variable in motorAxis From sub Record

> The purpose of this is to have the stage verify that a PLC is locking the stage for load/unload procedures. The interlock logic exists there, I'm looking for a means to have the IOC notify the user of this lock, as well as preventing any motion commands to the controller while in this state.

If the PLC can be read by EPICS then you could a PV from the PLC to control the SDIS field of the motor record.  That eliminates needing to have the logic in 2 places.

> Is this typically the kind of interlock that is seen with EPICS as a device server?

I'm not sure what is typical.  For some motor interlocks we have just used simple hardware (relays or PLCs) to open both limit lines.  That will prevent the motor from moving and can signal to the user that motion is blocked.


Mark



________________________________
From: William Cork <wcork at lbl.gov>
Sent: Wednesday, July 8, 2020 1:13 PM
To: Mark Rivers
Cc: tech-talk at aps.anl.gov
Subject: Re: Get/Set Local Variable in motorAxis From sub Record

Mark,

This is great! Exactly the kind of thing I was looking for. Thank you.

The purpose of this is to have the stage verify that a PLC is locking the stage for load/unload procedures. The interlock logic exists there, I'm looking for a means to have the IOC notify the user of this lock, as well as preventing any motion commands to the controller while in this state.

Is this typically the kind of interlock that is seen with EPICS as a device server?

-Will

On Wed, Jul 8, 2020 at 7:35 AM Mark Rivers <rivers at cars.uchicago.edu<mailto:rivers at cars.uchicago.edu>> wrote:
Hi Will,

I think my approach in this case would probably be an SNL program.

-          Add a bo record to disable the motor and set the motor record SDIS field to point to that record

-          SNL program reads from the VAL fields of the other records and writes 1 to the disable record

I don't know if this actually prevents the motor from moving in all cases but I just did a simple test and it worked.  I issued the following commands:

# Set the SDIS field to be a bo record
caput 13IDD:m15.SDIS 13IDD:Unidig1Bi15

# Set the bo record to 0.  I tested that I could move the motor.
caput 13IDD:Unidig1Bi15 0

# Set the bo record to 1.  I tested that I could not move the motor by typing into either the VAL field or pushing the tweak buttons.
caput 13IDD:Unidig1Bi15 1

Note that if the logic is simple enough you may be able to do it in a calcout record, rather than an asub or SNL.

If this is an "interlock" with serious consequences if it does not work then I would suggest a PLC solution and not software!

Mark


From: Tech-talk <tech-talk-bounces at aps.anl.gov<mailto:tech-talk-bounces at aps.anl.gov>> On Behalf Of William Cork via Tech-talk
Sent: Wednesday, July 8, 2020 4:07 AM
To: tech-talk <tech-talk at aps.anl.gov<mailto:tech-talk at aps.anl.gov>>
Subject: Get/Set Local Variable in motorAxis From sub Record

Hi All,

I'm trying to find the best solution to interlock motion from multiple other records. My current thinking is to link the VALs of these records to a sub record and have the C function modify a variable within the motor driver.

The issue I have is that I cannot find a way to link the instance of the drive I would like to have access to in the sub record process function. Is there a way to pass a reference of a controller instance to a subroutine process function?

Is there a simpler solution to this? Could the result of the sub record be linked to a field in the motor record to prevent motion?

Thank you,
Will

References:
Get/Set Local Variable in motorAxis From sub Record William Cork via Tech-talk
RE: Get/Set Local Variable in motorAxis From sub Record Mark Rivers via Tech-talk
Re: Get/Set Local Variable in motorAxis From sub Record William Cork via Tech-talk
Re: Get/Set Local Variable in motorAxis From sub Record Mark Rivers via Tech-talk

Navigate by Date:
Prev: Re: Process at Init of mbbo-record Nonn, Patrick via Tech-talk
Next: RE: Asyn/StreamDevice for HP3458A through Agilent E5810 LAN/GPIB Gateway Mark Rivers 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  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Get/Set Local Variable in motorAxis From sub Record Mark Rivers via Tech-talk
Next: Process at Init of mbbo-record Nonn, Patrick 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  <20202021  2022  2023  2024 
ANJ, 09 Jul 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·