=================== NewportSMC100 =================== =============== ======================================================================================================== **Summary**: :pluginsummary:`NewportSMC100` **Type**: :plugintype:`NewportSMC100` **License**: :pluginlicense:`NewportSMC100` **Platforms**: Windows, Linux **Devices**: Motor-Controller Newport SMC100CC/PP **Author**: :pluginauthor:`NewportSMC100` **Requires**: Plugin SerialIO =============== ======================================================================================================== Overview ======== The plugin implements the Motioncontroller Newport SMC100cc/pp. It can manage up to 32 controllers that are all connected to the same comport and communicate internally over RS485. The connection to the computer is via RS232. .. pluginsummaryextended:: :plugin: NewportSMC100 Initialization ============== The following parameters are mandatory or optional for initializing an instance of this plugin: .. plugininitparams:: :plugin: NewportSMC100 Parameters ========== These parameters are available and can be used to configure the **PIPiezoCtrl** instance. Many of them are directly initialized by the parameters of the constructor. During the runtime of an instance, the value of these parameters is obtained by the method *getParam*, writeable parameters can be changed using *setParam*. **name**: {str}, read-only name of the plugin **comPort**: {int}, read-only port number of used COM port (not implemented yet) For further information search the info of the corresponding SerialIO plugin. **ctrlId**: {str}, read-only device information string **current_status**: {intArray}, read-only This intArray stores the status of each controller. While no error occurs, the controller should be notReferenced (LED = orange) Referenced (LED = green) ConfigMode (LED = red [blinking]) **numaxis**: {int}, read-only return the number of axes, here always 1 **async**: {int} [0,1] Defines if the code continues while a controller is processing a task. **accel**: {doubleArray} Array of the accelerations of each axis. Notice that if the acceleration is too high, errors can occur because of physical boundaries. These boundaries might be changeable due the serialport. For further information refer to the data sheet. **calib_mode**: {intArray} [0,4] Defines the calibration mode, each axis performs when exec_calib is called with an 1 for the corresponding axis. 0 use MZ switch and encoder Index. 1 use current position as HOME. 2 use MZ switch only. 3 use EoR- switch and encoder Index. 4 use EoR- switch only. **config_state**: {intArray} [0,1] Defines whether an axis switches to config mode. Notice that if an axis is in referenced state a reset is automatically performed to set the axis to notRef state and further into config state. **speed**: {doubleArray} Array of the velocity of each axis. **exec_calib**: {intArray} [0,1] By setting this parameter with either a 1 or a 0 for each axis, all axis marked with 1 are calibrated. Example ======= Create new Instance: .. code-block:: python serialPort = dataIO("SerialIO", 3, 57600, endline="\r\n") plugin = actuator("NewPortSMC100", serialPort, 2) del serialPort #can be deleted since plugin still holds a reference Switch acceleration, velocity and calib_mode .. code-block:: python # switch 2 controller to config mode plugin.setParam("config_state", [1,1]) # plugin.setParam("config_state", [1,0]) => switch ctrl0 to config and if ctrl1 is on config, leave config # set velocity plugin.setParam("speed", [5.0,7.0]) # set acceleration plugin.setParam("accel", [2.0,3.0]) # set calib_mode plugin.setParam("calib_mode", [2,2]) # leave config mode plugin.setParam("config_state", [0,0]) # calibrate plugin.calib(0,1) #calibrate first and second axis # Controller calibrate and move to referenced state Known Issues ============ In special cases an error occurs that leaves the controller in notReferenced state with an error. The LED is constantly red. In this case you have to read the error buffer by sending xTE and xTS where x is the controller number. Notice that the hardware numbers from 1..32 not 0..31 as itom does. Afterwards you can switch into the config mode using xPW1. Choose another calibration mode xHTy, leave the config mode xPW0 and recalibrate the controller with xOR. Further you can send reset commands to the controller (xRS) or unplug the powersupply.