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 | 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 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Motor record with encoders |
From: | Henrique Almeida <[email protected]> |
To: | Mark Rivers <[email protected]> |
Cc: | "[email protected] Talk" <[email protected]> |
Date: | Fri, 19 Feb 2016 12:06:17 -0200 |
Hi Henrique,
Ø I have browsed ACRMotorDriver.cpp and MCB4Driver.cpp and it looks like they have almost everything I need. I was unable to find out how to deal with MRES/SREV, ERES and UEIP, however. Is there a specific file where I should look ?
Your driver should normally not need to know about MRES/SREV. Your driver will always be sent a position in steps from the record. If your controller communicates in engineering units and not steps, then you need to back convert from steps to engineering units in your driver. For an example, I do that in the NewportSrc/XPS driver. The conversion factor is given in the XPSConfigAxis command. Note that motor record engineering units and the controller engineering units do not need to be the same.
UEIP is something the motor record uses. Your poll() function will read both the theoretical position and the encoder position and pass them both back to the record. The record decides whether or not to use the encoder reading based on UEIP.
Mark
From: Henrique Almeida [mailto:[email protected]]
Sent: Thursday, February 18, 2016 1:55 PM
2016-02-18 17:37 GMT-02:00 Mark Rivers <[email protected]>:
Hi Henrique,
There is no online tutorial on model 3 drivers. That needs to be done ...
I have created Doxygen documentation for the Model 3 classes. Here is a link:
http://cars.uchicago.edu/software/epics/motorDoxygenHTML/classasyn_motor_controller.html
I gave a talk on asynMotor at the MOCRAF workshop at the ICALEPCS conference in San Francisco. It is posted online here:
I have also attached a talk I gave that describes the Model 3 architecture.
There are a number of drivers you can use as examples:
- ACS-MCB4B. This is a simple driver. The motorApp/AcsSrc directory contains both an old Model 1 driver (devMCB4B.cc, drvMCB4B.cc) and a new Model 3 driver (MCB4BDriver.cpp). You should use the latter.
- Parker ACR controller (motorApp/ACRSrc/ACRMotorDriver.cpp. This is also a simple driver.
I have browsed ACRMotorDriver.cpp and MCB4Driver.cpp and it looks like they have almost everything I need. I was unable to find out how to deal with MRES/SREV, ERES and UEIP, however. Is there a specific file where I should look ?
- Newport XPS controller (motorApp/NewportSrc/XPSController.cpp, XPSAxis.cpp). This is a more complex driver that support complex coordinated motion and some other features.
The following is a list of all “.cpp” files in the motorApp directories, and I think these are all Model 3 drivers.
corvette:~/devel/motor>find . -name '*.cpp'
./motorApp/NPointSrc/C300MotorDriver.cpp
./motorApp/PhytronSrc/phytronAxisMotor.cpp
./motorApp/MicroMoSrc/MVP2001Driver.cpp
./motorApp/ImsSrc/ImsMDrivePlusMotorAxis.cpp
./motorApp/ImsSrc/ImsMDrivePlusMotorController.cpp
./motorApp/PIGCS2Src/PIE755Controller.cpp
./motorApp/PIGCS2Src/PIGCSPiezoController.cpp
./motorApp/PIGCS2Src/PIGCSMotorController.cpp
./motorApp/PIGCS2Src/PIGCS2_HexapodController.cpp
./motorApp/PIGCS2Src/PIE517Controller.cpp
./motorApp/PIGCS2Src/PIC702Controller.cpp
./motorApp/PIGCS2Src/PIasynAxis.cpp
./motorApp/PIGCS2Src/PIInterface.cpp
./motorApp/PIGCS2Src/PIasynController.cpp
./motorApp/PIGCS2Src/PIGCSController.cpp
./motorApp/PIGCS2Src/PIHexapodController.cpp
./motorApp/ACRSrc/ACRMotorDriver.cpp
./motorApp/SmarActMCSSrc/smarActMCSMotorDriver.cpp
./motorApp/MicosSrc/SMChydraDriver.cpp
./motorApp/HytecSrc/HytecMotorDriver.cpp
./motorApp/OmsAsynSrc/omsMAXv.cpp
./motorApp/OmsAsynSrc/omsMAXvEncFunc.cpp
./motorApp/OmsAsynSrc/omsMAXnet.cpp
./motorApp/OmsAsynSrc/omsBaseController.cpp
./motorApp/OmsAsynSrc/omsBaseAxis.cpp
./motorApp/NewportSrc/AG_CONEX.cpp
./motorApp/NewportSrc/SMC100Driver.cpp
./motorApp/NewportSrc/HXPDriver.cpp
./motorApp/NewportSrc/XPSController.cpp
./motorApp/NewportSrc/XPSAxis.cpp
./motorApp/NewportSrc/AG_UC.cpp
./motorApp/MicronixSrc/MMC200Driver.cpp
./motorApp/AcsSrc/MCB4BDriver.cpp
************************************************************************************************
Cheers,
Mark
From: Henrique Almeida [mailto:[email protected]]
Sent: Thursday, February 18, 2016 1:17 PM
To: Mark Rivers
Cc: [email protected] Talk
Subject: Re: Motor record with encoders
2016-02-18 17:09 GMT-02:00 Mark Rivers <[email protected]>:
You may be able to just load another record that periodically writes to the STUP field? What are your requirements?
That would do.
What driver are you using?
It's called "motorPXI", it's a proxy driver that communicates via shared memory with a LabView RT application, which contains the real driver.
If you want to switch to Model 3 then yes you need to rewrite the driver. Model 3 is quite a simple model. You just need to implement some C++ methods like asynMotorAxis:: move(), asynMotorAxis::stop(), asynMotorAxis::poll(), etc.
Is there an example implementation or tutorial ?
Mark
From: Henrique Almeida [mailto:[email protected]]
Sent: Thursday, February 18, 2016 1:05 PM
To: Mark Rivers
Cc: [email protected] Talk
Subject: Re: Motor record with encoders
I believe the motor driver is using model 1 (motor*Com.cc) API. Is it necessary to rewrite the driver to support model 3 ?
2016-02-18 16:59 GMT-02:00 Mark Rivers <[email protected]>:
Yes the motor record can update REP when all motors are stopped. If you are using a “Model 2” or “Model 3” driver that does callbacks when the motor is idle then the record will automatically process and update. If you are using a “Model 1” driver then you need to write to the STUP field to force the record to read the status.
Mark
From: [email protected] [mailto:[email protected]] On Behalf Of Henrique Almeida
Sent: Thursday, February 18, 2016 12:50 PM
To: [email protected] Talk
Subject: Motor record with encoders
Hello, is the motor record currently able to update the encoder position ("REP" PV) while all motors are stopped ?