Skip to content

Commit

Permalink
Merge pull request #512 from simonsobs/modify_for_site_wiregrid_actuator
Browse files Browse the repository at this point in the history
Swap LSL/LSR/ST1 <--> LSL/LSR/ST2 for the bug fix at the site
  • Loading branch information
BrianJKoopman authored Aug 22, 2023
2 parents d76f284 + b1f2105 commit 7dd21f5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions socs/agents/wiregrid_actuator/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def _move(self, distance, speedrate, LSLname, LSRname, LSlabel):
if LSonoff:
self.log.info(
'_move(): Stopped moving because '
'one of {} limit-switches is ON (LSL1={}, LSR1={})!'
'one of {} limit-switches is ON (LSL={}, LSR={})!'
.format(LSlabel, LSL, LSR))
return True, \
'_move(): Finish move(distance={}, speedrate={}, limit-switch={})'\
Expand All @@ -102,7 +102,7 @@ def _forward(self, distance, speedrate=0.2):
if distance < 0.:
distance = abs(distance)
ret, msg, LSonoff = self._move(
distance, speedrate, 'LSL1', 'LSR1', 'inside')
distance, speedrate, 'LSL2', 'LSR2', 'inside')
return ret, \
'_forward(): '\
'Finish forward(distance={}, speedrate={}, limit-switch={})'\
Expand All @@ -114,7 +114,7 @@ def _backward(self, distance, speedrate=0.2):
if distance > 0.:
distance = -1. * abs(distance)
ret, msg, LSonoff = self._move(
distance, speedrate, 'LSL2', 'LSR2', 'outside')
distance, speedrate, 'LSL1', 'LSR1', 'outside')
return ret, \
'_backward(): '\
'Finish backward(distance={}, speedrate={}, limit-switch={})'\
Expand All @@ -125,7 +125,7 @@ def _insert_eject(
self, main_distance=920, main_speedrate=1.0, is_insert=True):
# Function label
flabel = 'insert' if is_insert else 'eject'
initial_ls_names = ['LSL2', 'LSR2'] if is_insert else ['LSL1', 'LSR1']
initial_ls_names = ['LSL1', 'LSR1'] if is_insert else ['LSL2', 'LSR2']
move_func = self._forward if is_insert else self._backward

# Check connection
Expand Down
12 changes: 6 additions & 6 deletions socs/agents/wiregrid_actuator/limitswitch_config.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Digital IO
IO_INFO = [
# Right actuator: Inside the forebaffle
{'name': 'LSR1', 'io': 'IN[1]', 'label': 'Right1Inside'},
# Right actuator: Outside the forebaffle
{'name': 'LSR2', 'io': 'IN[2]', 'label': 'Right2Outside'},
{'name': 'LSR1', 'io': 'IN[1]', 'label': 'Right1Outside'},
# Right actuator: Inside the forebaffle
{'name': 'LSR2', 'io': 'IN[2]', 'label': 'Right2Inside'},
# Right actuator: Spare
{'name': 'LSR3', 'io': 'IN[3]', 'label': 'Right3NotConnected'},
# Right actuator: Spare
{'name': 'LSR4', 'io': 'IN[4]', 'label': 'Right4NotConnected'},
# Left actuator: Inside the forebaffle
{'name': 'LSL1', 'io': 'IN[5]', 'label': 'Left1Inside'},
# Left actuator: Outside the forebaffle
{'name': 'LSL2', 'io': 'IN[6]', 'label': 'Left2Outside'},
{'name': 'LSL1', 'io': 'IN[5]', 'label': 'Left1Outside'},
# Left actuator: Inside the forebaffle
{'name': 'LSL2', 'io': 'IN[6]', 'label': 'Left2Inside'},
# Left actuator: Spare
{'name': 'LSL3', 'io': 'IN[7]', 'label': 'Left3NotConnected'},
# Left actuator: Spare
Expand Down
12 changes: 6 additions & 6 deletions socs/agents/wiregrid_actuator/stopper_config.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Digital IO
IO_INFO = [
# Right stopper: Inside of the forebaffle interface
{'name': 'STR1', 'io': 'OUT[1]', 'label': 'Right1Inside'},
# Right stopper: Outside of the forebaffle interface
{'name': 'STR2', 'io': 'OUT[2]', 'label': 'Right2Outside'},
# Left stopper: Inside of the forebaffle interface
{'name': 'STL1', 'io': 'OUT[3]', 'label': 'Left1Inside'},
{'name': 'STR1', 'io': 'OUT[1]', 'label': 'Right1Outside'},
# Right stopper: Inside of the forebaffle interface
{'name': 'STR2', 'io': 'OUT[2]', 'label': 'Right2Inside'},
# Left stopper: Outside of the forebaffle interface
{'name': 'STL2', 'io': 'OUT[4]', 'label': 'Left2Outside'},
{'name': 'STL1', 'io': 'OUT[3]', 'label': 'Left1Outside'},
# Left stopper: Inside of the forebaffle interface
{'name': 'STL2', 'io': 'OUT[4]', 'label': 'Left2Inside'},
]

0 comments on commit 7dd21f5

Please sign in to comment.