Studies of the Newport XPS controller by Vanik

From GlueXWiki
Revision as of 12:31, 7 June 2012 by Kakoyan (Talk | contribs)

Jump to: navigation, search

These studies were done using halldxps1 XPS-C8 controller from Newport Corporation. The motion system includes a Stepper motor and a Stage for microscope beam test.

Configuration of the XPS Controller

Configuration of stepper motor ST55D and stage

First stepper motor we used was ST55D5C020 from Shinano Kenshi corporation. It has not an encoder. We connected it to the XPS-DRV01 driver module. Definition of the "stages.ini" file which contains the necessary information of the motion system is located in a "CONFIG" folder of XPS controller.

  • Connect to the XPS Controller halldxps1 using an internet browser.
  • Login as Administrator.
  • Select STAGE, then "Add Custom Stage" and fill all fields.

I defined a stage with the name Stage_ST55D. The parameters of this motion system is defined as follows:

[Stage_ST55D]
SmartStageName=
; Position servo loop type
CorrectorType=NoEncoderPosition
MotionDoneMode=Theoretical
; Driver command interface
MotorDriverInterface=AnalogStepperPosition
ScalingCurrent=3
DisplacementPerFullStep=1
PeakCurrentPerPhase=1.3
StandbyPeakCurrentPerPhase=0.6
BaseVelocity=0.
; Motor driver model
DriverName=XPS-DRV01
DriverPWMFrequency=50
DriverStepperWinding=Half
; Position encoder interface
Backlash=0
CurrentVelocityCutOffFrequency=100
CurrentAccelerationCutOffFrequency=100
PositionerMappingFileName=
; Limit sensors input plug
ServitudesType=StandardEORDriverPlug
MinimumTargetPosition=-10000000
MaximumTargetPosition=+10000000
HomePreset=0
MaximumVelocity=400
MaximumAcceleration=100
EmergencyDecelerationMultiplier=4
MinimumJerkTime=0.005
MaximumJerkTime=0.05
TrackingCutOffFrequency=5
; Home search process
HomeSearchSequenceType=MinusEndOfRunHomeSearch
; HomeSearchSequenceType=CurrentPositionAsHome
; HomeSearchSequenceType=PlusEndOfRunHomeSearch
; HomeSearchSequenceType=MechanicalZeroHomeSearch
HomeSearchMaximumVelocity=250
HomeSearchMaximumAcceleration=70
HomeSearchTimeOut=600.

Configuration of system and motion groups

Building of "sistem.ini" file which is located in the "CONFIG" folder of the controller.

  • Select SYSTEM then "Manual Configuration" and define motion groups and stages on them.

I defined one MultipleAxes group - with Mult1 group name and with P1 positioner name for the Stage_ST55D.

sistem.ini file format:

[GENERAL]
BootScriptFileName = 
BootScriptArguments = 
[GROUPS]
SingleAxisInUse = 
SpindleInUse = 
XYInUse = 
XYZInUse = 
MultipleAxesInUse =  Mult1
[Mult1]
PositionerNumber = 1
PositionerInUse = P1
InitializationAndHomeSearchSequence = Together
[Mult1.P1]
PlugNumber = 1
StageName = Stage_ST55D
; Time flasher filter 
TimeFlasherBaseFrequency = 40e6 ; Hz

Testing of the XPS Controller by WEB interface

  • Connect to the XPS Controller halldxps1 using an internet browser.
  • Login as Administrator or User.
  • Select "FRONT PANEL", then "Move".
  • Select "Initialize" button for the initialization of the positioner (motion system).
  • Select "Home" for homing. After initialization, any motion group must first be homed befor any motion can be executed. After homing the Controller and the Positioner are ready.
  • "Move" button under the "FRONT PANEL". In this site, one can select some velocity and number of Absolute or Relative movements and press "Go" button. "Position" field indicates position of stage during and after movement.
  • "Jog" button under the "FRONT PANEL". I tested the jog motion, where only motion direction and speed are defined. Any time it is possible to stop movement pressing "STOP" button.
  • If a limit switch (high or low) is detected during movements then an emergency brake and the positioner will go in "NOT INITIALIZED" status. So, it is neseccary to make a new "Initialization" and "Homing" to start a new motion. To protect these situations there is a possibility to use software limits (see stage.ini file).
  • The "TERMINAL" tool allows to execute all functions (more 100) of the XPS controller.
  • The "STAGE - Modify" tool allows to review and modify all parameters of stage included in the stages.ini file.
  • Using the "Positioner errors", "Hardware status", "Driver status" under the "FRONT PANEL" or "Error file display" under the "SYSTEM" one can check errors and statuses of the motion system.

No any problem. Everything is working.

Testing of Home search process

After initialization, any motion group must be homed i.e. define an reference point as an origin. There are different homing processes available in the XPS controller. I tested several types of home definitions:

  • CurrentPositionAsHome. In this option current position is defined as a home. There is no any absolute reference point. We have no idea where is stage after shut down or a power-off cycle. This option works, but it is not useful for us.
  • Home switch as home. The home switch was put at the middle part of the stage. The homing procedure is different for the cases with and without encoder. SST55D motor has not an encoder and in this case XPS suportes MechanicalZeroHomeSearch option when only mechanical zero signal from home switch is used for home search process. XPS always defines fixed home searching direction -from high position to low position. If after initialization the current position of positioner is greater than home switch position everything is OK. Home switch will be found and positioner will be ready for any type of movements. But if current position of positioner is less than home switch position we will have a big problem. It will be impossible to find home switch. The positioner goes in "NOT INITIALIZED" status when during movements the Low limit switch is detected and then no any movements will be possible. So, we have refused this option and we will investigate this later with the motor with encoder.
  • Low/High Limit Switch As Home. In this case one of limit switches is defined as a home. I tested both options - MinusEndOfRunHomeSearch and PlusEndOfRunHomeSearch. They work. For convenience I used MinusEndOfRunHomeSearch - Low limit switchas as home option. In this case we will have positive movement axis.

Testing of the XPS Controller by EPICS

Motor_expert

Mark Rivers from the APS developed EPICS driver for XPS controller which works with the EPICS motor record. I developed CSS (Control System Studio) GUI to control it. The motor_expert.opi file is located in folder Hall-D/Default/XPS-C8 of CSS workspace. The xpsMotor.cmd command file for IOC is located in /misc/halld/Online/controls/epics/R3-14-12-2/app/iocBoot/iocxpsMotor folder.

Using this GUI one can:

  • To change some parameters of the motor (speed, acceleration, resolution) and stage (high and low limits)
  • To make several types of stage movements: Absolute move - the motion device moves from a current position to a desired destination, Relative move - the motion device moves from a current position by a defined increment, Jog - indeterminate forward or reverse motion (defines motion direction only), Home - to move the stage to the home position
  • To operate the movement (stop, pause, move, go)
  • To see the motor and stage statuses

xpsMotor.cmd file :

#!../../bin/linux-x86/xpsMotor
< envPaths
cd ${TOP}
dbLoadDatabase("dbd/xpsMotor.dbd")
xpsMotor_registerRecordDeviceDriver(pdbbase)
dbLoadTemplate "db/xpsMotor_1.substitutions"
dbLoadTemplate "db/XPSAux_1.substitutions"
#asSetFilename("ca_security.txt")
# asyn port, IP address, IP port, number of axes, 
# active poll period (ms), idle poll period (ms), 
# enable set position, set position settling time (ms)
XPSCreateController("XPS1", "129.57.37.26", 5001, 1, 10, 500, 0, 500)
asynSetTraceIOMask("XPS1", 0, 2)
# asynPort, IP address, IP port, poll period (ms)
XPSAuxConfig("XPS_AUX1", "129.57.37.26", 5001, 50)
# XPS asyn port,  axis, groupName.positionerName, stepSize
#XPSCreateAxis("XPS1",0,"SingleGroup1.Pos1",   "0")
XPSCreateAxis("XPS1",0,"Mult1.P1",   "1")
# XPS asyn port,  max points, FTP username, FTP password
# Note: this must be done after configuring axes
XPSCreateProfile("XPS1", 2000, "Administrator", "Administrator")
iocInit

PVT Trajectory scanning

PVT (Position, Velosity,Time) trajectory scanning allows to output logic pulses during the execution of some trajectory which is defined by the move time, the end position and end speed. The profileMove.opi is the css GUI to define, buld, execute PVT trajectories and read back the actual positions when the puls was output.

The command file for the IOC is xpsPVT.cmd which is located in /misc/halld/Online/controls/epics/R3-14-12-2/app/iocBoot/iocxpsMotor folder.

xpsPVT.cmd file:

#!../../bin/linux-x86/xpsMotor
< envPaths
cd ${TOP}
#dbLoadDatabase("../../dbd/WithAsyn.dbd")
#WithAsyn_registerRecordDeviceDriver(pdbbase)
dbLoadDatabase("dbd/xpsMotor.dbd")
xpsMotor_registerRecordDeviceDriver(pdbbase)
dbLoadTemplate "db/xpsPVT.substitutions"
dbLoadTemplate "db/XPSAux_1.substitutions"
# asyn port, IP address, IP port, number of axes, 
# active poll period (ms), idle poll period (ms), 
# enable set position, set position settling time (ms)
XPSCreateController("XPS1", "129.57.37.26", 5001, 1, 10, 500, 0, 500)
asynSetTraceIOMask("XPS1", 0, 2)
# asynPort, IP address, IP port, poll period (ms)
XPSAuxConfig("XPS_AUX1", "129.57.37.26", 5001, 50)
# XPS asyn port,  axis, groupName.positionerName, stepSize
XPSCreateAxis("XPS1",0,"Mult1.P1",   "1")
# XPS asyn port,  max points, FTP username, FTP password
# Note: this must be done after configuring axes
XPSCreateProfile("XPS1", 2000, "Administrator", "Administrator")
#cd ${TOP}/iocBoot/ioc${IOC}
iocInit

Use the GUI fileds to define the necessary parameters for the PVT scanning and use several two commands to define the number of trajectory elements (n), the absolute positions (Pi) and the time (Ti) for the i-th trajectory element. Go from Pi position to Pi+1 position durring Ti seconds.

caput -a halldxps1:Prof1:M1Positions n P1 P2 ... Pn
caput -a halldxps1:Prof1:Times n T1 T2 ... Tn


Distance Spaced Pulses (PCO -Position Compare Output)

Configuration of stepper motor S22 with encoder

Modification of the EPICS Driver for PCO