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: Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
To: 'William Cork' <wcork at lbl.gov>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Wed, 8 Jul 2020 14:35:32 +0000

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> 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>
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


Replies:
Re: Get/Set Local Variable in motorAxis From sub Record William Cork via Tech-talk
References:
Get/Set Local Variable in motorAxis From sub Record William Cork 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 Ralph Lange 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: Get/Set Local Variable in motorAxis From sub Record William Cork via Tech-talk
Next: Re: Get/Set Local Variable in motorAxis From sub Record William Cork 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, 08 Jul 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·