Skip to content

Commit

Permalink
110_HOMF_-ProcHom, 100_HOMF: use HOMR when sitting on HLS
Browse files Browse the repository at this point in the history
When the high limit switch is active, the motorRecord will block
HOMF. Use HOMR instead
  • Loading branch information
tboegi committed Jun 1, 2016
1 parent 6ad88b1 commit 03adf26
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions epics/test/100_HOMF.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,12 @@ def tearDown(self):
# Home the motor
def test_TC_100(self):
tc_no = "TC-100"
print '%s Home the motor forward' % tc_no
self.m1.put('HOMF', 1)
print '%s Home the motor' % tc_no
msta = int(self.m1.get('MSTA'))
if (msta & self.MSTA_BIT_PLUS_LS):
self.m1.put('HOMR', 1)
else:
self.m1.put('HOMF', 1)
time_to_wait = 30
if self.range_postion > 0 and self.homing_velocity > 0:
time_to_wait = 1 + self.range_postion / self.homing_velocity + 2 * self.acceleration
Expand Down
3 changes: 2 additions & 1 deletion epics/test/110_HOMF_-ProcHom.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ def homeTheMotor(tself, motor, tc_no, procHome, jogToLSBefore):
tself.moving_velocity, tself.acceleration)

tself.pv_ProcHom.put(procHome)
if jogToLSBefore > 0:
msta = int(motor.get('MSTA'))
if (msta & tself.MSTA_BIT_PLUS_LS):
motor.put('HOMR', 1)
else:
motor.put('HOMF', 1)
Expand Down

0 comments on commit 03adf26

Please sign in to comment.