epics-motor / motorThorLabs

EPICS motor drivers for Thorlabs controllers
2 stars 1 forks source link

ThorLabs Kinesis Driver, Here or Separate? #2

Closed keenanlang closed 1 year ago

keenanlang commented 2 years ago

I have working motor support for the DC and Stepper versions of the ThorLabs Kinesis series of motors. On most accounts, it should probably just go into this driver, but the one thing that would encourage a new, separate module would be that every different model of the kinesis motors requires a separate version of the driver to be created.

The vendor libraries have a set of methods that all perform the same general function but are differently named for each type of motor. I already have DC and Stepper extensions to the motor support, but there are quite a few other types of motors. So, if the driver ends up supporting all the different types of motors that ThorLabs puts out, that might end up being better off as it's own thing, so not to flood the module with a bunch of versions of what is essentially the same exact driver.

Separately, there is an issue with the building of the support that I can't seem to properly resolve in a manner that satisfies all the parts of the EPICS build system.

The vendor libraries are installed in the "Program Files" folder of the computer. I can't seem to set up the makefile in a way that can reference a system library in a folder that contains a space. Quotes, escape characters, or symlinks all seem to break different parts of the build.

anjohnson commented 2 years ago

dir /x on Windows shows you the short names (e.g. C:\PROGRA~1) for any files/directories that have long names or spaces in them, and you should be able to use them instead of any paths components with spaces in to reach the SDK directory. Note that short names can vary depending on other files and directories in the same directory at the time, so you you shouldn't assume the above example points to C:\Program Files on all machines, it might point to C:\Program Files (x86) on some systems.

The other suggestion you could try is adding a rule to copy the vendor's file(s) into your build directory by running a Windows COPY or XCOPY command in the rule, remembering to "quote" the source path.

kmpeters commented 2 years ago

@keenanlang, I think it is OK to add the Kinesis series of drivers to this module.

kmpeters commented 1 year ago

Fixed by #4