-
Notifications
You must be signed in to change notification settings - Fork 2
Encoders
A first manual home position calibration of all axes needs to be performed before the automatic homing can be used. This is also true if there was a power outage or the hand-held terminal was used to control the feedthrough motors.
- Start encoder control in terminal mode such that it displays positions in counts. See known zero position in the below table.
- Open python in interactive mode including FeedthroughMotorControls.py (e.g.
bpython -i FeedthroughMotorControls.py). Check if Axis Parameters are set correctly, meaning isROTARYAXISandLINEARAXISdefined correctly in the file. - Initialize COM Port to motor controller:
initFeedtrough(COMPORT) - Initialize Axis with either:
initLinearAxis()orinitRotaryAxis() - Start moving in small steps in the negative direction:
moveVertical(ONETURN/4)ormoveHorizontal(ONETURN/4) - One can check the end limit switches with the following command:
MOTOR.getParameter("IX")where X = 1,2 and AXIS = LINEARAXIS or ROTARYAXIS. 0 means switch is inactive, 1 means switch is active. - If the end switch is reached, one sets this position as the zero position (no need to be very accurate) with the following command:
MOTOR.setParameter("C1",0). Additionally one sets the user register R1 to 1 withMOTOR.setParameter("R1",1), this register will be checked by the automatic homing algorithm.
Linear Axis:
| Parameter | Downstream (lasertwo) | Upstream (laserone) |
|---|---|---|
| LINEARAXIS | 1 | 2 |
| Upper Limit Switch | I2 / S2 | I2 / S2 |
| Upper Limit Switch Position | Encoder: 0007368572 / Motor: 0 | Encoder: 0007396810 / Motor: |
| Lower Limit Switch | I1 / S1 | I1 / S1 |
| Lower Limit Switch Position | Encoder: 0015832471 / Motor: 1708267 | Enc: 001585296 / Motor: 1705951 |
Rotary Axis:
| Parameter | Upstream | Downstream |
|---|---|---|
| ROTARYAXIS | 2 | 1 |
| Clockwise Limit Switch | I2 / S2 | I2 / S2 |
| Clockwise Limit Position | E: / M: 0 | E: 118.098 / M: 0 |
| CClockwise Limit Switch | I1 / S1 | I1 / S1 |
| CClockwise Limit Position | E: / M: 0 | E: -56.015999 / M: 620462 |
The automatic homing procedure is based on the homing command of the motor controller. One of the two limit switches is set as a home switch (so far alway S2) then the homing command is issued to the motor controller, initiating a slew at maximum velocity in the minus direction until the home switch is hit followed by a creep at minimum velocity in the plus direction until the home switch is released. This procedure guarantees a repeatable start position. The function is surrounded by two safety checks:
- Was a manual homing performed
- During homing the position is monitored and the movement is aborted if the position deviates to far into the minus direction from the manually set 0 position.
positive direction --> moving down
measurement: 200000 steps = 14.04deg