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  <20192020  2021  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  <20192020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: asynMotor device support and the motor specific driver (asynMotorContorller)
From: "Peterson, Kevin M. via Tech-talk" <[email protected]>
To: "Rivers, Mark L." <[email protected]>, Allan Serra Braga Bugyi <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Mon, 8 Apr 2019 14:55:17 +0000
Here is an example from one of the IOCs at a beamline I support:

   $ cat PI_GCS2.cmd
   dbLoadTemplate("PI_GCS2.substitutions")
   drvAsynIPPortConfigure("C867_ETH","192.168.1.7:50000",0,0,0)
   # Turn on asyn trace
   asynSetTraceMask("C867_ETH",0,3)
   asynSetTraceIOMask("C867_ETH",0,1)
   # PI_GCS2_CreateController(portName, asynPort, numAxes, priority, 
stackSize, movingPollingRate, idlePollingRate)
   PI_GCS2_CreateController("C867", "C867_ETH",2, 0,0, 100, 1000)
   # Turn off asyn trace
   asynSetTraceMask("C867_ETH",0,1)
   asynSetTraceIOMask("C867_ETH",0,0)

   $ cat PI_GCS2.substitutions
   file "$(MOTOR)/motorApp/Db/asyn_motor.db"
   {
   pattern
   {P,        M,                    DTYP,    PORT, ADDR,      DESC, 
EGU,  DIR,  VELO,  VBAS,  ACCL,  BDST,  BVEL,  BACC,  MRES,  PREC, 
DHLM,  DLLM,  INIT}
   # U-651.03
   {IOC:,  "m1",  "asynMotor",  "C867",    0,  "Motor 1", deg,  Pos, 
5,     0,    .2,    0,      1,    .2,  0.0005,  4,     0.0,   0.0,  ""}
   # U-624.03
   {IOC:,  "m2",  "asynMotor",  "C867",    1,  "Motor 2", deg,  Pos, 
5,     0,    .2,    0,      1,    .2,  0.0020,  4,     0.0,   0.0,  ""}
}

I'm creating examples for the drivers that lack them as I move the 
drivers from the motor repositories into their own repositories.  The 
PIGCS2 support hasn't been moved yet, but there is a good chance it'll 
be a standalone repository by early next week.

Kevin

On 4/8/19 9:30 AM, Mark Rivers via Tech-talk wrote:
> Hi Allan,
> 
> 
> I am not sure I fully understand your question.  Have you tried to instantiate a controller and load a template file, and received errors, or are you not that far along?
> 
> 
> Unfortunately motor does not seem to contain an example for your controller, but it does contain examples for lots of other controllers that use devMotorAsyn.c and asynMotorController.cpp.
> 
> 
> Look in motor/iocBoot/iocWithAsyn/st.cmd.mcb4b for a simple example.
> 
> 
> It creates a controller object with
> 
> MCB4BCreateController("MCB4B1", "serial1", 4, 100, 5000)
> 
> 
> In your case I believe this would be:
> 
> PI_GCS2_CreateController(const char*portName, const char*  asynPort, int numAxes, int priority, int stackSize, int movingPollingRate, int idlePollingRate)
> 
> 
> and then loads a template file with several motor records:
> 
> dbLoadTemplate "motor.substitutions.mcb4b"
> 
> You need to create a template file for your motors.
> 
> The motor module is being split into separate repositories for each controller type.  Each repository will contain an example IOC to help with these types of questions.  These example IOCs will require help from the community, since at the APS we don't have all of the types of controllers that are supported, so we can't test examples.
> 
> Mark


References:
asynMotor device support and the motor specific driver (asynMotorContorller) Allan Serra Braga Bugyi via Tech-talk
Re: asynMotor device support and the motor specific driver (asynMotorContorller) Mark Rivers via Tech-talk

Navigate by Date:
Prev: Re: drvAsynIPPortConfigure and I/O Intr with asynRecord possible? Benjamin Franksen via Tech-talk
Next: Re: asynMotor device support and the motor specific driver (asynMotorContorller) Allan Serra Braga Bugyi 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  <20192020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: asynMotor device support and the motor specific driver (asynMotorContorller) Mark Rivers via Tech-talk
Next: Re: asynMotor device support and the motor specific driver (asynMotorContorller) Allan Serra Braga Bugyi 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  <20192020  2021  2022  2023  2024 
ANJ, 08 Apr 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·