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

Subject: RE: Motor record question
From: Mark Rivers <[email protected]>
To: 'Jörn Dreyer' <[email protected]>, "[email protected]" <[email protected]>
Date: Mon, 23 Jul 2018 14:19:46 +0000
Hi Jörn,

I'm not sure I understand your question completely, but you can certainly have an iocsh command to create each of your axis objects, and you can define whatever parameters you want in those commands.  So you can have a flag in that command that indicates if it is a piezo or stepper driver, and whether or not an encoder is used.

This is an example startup script for a Newport XPS system.  Note that it has an XPSCreateController command, and then a number of XPSCreateAxis commands.  In this case the parameters to XPSCreateAxis are:
- Controller name
- Axis number
- Axis GroupName.PositionerName
- Steps per engineering unit

In your case they could include driverType and encoderPresent.

******************************
# XPS Setup
# asyn port, IP address, IP port, number of axes,
# active poll period (ms), idle poll period (ms),
# enable set position, set position settling time (ms)
XPSCreateController("XPS1", "164.54.160.14", 5001, 8, 10, 500, 0, 500)
asynSetTraceIOMask("XPS1", 0, 2)
#asynSetTraceMask("XPS1", 0, 255)

# asynPort, IP address, IP port, poll period (ms)
XPSAuxConfig("XPS_AUX1", "164.54.160.14", 5001, 50)
#asynSetTraceIOMask("XPS_AUX1", 0, 2)
#asynSetTraceMask("XPS_AUX1", 0, 255)

# XPS asyn port,  axis, groupName.positionerName, stepSize
XPSCreateAxis("XPS1",0,"GROUP1.THETA",  "87466.6667")
XPSCreateAxis("XPS1",1,"GROUP2.HEIGHT", "5000")
XPSCreateAxis("XPS1",2,"GROUP3.PITCH",  "5600")
XPSCreateAxis("XPS1",3,"GROUP4.ROLL",   "5600")
XPSCreateAxis("XPS1",4,"GROUP5.HEIGHT", "56500")
XPSCreateAxis("XPS1",5,"GROUP6.P",      "56500")
XPSCreateAxis("XPS1",6,"GROUP7.P",      "56500")
XPSCreateAxis("XPS1",7,"GROUP8.P",      "56500")
******************************

Mark


-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Jörn Dreyer
Sent: Monday, July 23, 2018 8:50 AM
To: [email protected]
Subject: Motor record question

Hello,

I'm currently developing a driver for a in house build MotorControler based on a microcontroller. This can be accessed via ethernet using a dedicate protocol. The controller is housed in a 19" rack together with up to six driver cards each capable of driving 6 motors. Some of the driver cards can be replaced by encoder input cards. To make the system even more complex, there are two types of driver cards. One which drives stepper motors and one which drives piezo motors. These cards can not be mixed within the same crate, but can both be mixed with encoder input cards. 
Thus an axis (motor) can either have an encoder connected or not and you can have both combinations in the same crate. 

I started out with a driver based on asynMotorController. But the type of axis is hardcoded in this class, so I would need to code each possible combination in a separate class. This would make the code very complex and hard to maintain.

What I would like to have is a motor controller class where an axis can be registered during startup of the IOC from the st.cmd file.

Did somebody face a similar situation before? If so, how did you solve this?
Any idea is welcome!

Regards,

Jörn




Replies:
RE: Motor record question Mark Rivers
References:
Motor record question Jörn Dreyer

Navigate by Date:
Prev: Motor record question Jörn Dreyer
Next: Re: Motor record question Pearson, Matthew R.
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  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Motor record question Jörn Dreyer
Next: RE: Motor record question Mark Rivers
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  <20182019  2020  2021  2022  2023  2024 
ANJ, 23 Jul 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·