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 2020 2021 2022 <2023> 2024 2025 | 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 2020 2021 2022 <2023> 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Understanding Asyn-based motor controller driver |
From: | Mark Rivers via Tech-talk <tech-talk at aps.anl.gov> |
To: | "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>, Abdalla Ahmad <Abdalla.Ahmad at sesame.org.jo> |
Date: | Mon, 9 Jan 2023 14:37:23 +0000 |
Hi Abdalla,
Yes,
that is correct, the driver does not support jogging because it does not implement those methods.
That
is not correct. The motorVelocity_ and motorAccel_ fields in asynMotorController.h do not hold the velocity and acceleration information. Those are "parameter numbers" used to identify that those values in the asynPortDriver parameter library. They are
used in calls like this in asynMotorController.cpp
This is the motorAcsMotion axis move() function:
It uses the "maxVelocity" and "acceleration" values passed to it from the motor record VELO and ACCL fields.
Again, motorResolution_ and motorRecResolution_ are parameter number, not values. I just did a search and no drivers appear to use motorResolution_ at all. The
position values passed to the driver from the motor record are in "steps", i.e. although they are "double" values they are actually always integers with no fractional part. For motor controllers that work in steps this is simple. For controllers that use
engineering units and not steps there is a translation required. It is often implemented using the MRES field in the driver to generate a large integer value to be passed
to the driver, which then divides by some number to get back to engineering units. If the driver number is the same as MRES then the motor record units are the same as the controller units. That is not required, they could be different, so the controller
could be using mm and the motor record using microns, for example.
In general the driver does not need to know the motor record resolution, but in some unusual cases it does. In that case the motorRecResolution_ parameter is used to communicate that
information. One case where it is used is for multi-axis coordinated motion (profile moves) on the Newport XPS controller. The profile move API uses the user coordinate system in the motor record. The driver thus needs to know the motor record resolution,
direction, and offset to convert from user coordinates to controller coordinates. That is what the motorRecResolution_, motorRecDirection_, and motorRecOffset_ fields are used for.
Mark
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Abdalla Ahmad via Tech-talk <tech-talk at aps.anl.gov>
Sent: Monday, January 9, 2023 4:42 AM To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov> Subject: Understanding Asyn-based motor controller driver Hi
I am trying to understand how a motor controller driver works and how the asynMotorController and Axis classes map to the EPICS motor record. For example, I am investigating this driver from ACS motion https://github.com/epics-motor/motorAcsMotion to see if it supports some functions from the motor record that are required by our data acquisition system. Here are my questions: 1. motor jogging: since the class does not implement the “::moveVelocity” function, does this mean that the driver does not support jogging at all? Or it does at the low-level motor record interface? 2. VELO and ACCL fields: The class uses different variables to hold acceleration and velocity information other than the base class’s variables “motorVelocity_” and “motorAccel_”. Does this mean that VELO and ACCL fields are useless? Same thing goes for the OFF field.
In other words, if a motor driver is based on the motor record, does this guarantee that all fields are functional and working with the controller? How to verify if a certain function not implemented in the asyn classes but working and implemented somewhere else?
Best Regards,
Abdalla Al-Dalleh Control Engineer
SESAME (Synchrotron-light for Experimental Science and Applications in the Middle East) Fax: +96253511423 abdalla.ahmad at sesame.org.jo
|