Closed ps3017 closed 1 week ago
EPICS motor drivers usually set the velocity and acceleration in the move
method before sending the move commands.
The Kinesis drive doesn't currently set the velocity and acceleration:
And the controller-specific move methods only send the move command:
I'm not familiar with the Kinesis SDK. Adding SDK calls to set the velocity and acceleration to the move method should resolve the issue, assuming those SDK calls exist.
Found a setVelParams function in the API, added it into the code. Try the branch I just pushed and see if that fixes things
Found a setVelParams function in the API, added it into the code. Try the branch I just pushed and see if that fixes things
Thanks! Adding the setVelParams function solved the issue, but it needs to be defined as type "void", not type "int".
Hi, I'm working with a Thorlabs Kinesis motor controller KDC101 and a Thorlabs motor Z825BV. I am working in MSYS2 UCRT64 with arch: windows-x64-mingw. I'm running an IOC inside the motorThorlabs module in the motorRecord installation folder. I've taken the example IOC and modified its substitution (KCube.substitutions) and .cmd (KCube.cmd and st.cmd) files to work with my controller and motor and added a .db (motor.db) file to have some additional fields available (e.g. to add limit switches). I've attached the content of all 4 files at the end of the issue description in case they are of any relevance.
Most of the fields are behaving as expected - I am able to home and move the motor with both relative and absolute movement, set soft limit switches etc. The functionality that is lacking is regulating the velocity of the motor. I am able to change the values of all velocity related fields (
VELO
,VMAX
,VBAS
,ACCL
,BVEL
,BACC
,JEVL
,JAR
etc.), but the velocity set in theVELO
field (or any other velocity related field e.g.VMAX
) is not reflected in the motor movement. The motor keeps moving with one speed no matter what the PV field value is set to.I've tried changing the speed of the motor with Thorlabs Kinesis Software (link), and the velocity of the motor changes as expected (e.g. if I set the velocity to 0.5mm/s it takes 10 s to move 5 mm), so I don't suppose the controller could be faulty. I've also noticed that the motor, when controlled through the IOC, retains the last speed which was set with Kinesis Software, even though it's no longer connected to the Kinesis SW (if it was, the IOC would not be able to connect to the motor controller).
Is there anything that needs to be changed in the IOC configuration or in the Kinesis driver that would solve this issue?
Thanks in advance!
KCube.substitutions:
KCube.cmd:
st.cmd:
motor.db: