SM300 - ISISComputingGroup/ibex_developers_manual GitHub Wiki

The SM300 is a controller which moves to the position of motors simultaneously. So you set the position for each axis and then tell it to move to those positions.

The controller is hardwired to set certain parameters to given values, e.g. the upper limit. The motor record provides these field but setting them will not do anything. The exception is the motor resolution which is used within the motor record to convert steps into mm; this must be set to the same as the controller see macros below. The parameters are set in the SM300Controller::writeInt32 when the controller's RESET field is set.

Macros

MSTPX: Number of steps per mm. The can be calculated from data format (PXA parameter), gear factor numerator (PXB parameter), gear factor denominator (PXC parameter) 10^ * /

DHLM1: Upper position in mm. This can be calculated from the

Common Extensions

The common extensions are an axis and motion setpoints. The motion setpoint is:

epicsEnvSet "LOOKUP_SMC300_01" "$(ICPCONFIGROOT)/motionSetPoints/sample.txt"

motionSetPointsConfigure("LOOKUP_SMC300_01","LOOKUP_SMC300_01")

dbLoadRecords("$(MOTIONSETPOINTS)/db/motionSetPoints.db","P=$(MYPVPREFIX)LKUP:SAMPLE:,NAME1=Linear,AXIS1=$(MYPVPREFIX)MOT:SAMPLE:LIN,NAME2=Rotational,AXIS2=$(MYPVPREFIX)MOT:SAMPLE:ROT,TOL=1,LOOKUP=LOOKUP_SMC300_01")
# Add extra action to motion setpoints, e.g. initialise
dbLoadRecords("$(MOTOR)/db/SM300_extra.db","P=$(MYPVPREFIX)LKUP:SAMPLE:,$(IFIOC)= ,PVPREFIX=$(MYPVPREFIX), PORT=$(AMOTOR), ADDR=0")

Known Issues

The driver will do go to X and Y at the same time because of the motor record. Once a position is set on X both motors will start to move to their positions but motor Y will not actually move. If a position is then set on motor Y it is already in a moving state so the motor record will not issue a new move command (I think because it dose not have a direction yet). If you change the direction of the X then the Y motor will get the new direction and both motors will now move simultaneously. (At least in the simulator I will try on the device and confirm). This seems too hard to fix and because of the retry it will get to the right position in the end.

Sometimes the hardware will get itself into a weird state where it will keep reporting errors and decline any move requests. Seen in https://github.com/ISISComputingGroup/IBEX/issues/4032 . To troubleshoot this try these steps in order:

  1. Power cycling hardware
  2. Doing a home from the hardware front panel
  3. Doing a move from the hardware front panel
  4. Restart driver