Closed kmpeters closed 1 year ago
@MarkRivers, do you have thoughts on this issue?
What other Model 2 drivers are in use? There is a Model 3 version of the simulation motor, correct?
I searched all of motor and motor/modules for motor_interface.h.
corvette:~/devel/motor>find . -name '*.c*' -exec grep -H motor_interface.h {} \;
./modules/motorAerotech/aerotechApp/src/drvA3200Asyn.cc:#include "motor_interface.h"
./modules/motorAerotech/aerotechApp/src/drvEnsembleAsyn.cc:#include "motor_interface.h"
./modules/motorMotorSim/motorSimApp/src/devMotorSim.c:#include "motor_interface.h"
./modules/motorMotorSim/motorSimApp/src/drvMotorSim.c:#include "motor_interface.h"
./modules/motorPIGCS2/pigcs2App/src/PIasynAxis.cpp:#include <motor_interface.h>
./modules/motorPIGCS2/pigcs2App/src/PIasynController.cpp:#include <motor_interface.h>
./modules/motorAttocube/attocubeApp/src/drvANC150Asyn.cc:#include "motor_interface.h"
./modules/motorNewport/newportApp/src/drvMM4000Asyn.c:#include "motor_interface.h"
./modules/motorNewport/newportApp/src/drvXPSAsyn.c:#include "motor_interface.h"
./motorApp/MotorSrc/devMotorAsyn.c:#include "motor_interface.h"
./motorApp/MotorSrc/drvMotorAsyn.c:#include "motor_interface.h"
./motorApp/MotorSrc/drvMotorAsyn.c: /* Parameters - these must match the definitions in motor_interface.h */
corvette:~/devel/motor>find . -name '*.h' -exec grep -H motor_interface.h {} \;
./modules/motorNewport/newportApp/src/XPSAsynInterpose.h:#include "motor_interface.h"
Most of these appear to be Model 2 drivers, although motorPIGCS2 appears to be a Model 3 driver and should not need motor_interface.h.
Please allow a side-question, how do I read this 2 contradicting lines ? ...Model 3 driver and should not need motor_interface.h ./motorApp/MotorSrc/drvMotorAsyn.c:#include "motor_interface.h"
I tried to remove all code in drvMotorAsyn.c, but then I ran into this error when compiling/linking an IOC with ethercatmc:
Undefined symbols for architecture x86_64: "_pvar_func_motorRegister", referenced from:
Please allow a side-question, how do I read this 2 contradicting lines ? ...Model 3 driver and should not need motor_interface.h ./motorApp/MotorSrc/drvMotorAsyn.c:#include "motor_interface.h"
I don't think the lines are contradictory. drvMotorAsyn.c is not used by Model 3 drivers. It is only used by Model 2 drivers.
I tried to remove all code in drvMotorAsyn.c, but then I ran into this error when compiling/linking an IOC with ethercatmc:
Undefined symbols for architecture x86_64: "_pvar_func_motorRegister", referenced from: registrar(motorRegister)
If you don't build with drvMotorAsyn.c (removing support for Model 2 drivers) then you must remove this line from motorSupport.dbd:
registrar(motorRegister)
because drvMotorAsyn.c contains these lines:
drvMotorAsyn.c:void motorRegister(void)
drvMotorAsyn.c:epicsExportRegistrar(motorRegister);
There is a Model 3 version of the simulation motor, correct?
There is a model-3 version of the simulation motor. There is no model-3 configuration in the example motorSimIOC, nor is there an example configure in the xxx module, so I haven't seen model-3 simulated motors in use yet.
As noted:
There is no default value on which to fallback when any of the are not defined.
@prjemian, I added databases to work around the problem in PR #197
Eventually I'd like to see all the model-2 drivers replaced with model-3 drivers or retired.
"Fixed" by #197
If
asyn_motor.db
orbasic_asyn_motor.db
is used with an asyn model-2 driver, the follow errors occur at iocInit:The records that cause the errors were added in this commit: https://github.com/epics-modules/motor/commit/d091a0917525e9ff899946234506254933098b3a After this change to the asynMotor parameters: https://github.com/epics-modules/motor/commit/102f74b5842f8cdea9fff5f74264c36f633411e3
One way to resolve this issue would be to add the new parameters to
motorAxisParam_t
inmotor_interface.h
so they can be added tomotorCommand
enum andmotorCommandStruct
indrvMotorAsyn.c
.A simpler way to resolve this issues is to create
asyn_2_motor.db
andbasic_asyn_2_motor.db
that omit the records added in https://github.com/epics-modules/motor/commit/d091a0917525e9ff899946234506254933098b3a and use them with asyn model-2 drivers, like motorMotorSim.