HHS doesn't show up in the visualizer

Hey everyone, I’ve setup two Hamilton Heater Shaker modules in PLR. I used the guide to setup two HHS modules connected directly to the STAR, however they don’t show up in the visualizer.

When I use the core grippers to move a plate to that location, I see that the plate is moved to the correct location. Lock and shake commands work (in simulation, haven’t tested in hardware yet).

Here’s my code:

interface_choice = "star_control" 

# HS1
hhsbackend1 = HamiltonHeaterShakerBackend()

hs1 = HeaterShaker(
  name="Hamilton HeaterShaker",
  backend=hhsbackend1,
  size_x=146.2,
  size_y=103.8,
  size_z=74.11,
  child_location=Coordinate(
     x=TUBE_CARRIER_3.get_absolute_location().x + TUBE_CARRIER_3._size_x + 5,
     y=455.5,
     z=183
  ),
)

hs1.location=Coordinate(
     x=TUBE_CARRIER_3.get_absolute_location().x + TUBE_CARRIER_3._size_x + 5,
     y=455.5,
     z=183
    ),

# HS2
hhsbackend2 = HamiltonHeaterShakerBackend()

hs2 = HeaterShaker(
  name="Hamilton HeaterShaker",
  backend=hhsbackend2,
  size_x=146.2,
  size_y=103.8,
  size_z=74.11,
  child_location=Coordinate(
     x=TUBE_CARRIER_3.get_absolute_location().x + TUBE_CARRIER_3._size_x + 5,
     y=455.5 - 103.8 - 5,
     z=183
  ),
)

hs2.location=Coordinate(
     x=TUBE_CARRIER_3.get_absolute_location().x + TUBE_CARRIER_3._size_x + 5,
     y=455.5 - 103.8 - 5,
     z=183
    ),

for hs in [hs1, hs2]:
  await hs.setup()
2 Likes

have you assigned these resources to the deck somehow?

I see that you’re setting the location, but in order to connect them to the resource tree you need to use assign_child_resource in some way.

e.g.

shaker_carrier = MFX_CAR_P3_SHAKER(
  name="shaker_carrier",
  modules={0: hs2, 1: hs1, 2: hs0}
)
lh.deck.assign_child_resource(shaker_carrier, rails=5)

That was it!

Would be nice to have in the Hello World, “Hamilton Heater Shaker”! guide, although I can see that having to assign the resource is obvious to seasoned PLR devs!

2 Likes

good feedback! (i always love it when new people come and give “first impressions feedback”! this window is too short :))

2 Likes