# masterMacs ## Overview This is a driver for the masterMacs motion controller with the SINQ communication protocol. It is based on the sinqMotor shared library (https://git.psi.ch/sinq-epics-modules/sinqmotor). The header files contain detailed documentation for all public functions. The headers themselves are exported when building the library to allow other drivers to depend on this one. ## User guide This driver is a standard sinqMotor-derived driver and does not need any specific configuration. For the general configuration, please see https://git.psi.ch/sinq-epics-modules/sinqmotor/-/blob/main/README.md. The folder "utils" contains utility scripts for working with masterMacs motor controllers: - decodeStatus.py: Take the return message of a R10 (read status) command and print it in human-readable form. ## Developer guide ### Usage in IOC shell masterMacs exposes the following IOC shell functions (all in masterMacsController.cpp): - `masterMacsController`: Create a new controller object. - `masterMacsAxis`: Create a new axis object. These functions are parametrized as follows: ``` masterMacsController( "$(NAME)", # Name of the MCU, e.g. mcu1. This parameter should be provided by an environment variable. "$(ASYN_PORT)", # IP-Port of the MCU. This parameter should be provided by an environment variable. 8, # Maximum number of axes 0.05, # Busy poll period in seconds 1, # Idle poll period in seconds 0.05 # Communication timeout in seconds ); ``` ``` masterMacsAxis( "$(NAME)", # Name of the associated MCU, e.g. mcu1. This parameter should be provided by an environment variable. 1, # Index of the axis. ); ``` ### Versioning Please see the documentation for the module sinqMotor: https://git.psi.ch/sinq-epics-modules/sinqmotor/-/blob/main/README.md. ### How to build it Please see the documentation for the module sinqMotor: https://git.psi.ch/sinq-epics-modules/sinqmotor/-/blob/main/README.md.