epics-motor / motorSmarAct

EPICS motor drivers for SmarAct controllers
3 stars 13 forks source link

SmartAct MCS failing at startup #11

Closed domitto closed 2 years ago

domitto commented 3 years ago

Hi, I'm trying to use the smarAct IOC with a gen1 MCS controller but it seems to be failing right after smartActMCSCreateAxis. It looks like the GCLS command is waiting for a non-E response and this controller is returning E0,240 instead. I've attached the output with the asynSetTraceMask. smarActIOC.txt

kmpeters commented 3 years ago

The GCLS command has been in the driver since it was added to the motor module:

https://github.com/epics-motor/motorSmarAct/blame/master/smarActApp/src/smarActMCSMotorDriver.cpp#L275

But the SmarAct MCS RS232 Interface documentation contains this note:

Note: This Command is not available on all controllers. Please contact SmarAct for more information.

Can you provide the output of the GIV command? I'll need to ask SmarAct how we can determine if a controller supports the GCLS command.

kmpeters commented 3 years ago

The documentation also mentions that speed control can be disabled, but I don't see how to check if that is the case.

domitto commented 3 years ago

Hi Kevin, thanks for helping with this. This is the response to the GIV command: :IV(1)1,1,19\n

domitto commented 3 years ago

I don't think we can find out based on the firmware version, I sent GIV to a working controller and it replied the same version but it replies :CLS0,0 to the :GCLS0 command. =(

kmpeters commented 3 years ago

I've asked SmarAct for more information on which controllers support the GCLS command, as well as how we can differentiate between controllers that don't support the GCLS command using RS232 commands.

kmpeters commented 2 years ago

SmarAct never responded to me.

It looks like the driver could be modified to NOT call setSpeed in the move method if the GCLS command returns an error during init. I don't know, however, whether other changes would also be required.

domitto commented 2 years ago

Thanks, I'll have to wait until the controller is free but I'll modify the driver and submit a PR after I have a chance to test it.

domitto commented 2 years ago

Hi @kmpeters, I finally got access to a controller that I can play with and disabling the setSpeed commands seems to be enough to get it working properly. Is adding a fourth disableSpeed flag to smarActMCSCreateAxis and setting its default value to still use setSpeed an acceptable solution?

kmpeters commented 2 years ago

@domitto, if the setSpeed command needs to be disabled for all the axes on a controller, the disableSpeed flag should be added to smarActMCSCreateController instead of smarActMCSCreateAxis. Adding disableSpeed flag is an acceptable solution. I'll need to make it very clear in the release notes for the next version that a new argument has been added.